summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/webkit/WebCore/html
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/webkit/WebCore/html')
-rw-r--r--src/3rdparty/webkit/WebCore/html/CanvasRenderingContext2D.cpp94
-rw-r--r--src/3rdparty/webkit/WebCore/html/CanvasRenderingContext2D.h9
-rw-r--r--src/3rdparty/webkit/WebCore/html/DataGridColumn.cpp42
-rw-r--r--src/3rdparty/webkit/WebCore/html/DataGridColumn.h90
-rw-r--r--src/3rdparty/webkit/WebCore/html/DataGridColumn.idl48
-rw-r--r--src/3rdparty/webkit/WebCore/html/DataGridColumnList.cpp98
-rw-r--r--src/3rdparty/webkit/WebCore/html/DataGridColumnList.h48
-rw-r--r--src/3rdparty/webkit/WebCore/html/DataGridColumnList.idl45
-rw-r--r--src/3rdparty/webkit/WebCore/html/DataGridDataSource.h46
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLAppletElement.idl4
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLAttributeNames.in30
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLBodyElement.cpp110
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLBodyElement.h28
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLBodyElement.idl31
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLDataGridCellElement.cpp91
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLDataGridCellElement.h58
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLDataGridCellElement.idl41
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLDataGridColElement.cpp102
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLDataGridColElement.h58
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLDataGridColElement.idl40
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLDataGridElement.cpp104
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLDataGridElement.h71
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLDataGridElement.idl40
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLDataGridRowElement.cpp78
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLDataGridRowElement.h52
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLDataGridRowElement.idl37
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLElement.cpp3
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLElement.idl12
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLElementsAllInOne.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLEmbedElement.idl4
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLFormControlElement.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLFrameSetElement.cpp134
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLFrameSetElement.h37
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLFrameSetElement.idl29
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLImageElement.idl18
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLInputElement.cpp8
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLLinkElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLMediaElement.cpp148
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLMediaElement.h21
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLMediaElement.idl3
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLObjectElement.idl4
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLParser.cpp1
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLSelectElement.cpp9
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLSelectElement.h3
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLStyleElement.cpp3
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLTableColElement.cpp9
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLTagNames.in4
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLTokenizer.cpp64
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLTokenizer.h4
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLVideoElement.cpp14
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLVideoElement.h6
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLViewSourceDocument.cpp13
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLViewSourceDocument.h5
53 files changed, 1936 insertions, 129 deletions
diff --git a/src/3rdparty/webkit/WebCore/html/CanvasRenderingContext2D.cpp b/src/3rdparty/webkit/WebCore/html/CanvasRenderingContext2D.cpp
index b321b40..37f4799 100644
--- a/src/3rdparty/webkit/WebCore/html/CanvasRenderingContext2D.cpp
+++ b/src/3rdparty/webkit/WebCore/html/CanvasRenderingContext2D.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
* Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
* Copyright (C) 2007 Alp Toker <alp@atoker.com>
* Copyright (C) 2008 Eric Seidel <eric@webkit.org>
@@ -56,6 +56,7 @@
#include "Settings.h"
#include "StrokeStyleApplier.h"
#include "TextMetrics.h"
+#include "HTMLVideoElement.h"
#include <stdio.h>
#include <wtf/ByteArray.h>
@@ -96,6 +97,9 @@ CanvasRenderingContext2D::CanvasRenderingContext2D(HTMLCanvasElement* canvas)
: m_canvas(canvas)
, m_stateStack(1)
{
+ // Make sure that even if the drawingContext() has a different default
+ // thickness, it is in sync with the canvas thickness.
+ setLineWidth(lineWidth());
}
void CanvasRenderingContext2D::ref()
@@ -909,6 +913,15 @@ static IntSize size(HTMLImageElement* image)
return IntSize();
}
+#if ENABLE(VIDEO)
+static IntSize size(HTMLVideoElement* video)
+{
+ if (MediaPlayer* player = video->player())
+ return player->naturalSize();
+ return IntSize();
+}
+#endif
+
static inline FloatRect normalizeRect(const FloatRect& rect)
{
return FloatRect(min(rect.x(), rect.right()),
@@ -917,6 +930,20 @@ static inline FloatRect normalizeRect(const FloatRect& rect)
max(rect.height(), -rect.height()));
}
+void CanvasRenderingContext2D::checkOrigin(const KURL& url)
+{
+ RefPtr<SecurityOrigin> origin = SecurityOrigin::create(url);
+ if (!m_canvas->document()->securityOrigin()->canAccess(origin.get()))
+ m_canvas->setOriginTainted();
+}
+
+void CanvasRenderingContext2D::checkOrigin(const String& url)
+{
+ RefPtr<SecurityOrigin> origin = SecurityOrigin::createFromString(url);
+ if (!m_canvas->document()->securityOrigin()->canAccess(origin.get()))
+ m_canvas->setOriginTainted();
+}
+
void CanvasRenderingContext2D::drawImage(HTMLImageElement* image, float x, float y)
{
ASSERT(image);
@@ -933,13 +960,6 @@ void CanvasRenderingContext2D::drawImage(HTMLImageElement* image,
drawImage(image, FloatRect(0, 0, s.width(), s.height()), FloatRect(x, y, width, height), ec);
}
-void CanvasRenderingContext2D::checkOrigin(const KURL& url)
-{
- RefPtr<SecurityOrigin> origin = SecurityOrigin::create(url);
- if (!m_canvas->document()->securityOrigin()->canAccess(origin.get()))
- m_canvas->setOriginTainted();
-}
-
void CanvasRenderingContext2D::drawImage(HTMLImageElement* image, const FloatRect& srcRect, const FloatRect& dstRect,
ExceptionCode& ec)
{
@@ -1030,6 +1050,64 @@ void CanvasRenderingContext2D::drawImage(HTMLCanvasElement* canvas, const FloatR
// FIXME: Arguably willDraw should become didDraw and occur after drawing calls and not before them to avoid problems like this.
}
+#if ENABLE(VIDEO)
+void CanvasRenderingContext2D::drawImage(HTMLVideoElement* video, float x, float y)
+{
+ ASSERT(video);
+ IntSize s = size(video);
+ ExceptionCode ec;
+ drawImage(video, x, y, s.width(), s.height(), ec);
+}
+
+void CanvasRenderingContext2D::drawImage(HTMLVideoElement* video,
+ float x, float y, float width, float height, ExceptionCode& ec)
+{
+ ASSERT(video);
+ IntSize s = size(video);
+ drawImage(video, FloatRect(0, 0, s.width(), s.height()), FloatRect(x, y, width, height), ec);
+}
+
+void CanvasRenderingContext2D::drawImage(HTMLVideoElement* video, const FloatRect& srcRect, const FloatRect& dstRect,
+ ExceptionCode& ec)
+{
+ ASSERT(video);
+
+ ec = 0;
+ FloatRect videoRect = FloatRect(FloatPoint(), size(video));
+ if (!videoRect.contains(normalizeRect(srcRect)) || srcRect.width() == 0 || srcRect.height() == 0) {
+ ec = INDEX_SIZE_ERR;
+ return;
+ }
+
+ if (!dstRect.width() || !dstRect.height())
+ return;
+
+ GraphicsContext* c = drawingContext();
+ if (!c)
+ return;
+ if (!state().m_invertibleCTM)
+ return;
+
+ if (m_canvas->originClean())
+ checkOrigin(video->currentSrc());
+
+ if (m_canvas->originClean() && !video->hasSingleSecurityOrigin())
+ m_canvas->setOriginTainted();
+
+ FloatRect sourceRect = c->roundToDevicePixels(srcRect);
+ FloatRect destRect = c->roundToDevicePixels(dstRect);
+ willDraw(destRect);
+
+ c->save();
+ c->clip(destRect);
+ c->translate(destRect.x(), destRect.y());
+ c->scale(FloatSize(destRect.width()/sourceRect.width(), destRect.height()/sourceRect.height()));
+ c->translate(-sourceRect.x(), -sourceRect.y());
+ video->paint(c, IntRect(IntPoint(), size(video)));
+ c->restore();
+}
+#endif
+
// FIXME: Why isn't this just another overload of drawImage? Why have a different name?
void CanvasRenderingContext2D::drawImageFromRect(HTMLImageElement* image,
float sx, float sy, float sw, float sh,
diff --git a/src/3rdparty/webkit/WebCore/html/CanvasRenderingContext2D.h b/src/3rdparty/webkit/WebCore/html/CanvasRenderingContext2D.h
index d74659e..f6baa70 100644
--- a/src/3rdparty/webkit/WebCore/html/CanvasRenderingContext2D.h
+++ b/src/3rdparty/webkit/WebCore/html/CanvasRenderingContext2D.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
+ * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -47,6 +47,7 @@ namespace WebCore {
class GraphicsContext;
class HTMLCanvasElement;
class HTMLImageElement;
+ class HTMLVideoElement;
class ImageData;
class KURL;
class TextMetrics;
@@ -159,6 +160,11 @@ namespace WebCore {
void drawImage(HTMLCanvasElement*, float x, float y);
void drawImage(HTMLCanvasElement*, float x, float y, float width, float height, ExceptionCode&);
void drawImage(HTMLCanvasElement*, const FloatRect& srcRect, const FloatRect& dstRect, ExceptionCode&);
+#if ENABLE(VIDEO)
+ void drawImage(HTMLVideoElement*, float x, float y);
+ void drawImage(HTMLVideoElement*, float x, float y, float width, float height, ExceptionCode&);
+ void drawImage(HTMLVideoElement*, const FloatRect& srcRect, const FloatRect& dstRect, ExceptionCode&);
+#endif
void drawImageFromRect(HTMLImageElement*, float sx, float sy, float sw, float sh,
float dx, float dy, float dw, float dh, const String& compositeOperation);
@@ -254,6 +260,7 @@ namespace WebCore {
void prepareGradientForDashboard(CanvasGradient* gradient) const;
void checkOrigin(const KURL&);
+ void checkOrigin(const String&);
HTMLCanvasElement* m_canvas;
Vector<State, 1> m_stateStack;
diff --git a/src/3rdparty/webkit/WebCore/html/DataGridColumn.cpp b/src/3rdparty/webkit/WebCore/html/DataGridColumn.cpp
new file mode 100644
index 0000000..136c08e
--- /dev/null
+++ b/src/3rdparty/webkit/WebCore/html/DataGridColumn.cpp
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2009 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "DataGridColumn.h"
+
+#include "DataGridColumnList.h"
+
+namespace WebCore {
+
+void DataGridColumn::setPrimary(bool primary)
+{
+ if (m_primary != primary) {
+ m_primary = primary;
+ if (m_columns)
+ m_columns->primaryColumnChanged(this);
+ }
+}
+
+} // namespace WebCore
diff --git a/src/3rdparty/webkit/WebCore/html/DataGridColumn.h b/src/3rdparty/webkit/WebCore/html/DataGridColumn.h
new file mode 100644
index 0000000..8e63cd6
--- /dev/null
+++ b/src/3rdparty/webkit/WebCore/html/DataGridColumn.h
@@ -0,0 +1,90 @@
+/*
+ * Copyright (C) 2009 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef DataGridColumn_h
+#define DataGridColumn_h
+
+#include "AtomicString.h"
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefCounted.h>
+
+namespace WebCore {
+
+class DataGridColumnList;
+
+class DataGridColumn : public RefCounted<DataGridColumn> {
+public:
+ static PassRefPtr<DataGridColumn> create(DataGridColumnList* columns, const String& columnID, const String& label, const String& type, bool primary, unsigned short sortable)
+ {
+ return new DataGridColumn(columns, columnID, label, type, primary, sortable);
+ }
+
+ const AtomicString& id() const { return m_id; }
+ void setId(const AtomicString& id) { m_id = id; }
+
+ const AtomicString& label() const { return m_label; }
+ void setLabel(const AtomicString& label) { m_label = label; }
+
+ const AtomicString& type() const { return m_type; }
+ void setType(const AtomicString& type) { m_type = type; }
+
+ unsigned short sortable() const { return m_sortable; }
+ void setSortable(unsigned short sortable) { m_sortable = sortable; }
+
+ unsigned short sortDirection() const { return m_sortDirection; }
+ void setSortDirection(unsigned short sortDirection) { m_sortDirection = sortDirection; }
+
+ bool primary() const { return m_primary; }
+ void setPrimary(bool);
+
+ void detachFromColumnList() { m_columns = 0; }
+
+private:
+ DataGridColumn(DataGridColumnList* columns, const String& columnID, const String& label, const String& type, bool primary, unsigned short sortable)
+ : m_columns(columns)
+ , m_id(columnID)
+ , m_label(label)
+ , m_type(type)
+ , m_primary(primary)
+ , m_sortable(sortable)
+ , m_sortDirection(0)
+ {
+ }
+
+ DataGridColumnList* m_columns; // Not refcounted. The columns list will null out our reference when it goes away.
+
+ AtomicString m_id;
+ AtomicString m_label;
+ AtomicString m_type;
+
+ bool m_primary;
+
+ unsigned short m_sortable;
+ unsigned short m_sortDirection;
+};
+
+} // namespace WebCore
+
+#endif // DataGridColumn_h
diff --git a/src/3rdparty/webkit/WebCore/html/DataGridColumn.idl b/src/3rdparty/webkit/WebCore/html/DataGridColumn.idl
new file mode 100644
index 0000000..04418a1
--- /dev/null
+++ b/src/3rdparty/webkit/WebCore/html/DataGridColumn.idl
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2009 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+module html {
+
+ interface [
+ GenerateConstructor
+ ] DataGridColumn {
+ attribute DOMString id; // The identifier for the column.
+ attribute DOMString label; // The text to display in the column.
+ attribute DOMString type; // The type of data displayed in this column.
+
+ const unsigned short NEVER_SORTED = 0;
+ const unsigned short ALWAYS_SORTED = 1;
+ const unsigned short SOMETIMES_SORTED = 2;
+ attribute unsigned short sortable; // Whether or not the column can be sorted.
+
+ const unsigned short NATURAL_SORT = 0;
+ const unsigned short SORT_ASCENDING = 1;
+ const unsigned short SORC_DESCENDING = 2;
+ attribute unsigned short sortDirection; // The sort direction for the column. Valid values are ascending, descending and natural (no sort applied).
+
+ attribute boolean primary; // Whether or not this is the primary column of the tree (this will be where the disclosure triangle and connecting tree lines will display)
+ };
+
+}
diff --git a/src/3rdparty/webkit/WebCore/html/DataGridColumnList.cpp b/src/3rdparty/webkit/WebCore/html/DataGridColumnList.cpp
new file mode 100644
index 0000000..48f7d60
--- /dev/null
+++ b/src/3rdparty/webkit/WebCore/html/DataGridColumnList.cpp
@@ -0,0 +1,98 @@
+/*
+ * Copyright (C) 2009 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "DataGridColumnList.h"
+
+#include "AtomicString.h"
+#include "PlatformString.h"
+
+namespace WebCore {
+
+DataGridColumnList::~DataGridColumnList()
+{
+ clear();
+}
+
+DataGridColumn* DataGridColumnList::itemWithName(const AtomicString& name) const
+{
+ unsigned length = m_columns.size();
+ for (unsigned i = 0; i < length; ++i) {
+ if (m_columns[i]->id() == name)
+ return m_columns[i].get();
+ }
+ return 0;
+}
+
+DataGridColumn* DataGridColumnList::add(const String& id, const String& label, const String& type, bool primary, unsigned short sortable)
+{
+ RefPtr<DataGridColumn> column = DataGridColumn::create(this, id, label, type, primary, sortable);
+ if (primary)
+ m_primaryColumn = column;
+ m_columns.append(column);
+ return column.get();
+}
+
+void DataGridColumnList::remove(DataGridColumn* col)
+{
+ size_t index = m_columns.find(col);
+ if (index == notFound)
+ return;
+ m_columns.remove(index);
+ if (col == m_primaryColumn)
+ m_primaryColumn = 0;
+ if (col == m_sortColumn)
+ m_sortColumn = 0;
+}
+
+void DataGridColumnList::move(DataGridColumn* col, unsigned long index)
+{
+ size_t colIndex = m_columns.find(col);
+ if (colIndex == notFound)
+ return;
+ m_columns.insert(index, col);
+}
+
+void DataGridColumnList::clear()
+{
+ unsigned length = m_columns.size();
+ for (unsigned i = 0; i < length; ++i)
+ m_columns[i]->detachFromColumnList();
+ m_columns.clear();
+ m_primaryColumn = 0;
+ m_sortColumn = 0;
+}
+
+void DataGridColumnList::primaryColumnChanged(DataGridColumn* col)
+{
+ if (col->primary())
+ m_primaryColumn = col;
+ else if (m_primaryColumn = col)
+ m_primaryColumn = 0;
+
+ // FIXME: Invalidate the tree.
+}
+
+} // namespace WebCore
diff --git a/src/3rdparty/webkit/WebCore/html/DataGridColumnList.h b/src/3rdparty/webkit/WebCore/html/DataGridColumnList.h
new file mode 100644
index 0000000..d0caebe
--- /dev/null
+++ b/src/3rdparty/webkit/WebCore/html/DataGridColumnList.h
@@ -0,0 +1,48 @@
+#ifndef DataGridColumnList_h
+#define DataGridColumnList_h
+
+#include "DataGridColumn.h"
+
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefCounted.h>
+#include <wtf/Vector.h>
+
+namespace WebCore {
+
+class AtomicString;
+
+class DataGridColumnList : public RefCounted<DataGridColumnList> {
+ friend class DataGridColumn;
+public:
+ static PassRefPtr<DataGridColumnList> create()
+ {
+ return new DataGridColumnList();
+ }
+
+ ~DataGridColumnList();
+
+ unsigned length() const { return m_columns.size(); }
+
+ DataGridColumn* item(unsigned index) const { return m_columns[index].get(); }
+ DataGridColumn* itemWithName(const AtomicString&) const;
+
+ DataGridColumn* primaryColumn() const { return m_primaryColumn.get(); }
+
+ DataGridColumn* sortColumn() const { return m_sortColumn.get(); }
+
+ DataGridColumn* add(const String& id, const String& label, const String& type, bool primary, unsigned short sortable);
+ void remove(DataGridColumn*);
+ void move(DataGridColumn*, unsigned long index);
+ void clear();
+
+private:
+ void primaryColumnChanged(DataGridColumn* col);
+
+ Vector<RefPtr<DataGridColumn> > m_columns;
+ RefPtr<DataGridColumn> m_primaryColumn;
+ RefPtr<DataGridColumn> m_sortColumn;
+};
+
+} // namespace WebCore
+
+#endif // DataGridColumnList_h
diff --git a/src/3rdparty/webkit/WebCore/html/DataGridColumnList.idl b/src/3rdparty/webkit/WebCore/html/DataGridColumnList.idl
new file mode 100644
index 0000000..cab4339
--- /dev/null
+++ b/src/3rdparty/webkit/WebCore/html/DataGridColumnList.idl
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2009 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+module html {
+
+ interface [
+ GenerateConstructor,
+ HasIndexGetter,
+ HasNameGetter
+ ] DataGridColumnList {
+ DataGridColumn item(in [IsIndex] unsigned long index);
+ readonly attribute unsigned long length;
+
+ readonly attribute DataGridColumn sortColumn;
+ readonly attribute DataGridColumn primaryColumn;
+
+ DataGridColumn add(in DOMString id, in DOMString label, in DOMString type, in boolean primary, in unsigned short sortable);
+ void remove(in DataGridColumn column);
+ void move(in DataGridColumn column, in unsigned long index);
+ void clear();
+ };
+
+}
diff --git a/src/3rdparty/webkit/WebCore/html/DataGridDataSource.h b/src/3rdparty/webkit/WebCore/html/DataGridDataSource.h
new file mode 100644
index 0000000..0c9a24d
--- /dev/null
+++ b/src/3rdparty/webkit/WebCore/html/DataGridDataSource.h
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2009 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef DataGridDataSource_h
+#define DataGridDataSource_h
+
+#include <wtf/RefCounted.h>
+
+namespace WebCore {
+
+class HTMLDataGridElement;
+
+class DataGridDataSource : public RefCounted<DataGridDataSource> {
+public:
+ virtual ~DataGridDataSource() { }
+
+ virtual bool isJSDataGridDataSource() const { return false; }
+
+ virtual void initialize(HTMLDataGridElement*) = 0;
+};
+
+} // namespace WebCore
+
+#endif // DataGridDataSource_h
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLAppletElement.idl b/src/3rdparty/webkit/WebCore/html/HTMLAppletElement.idl
index 95f03a7..da7a33a 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLAppletElement.idl
+++ b/src/3rdparty/webkit/WebCore/html/HTMLAppletElement.idl
@@ -22,8 +22,8 @@ module html {
interface [
GenerateConstructor,
- CustomPutFunction,
- CustomGetOwnPropertySlot,
+ DelegatingPutFunction,
+ DelegatingGetOwnPropertySlot,
CustomCall,
HasOverridingNameGetter,
InterfaceUUID=9b5cb4a8-c156-4b55-afdb-c60938a4d1b1,
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLAttributeNames.in b/src/3rdparty/webkit/WebCore/html/HTMLAttributeNames.in
index edd9511..a29d6d2 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLAttributeNames.in
+++ b/src/3rdparty/webkit/WebCore/html/HTMLAttributeNames.in
@@ -15,10 +15,13 @@ archive
aria-activedescendant
aria-checked
aria-describedby
+aria-disabled
+aria-hidden
aria-labeledby
aria-labelledby
aria-level
aria-pressed
+aria-readonly
aria-valuemax
aria-valuemin
aria-valuenow
@@ -67,7 +70,9 @@ direction
disabled
enctype
end
+expanded
face
+focused
for
frame
frameborder
@@ -80,6 +85,7 @@ hspace
http_equiv
id
incremental
+indeterminate
ismap
keytype
label
@@ -115,6 +121,8 @@ onbeforecut
onbeforepaste
onbeforeunload
onblur
+oncanplay
+oncanplaythrough
onchange
onclick
oncontextmenu
@@ -128,6 +136,9 @@ ondragleave
ondragover
ondragstart
ondrop
+ondurationchange
+onemptied
+onended
onerror
onfocus
oninput
@@ -135,6 +146,9 @@ onkeydown
onkeypress
onkeyup
onload
+onloadeddata
+onloadedmetadata
+onloadstart
onmousedown
onmousemove
onmouseout
@@ -144,15 +158,27 @@ onmousewheel
ononline
onoffline
onpaste
+onpause
+onplay
+onplaying
+onprogress
+onratechange
onreset
onresize
onscroll
onsearch
+onseeked
+onseeking
onselect
onselectstart
+onstalled
onstorage
+onsuspend
onsubmit
+ontimeupdate
onunload
+onvolumechange
+onwaiting
onwebkitanimationstart
onwebkitanimationiteration
onwebkitanimationend
@@ -161,7 +187,9 @@ placeholder
pluginurl
poster
precision
+primary
profile
+progress
prompt
readonly
rel
@@ -179,6 +207,8 @@ scrolling
selected
shape
size
+sortable
+sortdirection
span
spellcheck
src
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLBodyElement.cpp b/src/3rdparty/webkit/WebCore/html/HTMLBodyElement.cpp
index 9828dab..74c7c9e 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLBodyElement.cpp
+++ b/src/3rdparty/webkit/WebCore/html/HTMLBodyElement.cpp
@@ -330,4 +330,114 @@ void HTMLBodyElement::didMoveToNewOwnerDocument()
HTMLElement::didMoveToNewOwnerDocument();
}
+EventListener* HTMLBodyElement::onblur() const
+{
+ return document()->getWindowAttributeEventListener(eventNames().blurEvent);
}
+
+void HTMLBodyElement::setOnblur(PassRefPtr<EventListener> eventListener)
+{
+ document()->setAttributeEventListener(eventNames().blurEvent, eventListener);
+}
+
+EventListener* HTMLBodyElement::onerror() const
+{
+ return document()->getWindowAttributeEventListener(eventNames().errorEvent);
+}
+
+void HTMLBodyElement::setOnerror(PassRefPtr<EventListener> eventListener)
+{
+ document()->setAttributeEventListener(eventNames().errorEvent, eventListener);
+}
+
+EventListener* HTMLBodyElement::onfocus() const
+{
+ return document()->getWindowAttributeEventListener(eventNames().focusEvent);
+}
+
+void HTMLBodyElement::setOnfocus(PassRefPtr<EventListener> eventListener)
+{
+ document()->setAttributeEventListener(eventNames().focusEvent, eventListener);
+}
+
+EventListener* HTMLBodyElement::onload() const
+{
+ return document()->getWindowAttributeEventListener(eventNames().loadEvent);
+}
+
+void HTMLBodyElement::setOnload(PassRefPtr<EventListener> eventListener)
+{
+ document()->setAttributeEventListener(eventNames().loadEvent, eventListener);
+}
+
+EventListener* HTMLBodyElement::onbeforeunload() const
+{
+ return document()->getWindowAttributeEventListener(eventNames().beforeunloadEvent);
+}
+
+void HTMLBodyElement::setOnbeforeunload(PassRefPtr<EventListener> eventListener)
+{
+ document()->setAttributeEventListener(eventNames().beforeunloadEvent, eventListener);
+}
+
+EventListener* HTMLBodyElement::onmessage() const
+{
+ return document()->getWindowAttributeEventListener(eventNames().messageEvent);
+}
+
+void HTMLBodyElement::setOnmessage(PassRefPtr<EventListener> eventListener)
+{
+ document()->setAttributeEventListener(eventNames().messageEvent, eventListener);
+}
+
+EventListener* HTMLBodyElement::onoffline() const
+{
+ return document()->getWindowAttributeEventListener(eventNames().offlineEvent);
+}
+
+void HTMLBodyElement::setOnoffline(PassRefPtr<EventListener> eventListener)
+{
+ document()->setAttributeEventListener(eventNames().offlineEvent, eventListener);
+}
+
+EventListener* HTMLBodyElement::ononline() const
+{
+ return document()->getWindowAttributeEventListener(eventNames().onlineEvent);
+}
+
+void HTMLBodyElement::setOnonline(PassRefPtr<EventListener> eventListener)
+{
+ document()->setAttributeEventListener(eventNames().onlineEvent, eventListener);
+}
+
+EventListener* HTMLBodyElement::onresize() const
+{
+ return document()->getWindowAttributeEventListener(eventNames().resizeEvent);
+}
+
+void HTMLBodyElement::setOnresize(PassRefPtr<EventListener> eventListener)
+{
+ document()->setAttributeEventListener(eventNames().resizeEvent, eventListener);
+}
+
+EventListener* HTMLBodyElement::onstorage() const
+{
+ return document()->getWindowAttributeEventListener(eventNames().storageEvent);
+}
+
+void HTMLBodyElement::setOnstorage(PassRefPtr<EventListener> eventListener)
+{
+ document()->setAttributeEventListener(eventNames().storageEvent, eventListener);
+}
+
+EventListener* HTMLBodyElement::onunload() const
+{
+ return document()->getWindowAttributeEventListener(eventNames().unloadEvent);
+}
+
+void HTMLBodyElement::setOnunload(PassRefPtr<EventListener> eventListener)
+{
+ document()->setAttributeEventListener(eventNames().unloadEvent, eventListener);
+}
+
+} // namespace WebCore
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLBodyElement.h b/src/3rdparty/webkit/WebCore/html/HTMLBodyElement.h
index 8e434be..274a675 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLBodyElement.h
+++ b/src/3rdparty/webkit/WebCore/html/HTMLBodyElement.h
@@ -30,8 +30,7 @@
namespace WebCore {
-class HTMLBodyElement : public HTMLElement
-{
+class HTMLBodyElement : public HTMLElement {
public:
HTMLBodyElement(const QualifiedName&, Document*);
~HTMLBodyElement();
@@ -61,6 +60,31 @@ public:
String vLink() const;
void setVLink(const String&);
+ // Event handler attributes
+ virtual EventListener* onblur() const;
+ virtual void setOnblur(PassRefPtr<EventListener>);
+ virtual EventListener* onerror() const;
+ virtual void setOnerror(PassRefPtr<EventListener>);
+ virtual EventListener* onfocus() const;
+ virtual void setOnfocus(PassRefPtr<EventListener>);
+ virtual EventListener* onload() const;
+ virtual void setOnload(PassRefPtr<EventListener>);
+
+ EventListener* onbeforeunload() const;
+ void setOnbeforeunload(PassRefPtr<EventListener>);
+ EventListener* onmessage() const;
+ void setOnmessage(PassRefPtr<EventListener>);
+ EventListener* onoffline() const;
+ void setOnoffline(PassRefPtr<EventListener>);
+ EventListener* ononline() const;
+ void setOnonline(PassRefPtr<EventListener>);
+ EventListener* onresize() const;
+ void setOnresize(PassRefPtr<EventListener>);
+ EventListener* onstorage() const;
+ void setOnstorage(PassRefPtr<EventListener>);
+ EventListener* onunload() const;
+ void setOnunload(PassRefPtr<EventListener>);
+
virtual int scrollLeft() const;
virtual void setScrollLeft(int scrollLeft);
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLBodyElement.idl b/src/3rdparty/webkit/WebCore/html/HTMLBodyElement.idl
index c639183..fa3fef9 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLBodyElement.idl
+++ b/src/3rdparty/webkit/WebCore/html/HTMLBodyElement.idl
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006 Apple Computer, Inc.
+ * Copyright (C) 2006, 2009 Apple Inc. All rights reserved.
* Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
*
* This library is free software; you can redistribute it and/or
@@ -30,7 +30,34 @@ module html {
attribute [ConvertNullToNullString] DOMString bgColor;
attribute [ConvertNullToNullString] DOMString link;
attribute [ConvertNullToNullString] DOMString text;
- attribute [ConvertNullToNullString] DOMString vLink;
+ attribute [ConvertNullToNullString] DOMString vLink;
+
+#if !defined(LANGUAGE_OBJECTIVE_C) || !LANGUAGE_OBJECTIVE_C
+#if !defined(LANGUAGE_COM) || !LANGUAGE_COM
+ // Event handler attributes
+ attribute [DontEnum] EventListener onbeforeunload;
+ attribute [DontEnum] EventListener onmessage;
+ attribute [DontEnum] EventListener onoffline;
+ attribute [DontEnum] EventListener ononline;
+ attribute [DontEnum] EventListener onresize;
+ attribute [DontEnum] EventListener onstorage;
+ attribute [DontEnum] EventListener onunload;
+
+ // Overrides of Element attributes.
+ // attribute [DontEnum] EventListener onblur;
+ // attribute [DontEnum] EventListener onerror;
+ // attribute [DontEnum] EventListener onfocus;
+ // attribute [DontEnum] EventListener onload;
+
+ // Not implemented yet.
+ // attribute [DontEnum] EventListener onafterprint;
+ // attribute [DontEnum] EventListener onbeforeprint;
+ // attribute [DontEnum] EventListener onhashchange;
+ // attribute [DontEnum] EventListener onpopstate;
+ // attribute [DontEnum] EventListener onredo;
+ // attribute [DontEnum] EventListener onundo;
+#endif
+#endif
};
}
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLDataGridCellElement.cpp b/src/3rdparty/webkit/WebCore/html/HTMLDataGridCellElement.cpp
new file mode 100644
index 0000000..d06ad82
--- /dev/null
+++ b/src/3rdparty/webkit/WebCore/html/HTMLDataGridCellElement.cpp
@@ -0,0 +1,91 @@
+/*
+ * Copyright (C) 2009 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "HTMLDataGridCellElement.h"
+
+#include "HTMLNames.h"
+#include "Text.h"
+
+namespace WebCore {
+
+using namespace HTMLNames;
+
+HTMLDataGridCellElement::HTMLDataGridCellElement(const QualifiedName& name, Document* doc)
+ : HTMLElement(name, doc)
+{
+}
+
+String HTMLDataGridCellElement::label() const
+{
+ return getAttribute(labelAttr);
+}
+
+void HTMLDataGridCellElement::setLabel(const String& label)
+{
+ setAttribute(labelAttr, label);
+}
+
+bool HTMLDataGridCellElement::focused() const
+{
+ return hasAttribute(focusedAttr);
+}
+
+void HTMLDataGridCellElement::setFocused(bool focused)
+{
+ setAttribute(focusedAttr, focused ? "" : 0);
+}
+
+bool HTMLDataGridCellElement::checked() const
+{
+ return hasAttribute(checkedAttr);
+}
+
+void HTMLDataGridCellElement::setChecked(bool checked)
+{
+ setAttribute(checkedAttr, checked ? "" : 0);
+}
+
+bool HTMLDataGridCellElement::indeterminate() const
+{
+ return hasAttribute(indeterminateAttr);
+}
+
+void HTMLDataGridCellElement::setIndeterminate(bool indeterminate)
+{
+ setAttribute(indeterminateAttr, indeterminate ? "" : 0);
+}
+
+float HTMLDataGridCellElement::progress() const
+{
+ return getAttribute(progressAttr).toInt();
+}
+
+void HTMLDataGridCellElement::setProgress(float progress)
+{
+ setAttribute(progressAttr, String::number(progress));
+}
+
+} // namespace WebCore
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLDataGridCellElement.h b/src/3rdparty/webkit/WebCore/html/HTMLDataGridCellElement.h
new file mode 100644
index 0000000..9de6e40
--- /dev/null
+++ b/src/3rdparty/webkit/WebCore/html/HTMLDataGridCellElement.h
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2009 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef HTMLDataGridCellElement_h
+#define HTMLDataGridCellElement_h
+
+#include "HTMLElement.h"
+
+namespace WebCore {
+
+class HTMLDataGridCellElement : public HTMLElement {
+public:
+ HTMLDataGridCellElement(const QualifiedName&, Document*);
+
+ virtual HTMLTagStatus endTagRequirement() const { return TagStatusForbidden; }
+ virtual int tagPriority() const { return 0; }
+
+ String label() const;
+ void setLabel(const String&);
+
+ bool focused() const;
+ void setFocused(bool);
+
+ bool checked() const;
+ void setChecked(bool);
+
+ bool indeterminate() const;
+ void setIndeterminate(bool);
+
+ float progress() const;
+ void setProgress(float);
+};
+
+} // namespace WebCore
+
+#endif // HTMLDataGridCellElement_h
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLDataGridCellElement.idl b/src/3rdparty/webkit/WebCore/html/HTMLDataGridCellElement.idl
new file mode 100644
index 0000000..4d15f6f
--- /dev/null
+++ b/src/3rdparty/webkit/WebCore/html/HTMLDataGridCellElement.idl
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2009 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+module html {
+
+ interface [
+ GenerateConstructor
+ ] HTMLDataGridCellElement : HTMLElement {
+ attribute DOMString label; // The text to display in the column, assuming the type supports text.
+
+ attribute boolean focused; // Whether or not this cell is currently focused.
+
+ attribute boolean checked; // The checked state of the column, assuming the type of the column is checkbox.
+ attribute boolean indeterminate; // If the checked state is indeterminate.
+
+ attribute float progress; // For progress cells, a value from 0-1.0 indicating the state of progress.
+ };
+
+}
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLDataGridColElement.cpp b/src/3rdparty/webkit/WebCore/html/HTMLDataGridColElement.cpp
new file mode 100644
index 0000000..b209447
--- /dev/null
+++ b/src/3rdparty/webkit/WebCore/html/HTMLDataGridColElement.cpp
@@ -0,0 +1,102 @@
+/*
+ * Copyright (C) 2009 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "HTMLDataGridColElement.h"
+
+#include "HTMLNames.h"
+#include "Text.h"
+
+namespace WebCore {
+
+using namespace HTMLNames;
+
+HTMLDataGridColElement::HTMLDataGridColElement(const QualifiedName& name, Document* doc)
+ : HTMLElement(name, doc)
+{
+}
+
+String HTMLDataGridColElement::label() const
+{
+ return getAttribute(labelAttr);
+}
+
+void HTMLDataGridColElement::setLabel(const String& label)
+{
+ setAttribute(labelAttr, label);
+}
+
+String HTMLDataGridColElement::type() const
+{
+ return getAttribute(typeAttr);
+}
+
+void HTMLDataGridColElement::setType(const String& type)
+{
+ setAttribute(typeAttr, type);
+}
+
+unsigned short HTMLDataGridColElement::sortable() const
+{
+ return hasAttribute(sortableAttr);
+}
+
+void HTMLDataGridColElement::setSortable(unsigned short sortable)
+{
+ setAttribute(sortableAttr, sortable ? "" : 0);
+}
+
+unsigned short HTMLDataGridColElement::sortDirection() const
+{
+ String sortDirection = getAttribute(sortdirectionAttr);
+ if (equalIgnoringCase(sortDirection, "ascending"))
+ return 1;
+ if (equalIgnoringCase(sortDirection, "descending"))
+ return 2;
+ return 0;
+}
+
+void HTMLDataGridColElement::setSortDirection(unsigned short sortDirection)
+{
+ // FIXME: Check sortable rules.
+ if (sortDirection == 0)
+ setAttribute(sortdirectionAttr, "natural");
+ else if (sortDirection == 1)
+ setAttribute(sortdirectionAttr, "ascending");
+ else if (sortDirection == 2)
+ setAttribute(sortdirectionAttr, "descending");
+}
+
+bool HTMLDataGridColElement::primary() const
+{
+ return hasAttribute(primaryAttr);
+}
+
+void HTMLDataGridColElement::setPrimary(bool primary)
+{
+ setAttribute(primaryAttr, primary ? "" : 0);
+}
+
+} // namespace WebCore
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLDataGridColElement.h b/src/3rdparty/webkit/WebCore/html/HTMLDataGridColElement.h
new file mode 100644
index 0000000..87133cc
--- /dev/null
+++ b/src/3rdparty/webkit/WebCore/html/HTMLDataGridColElement.h
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2009 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef HTMLDataGridColElement_h
+#define HTMLDataGridColElement_h
+
+#include "HTMLElement.h"
+
+namespace WebCore {
+
+class HTMLDataGridColElement : public HTMLElement {
+public:
+ HTMLDataGridColElement(const QualifiedName&, Document*);
+
+ virtual HTMLTagStatus endTagRequirement() const { return TagStatusForbidden; }
+ virtual int tagPriority() const { return 0; }
+
+ String label() const;
+ void setLabel(const String&);
+
+ String type() const;
+ void setType(const String&);
+
+ unsigned short sortable() const;
+ void setSortable(unsigned short);
+
+ unsigned short sortDirection() const;
+ void setSortDirection(unsigned short);
+
+ bool primary() const;
+ void setPrimary(bool);
+};
+
+} // namespace WebCore
+
+#endif // HTMLDataGridColElement_h
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLDataGridColElement.idl b/src/3rdparty/webkit/WebCore/html/HTMLDataGridColElement.idl
new file mode 100644
index 0000000..c72751c
--- /dev/null
+++ b/src/3rdparty/webkit/WebCore/html/HTMLDataGridColElement.idl
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2009 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+module html {
+
+ interface [
+ GenerateConstructor
+ ] HTMLDataGridColElement : HTMLElement {
+ attribute DOMString label; // The text to display in the column.
+ attribute DOMString type; // The type of data displayed in this column.
+
+ attribute unsigned short sortable; // Whether or not the column can be sorted. Values are none, ascending/descending, and ascending/descending/na
+ attribute unsigned short sortDirection; // The sort direction for the column. Valid values are ascending, descending and natural (no sort applied).
+
+ attribute boolean primary; // Whether or not this is the primary column of the tree (this will be where the disclosure triangle and connecting tree lines will display)
+ };
+
+}
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLDataGridElement.cpp b/src/3rdparty/webkit/WebCore/html/HTMLDataGridElement.cpp
new file mode 100644
index 0000000..2d9f852
--- /dev/null
+++ b/src/3rdparty/webkit/WebCore/html/HTMLDataGridElement.cpp
@@ -0,0 +1,104 @@
+/*
+ * Copyright (C) 2009 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "HTMLDataGridElement.h"
+
+#include "HTMLNames.h"
+#include "RenderDataGrid.h"
+#include "Text.h"
+
+namespace WebCore {
+
+using namespace HTMLNames;
+
+HTMLDataGridElement::HTMLDataGridElement(const QualifiedName& tagName, Document* document)
+ : HTMLElement(tagName, document)
+ , m_initializationTimer(this, &HTMLDataGridElement::initializationTimerFired)
+{
+ m_columns = DataGridColumnList::create();
+}
+
+HTMLDataGridElement::~HTMLDataGridElement()
+{
+}
+
+bool HTMLDataGridElement::checkDTD(const Node* newChild)
+{
+ if (newChild->isTextNode())
+ return static_cast<const Text*>(newChild)->containsOnlyWhitespace();
+ return newChild->hasTagName(dcolTag) || newChild->hasTagName(drowTag);
+}
+
+RenderObject* HTMLDataGridElement::createRenderer(RenderArena* arena, RenderStyle*)
+{
+ return new (arena) RenderDataGrid(this);
+}
+
+bool HTMLDataGridElement::autofocus() const
+{
+ return hasAttribute(autofocusAttr);
+}
+
+void HTMLDataGridElement::setAutofocus(bool autofocus)
+{
+ setAttribute(autofocusAttr, autofocus ? "" : 0);
+}
+
+bool HTMLDataGridElement::disabled() const
+{
+ return hasAttribute(disabledAttr);
+}
+
+void HTMLDataGridElement::setDisabled(bool disabled)
+{
+ setAttribute(disabledAttr, disabled ? "" : 0);
+}
+
+bool HTMLDataGridElement::multiple() const
+{
+ return hasAttribute(multipleAttr);
+}
+
+void HTMLDataGridElement::setMultiple(bool multiple)
+{
+ setAttribute(multipleAttr, multiple ? "" : 0);
+}
+
+void HTMLDataGridElement::setDataSource(PassRefPtr<DataGridDataSource> dataSource)
+{
+ if (m_initializationTimer.isActive())
+ m_initializationTimer.stop();
+
+ m_dataSource = dataSource;
+ m_initializationTimer.startOneShot(0);
+}
+
+void HTMLDataGridElement::initializationTimerFired(Timer<HTMLDataGridElement>*)
+{
+ m_dataSource->initialize(this);
+}
+
+} // namespace WebCore
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLDataGridElement.h b/src/3rdparty/webkit/WebCore/html/HTMLDataGridElement.h
new file mode 100644
index 0000000..646c97e
--- /dev/null
+++ b/src/3rdparty/webkit/WebCore/html/HTMLDataGridElement.h
@@ -0,0 +1,71 @@
+/*
+ * Copyright (C) 2009 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef HTMLDataGridElement_h
+#define HTMLDataGridElement_h
+
+#include "DataGridColumnList.h"
+#include "DataGridDataSource.h"
+#include "HTMLElement.h"
+#include "Timer.h"
+
+namespace WebCore {
+
+class HTMLDataGridElement : public HTMLElement {
+public:
+ HTMLDataGridElement(const QualifiedName&, Document*);
+ virtual ~HTMLDataGridElement();
+
+ virtual int tagPriority() const { return 6; } // Same as <select>s
+ virtual bool checkDTD(const Node*);
+
+ virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
+
+ bool autofocus() const;
+ void setAutofocus(bool);
+
+ bool disabled() const;
+ void setDisabled(bool);
+
+ bool multiple() const;
+ void setMultiple(bool);
+
+ void setDataSource(PassRefPtr<DataGridDataSource>);
+ DataGridDataSource* dataSource() const { return m_dataSource.get(); }
+
+ DataGridColumnList* columns() const { return m_columns.get(); }
+
+private:
+ void initializationTimerFired(Timer<HTMLDataGridElement>*);
+
+ Timer<HTMLDataGridElement> m_initializationTimer;
+ RefPtr<DataGridDataSource> m_dataSource;
+
+ RefPtr<DataGridColumnList> m_columns;
+};
+
+} // namespace WebCore
+
+#endif // HTMLDataGridElement_h
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLDataGridElement.idl b/src/3rdparty/webkit/WebCore/html/HTMLDataGridElement.idl
new file mode 100644
index 0000000..b4b0897
--- /dev/null
+++ b/src/3rdparty/webkit/WebCore/html/HTMLDataGridElement.idl
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2009 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+module html {
+
+ interface [
+ GenerateConstructor
+ ] HTMLDataGridElement : HTMLElement {
+ attribute [Custom] DataGridDataSource dataSource;
+
+ readonly attribute DataGridColumnList columns;
+
+ attribute boolean autofocus; // Whether or not the datagrid should autofocus.
+ attribute boolean disabled; // Whether or not the datagrid can be interacted with.
+ attribute boolean multiple; // Whether or not the datagrid supports multiple selection.
+ };
+
+}
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLDataGridRowElement.cpp b/src/3rdparty/webkit/WebCore/html/HTMLDataGridRowElement.cpp
new file mode 100644
index 0000000..e671806
--- /dev/null
+++ b/src/3rdparty/webkit/WebCore/html/HTMLDataGridRowElement.cpp
@@ -0,0 +1,78 @@
+/*
+ * Copyright (C) 2009 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "HTMLDataGridRowElement.h"
+
+#include "HTMLNames.h"
+#include "Text.h"
+
+namespace WebCore {
+
+using namespace HTMLNames;
+
+HTMLDataGridRowElement::HTMLDataGridRowElement(const QualifiedName& name, Document* doc)
+ : HTMLElement(name, doc)
+{
+}
+
+bool HTMLDataGridRowElement::checkDTD(const Node* newChild)
+{
+ if (newChild->isTextNode())
+ return static_cast<const Text*>(newChild)->containsOnlyWhitespace();
+ return newChild->hasTagName(drowTag) || newChild->hasTagName(dcellTag);
+}
+
+bool HTMLDataGridRowElement::selected() const
+{
+ return hasAttribute(selectedAttr);
+}
+
+void HTMLDataGridRowElement::setSelected(bool selected)
+{
+ setAttribute(selectedAttr, selected ? "" : 0);
+}
+
+bool HTMLDataGridRowElement::focused() const
+{
+ return hasAttribute(focusedAttr);
+}
+
+void HTMLDataGridRowElement::setFocused(bool focused)
+{
+ setAttribute(focusedAttr, focused ? "" : 0);
+}
+
+bool HTMLDataGridRowElement::expanded() const
+{
+ return hasAttribute(expandedAttr);
+}
+
+void HTMLDataGridRowElement::setExpanded(bool expanded)
+{
+ setAttribute(expandedAttr, expanded ? "" : 0);
+}
+
+} // namespace WebCore
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLDataGridRowElement.h b/src/3rdparty/webkit/WebCore/html/HTMLDataGridRowElement.h
new file mode 100644
index 0000000..d911db2
--- /dev/null
+++ b/src/3rdparty/webkit/WebCore/html/HTMLDataGridRowElement.h
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2009 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef HTMLDataGridRowElement_h
+#define HTMLDataGridRowElement_h
+
+#include "HTMLElement.h"
+
+namespace WebCore {
+
+class HTMLDataGridRowElement : public HTMLElement {
+public:
+ HTMLDataGridRowElement(const QualifiedName&, Document*);
+
+ virtual int tagPriority() const { return 2; } // Same as <option>s.
+ virtual bool checkDTD(const Node*);
+
+ bool selected() const;
+ void setSelected(bool);
+
+ bool focused() const;
+ void setFocused(bool);
+
+ bool expanded() const;
+ void setExpanded(bool);
+};
+
+} // namespace WebCore
+
+#endif // HTMLDataGridRowElement_h
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLDataGridRowElement.idl b/src/3rdparty/webkit/WebCore/html/HTMLDataGridRowElement.idl
new file mode 100644
index 0000000..4aeb4d5
--- /dev/null
+++ b/src/3rdparty/webkit/WebCore/html/HTMLDataGridRowElement.idl
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2009 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+module html {
+
+ interface [
+ GenerateConstructor
+ ] HTMLDataGridRowElement : HTMLElement {
+ attribute boolean selected; // Whether or not the row is currently selected.
+ attribute boolean focused; // Whether or not the row is the current object in the tree for keyboard navigation (or as the principal item of a multiple selection).
+
+ attribute boolean expanded; // Whether or not the row is open (if it is, child rows will be shown).
+ };
+
+}
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLElement.cpp b/src/3rdparty/webkit/WebCore/html/HTMLElement.cpp
index 572025a..5655df8 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLElement.cpp
+++ b/src/3rdparty/webkit/WebCore/html/HTMLElement.cpp
@@ -215,6 +215,8 @@ void HTMLElement::parseMappedAttribute(MappedAttribute *attr)
setAttributeEventListener(eventNames().webkitAnimationEndEvent, createAttributeEventListener(this, attr));
} else if (attr->name() == onwebkittransitionendAttr) {
setAttributeEventListener(eventNames().webkitTransitionEndEvent, createAttributeEventListener(this, attr));
+ } else if (attr->name() == oninputAttr) {
+ setAttributeEventListener(eventNames().inputEvent, createAttributeEventListener(this, attr));
}
}
@@ -861,6 +863,7 @@ static HashSet<AtomicStringImpl*>* inlineTagList()
tagList.add(inputTag.localName().impl());
tagList.add(keygenTag.localName().impl());
tagList.add(selectTag.localName().impl());
+ tagList.add(datagridTag.localName().impl());
tagList.add(textareaTag.localName().impl());
tagList.add(labelTag.localName().impl());
tagList.add(buttonTag.localName().impl());
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLElement.idl b/src/3rdparty/webkit/WebCore/html/HTMLElement.idl
index ed21628..38f960a 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLElement.idl
+++ b/src/3rdparty/webkit/WebCore/html/HTMLElement.idl
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
+ * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved.
* Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
*
* This library is free software; you can redistribute it and/or
@@ -29,11 +29,11 @@ module html {
] HTMLElement : Element {
// iht.com relies on id returning the empty string when no id is present.
// Other browsers do this as well. So we don't convert null to JS null.
- attribute [ConvertNullToNullString] DOMString id;
- attribute [ConvertNullToNullString] DOMString title;
- attribute [ConvertNullToNullString] DOMString lang;
- attribute [ConvertNullToNullString] DOMString dir;
- attribute [ConvertNullToNullString] DOMString className;
+ attribute [ConvertNullToNullString, Reflect] DOMString id;
+ attribute [ConvertNullToNullString, Reflect] DOMString title;
+ attribute [ConvertNullToNullString, Reflect] DOMString lang;
+ attribute [ConvertNullToNullString, Reflect] DOMString dir;
+ attribute [ConvertNullToNullString, Reflect=class] DOMString className;
attribute long tabIndex;
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLElementsAllInOne.cpp b/src/3rdparty/webkit/WebCore/html/HTMLElementsAllInOne.cpp
index dad548c..f9c970a 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLElementsAllInOne.cpp
+++ b/src/3rdparty/webkit/WebCore/html/HTMLElementsAllInOne.cpp
@@ -42,6 +42,10 @@
#include "HTMLBodyElement.cpp"
#include "HTMLButtonElement.cpp"
#include "HTMLCanvasElement.cpp"
+#include "HTMLDataGridElement.cpp"
+#include "HTMLDataGridCellElement.cpp"
+#include "HTMLDataGridColElement.cpp"
+#include "HTMLDataGridRowElement.cpp"
#include "HTMLDListElement.cpp"
#include "HTMLDirectoryElement.cpp"
#include "HTMLDivElement.cpp"
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLEmbedElement.idl b/src/3rdparty/webkit/WebCore/html/HTMLEmbedElement.idl
index ecf8a96..a38402c 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLEmbedElement.idl
+++ b/src/3rdparty/webkit/WebCore/html/HTMLEmbedElement.idl
@@ -22,8 +22,8 @@ module html {
interface [
GenerateConstructor,
- CustomPutFunction,
- CustomGetOwnPropertySlot,
+ DelegatingPutFunction,
+ DelegatingGetOwnPropertySlot,
CustomCall,
HasOverridingNameGetter,
InterfaceUUID=18f9bd58-6bb3-4b5c-aa30-6da13adfc91e,
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLFormControlElement.cpp b/src/3rdparty/webkit/WebCore/html/HTMLFormControlElement.cpp
index 36d20ac..b985e75 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLFormControlElement.cpp
+++ b/src/3rdparty/webkit/WebCore/html/HTMLFormControlElement.cpp
@@ -71,7 +71,7 @@ void HTMLFormControlElement::parseMappedAttribute(MappedAttribute *attr)
if (oldDisabled != m_disabled) {
setNeedsStyleRecalc();
if (renderer() && renderer()->style()->hasAppearance())
- theme()->stateChanged(renderer(), EnabledState);
+ renderer()->theme()->stateChanged(renderer(), EnabledState);
}
} else if (attr->name() == readonlyAttr) {
bool oldReadOnly = m_readOnly;
@@ -79,7 +79,7 @@ void HTMLFormControlElement::parseMappedAttribute(MappedAttribute *attr)
if (oldReadOnly != m_readOnly) {
setNeedsStyleRecalc();
if (renderer() && renderer()->style()->hasAppearance())
- theme()->stateChanged(renderer(), ReadOnlyState);
+ renderer()->theme()->stateChanged(renderer(), ReadOnlyState);
}
} else
HTMLElement::parseMappedAttribute(attr);
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLFrameSetElement.cpp b/src/3rdparty/webkit/WebCore/html/HTMLFrameSetElement.cpp
index 61f9f71..42c1d7f 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLFrameSetElement.cpp
+++ b/src/3rdparty/webkit/WebCore/html/HTMLFrameSetElement.cpp
@@ -3,7 +3,7 @@
* (C) 1999 Antti Koivisto (koivisto@kde.org)
* (C) 2000 Simon Hausmann (hausmann@kde.org)
* (C) 2001 Dirk Mueller (mueller@kde.org)
- * Copyright (C) 2004, 2006 Apple Computer, Inc.
+ * Copyright (C) 2004, 2006, 2009 Apple Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -125,13 +125,27 @@ void HTMLFrameSetElement::parseMappedAttribute(MappedAttribute *attr)
addCSSColor(attr, CSSPropertyBorderColor, attr->value());
m_borderColorSet = true;
}
- } else if (attr->name() == onloadAttr) {
+ } else if (attr->name() == onloadAttr)
document()->setWindowAttributeEventListener(eventNames().loadEvent, createAttributeEventListener(document()->frame(), attr));
- } else if (attr->name() == onbeforeunloadAttr) {
+ else if (attr->name() == onbeforeunloadAttr)
document()->setWindowAttributeEventListener(eventNames().beforeunloadEvent, createAttributeEventListener(document()->frame(), attr));
- } else if (attr->name() == onunloadAttr) {
+ else if (attr->name() == onunloadAttr)
document()->setWindowAttributeEventListener(eventNames().unloadEvent, createAttributeEventListener(document()->frame(), attr));
- } else
+ else if (attr->name() == onblurAttr)
+ document()->setWindowAttributeEventListener(eventNames().blurEvent, createAttributeEventListener(document()->frame(), attr));
+ else if (attr->name() == onfocusAttr)
+ document()->setWindowAttributeEventListener(eventNames().focusEvent, createAttributeEventListener(document()->frame(), attr));
+ else if (attr->name() == onresizeAttr)
+ document()->setWindowAttributeEventListener(eventNames().resizeEvent, createAttributeEventListener(document()->frame(), attr));
+ else if (attr->name() == onscrollAttr)
+ document()->setWindowAttributeEventListener(eventNames().scrollEvent, createAttributeEventListener(document()->frame(), attr));
+ else if (attr->name() == onstorageAttr)
+ document()->setWindowAttributeEventListener(eventNames().storageEvent, createAttributeEventListener(document()->frame(), attr));
+ else if (attr->name() == ononlineAttr)
+ document()->setWindowAttributeEventListener(eventNames().onlineEvent, createAttributeEventListener(document()->frame(), attr));
+ else if (attr->name() == onofflineAttr)
+ document()->setWindowAttributeEventListener(eventNames().offlineEvent, createAttributeEventListener(document()->frame(), attr));
+ else
HTMLElement::parseMappedAttribute(attr);
}
@@ -214,4 +228,114 @@ void HTMLFrameSetElement::setRows(const String &value)
setAttribute(rowsAttr, value);
}
+EventListener* HTMLFrameSetElement::onblur() const
+{
+ return document()->getWindowAttributeEventListener(eventNames().blurEvent);
}
+
+void HTMLFrameSetElement::setOnblur(PassRefPtr<EventListener> eventListener)
+{
+ document()->setAttributeEventListener(eventNames().blurEvent, eventListener);
+}
+
+EventListener* HTMLFrameSetElement::onerror() const
+{
+ return document()->getWindowAttributeEventListener(eventNames().errorEvent);
+}
+
+void HTMLFrameSetElement::setOnerror(PassRefPtr<EventListener> eventListener)
+{
+ document()->setAttributeEventListener(eventNames().errorEvent, eventListener);
+}
+
+EventListener* HTMLFrameSetElement::onfocus() const
+{
+ return document()->getWindowAttributeEventListener(eventNames().focusEvent);
+}
+
+void HTMLFrameSetElement::setOnfocus(PassRefPtr<EventListener> eventListener)
+{
+ document()->setAttributeEventListener(eventNames().focusEvent, eventListener);
+}
+
+EventListener* HTMLFrameSetElement::onload() const
+{
+ return document()->getWindowAttributeEventListener(eventNames().loadEvent);
+}
+
+void HTMLFrameSetElement::setOnload(PassRefPtr<EventListener> eventListener)
+{
+ document()->setAttributeEventListener(eventNames().loadEvent, eventListener);
+}
+
+EventListener* HTMLFrameSetElement::onbeforeunload() const
+{
+ return document()->getWindowAttributeEventListener(eventNames().beforeunloadEvent);
+}
+
+void HTMLFrameSetElement::setOnbeforeunload(PassRefPtr<EventListener> eventListener)
+{
+ document()->setAttributeEventListener(eventNames().beforeunloadEvent, eventListener);
+}
+
+EventListener* HTMLFrameSetElement::onmessage() const
+{
+ return document()->getWindowAttributeEventListener(eventNames().messageEvent);
+}
+
+void HTMLFrameSetElement::setOnmessage(PassRefPtr<EventListener> eventListener)
+{
+ document()->setAttributeEventListener(eventNames().messageEvent, eventListener);
+}
+
+EventListener* HTMLFrameSetElement::onoffline() const
+{
+ return document()->getWindowAttributeEventListener(eventNames().offlineEvent);
+}
+
+void HTMLFrameSetElement::setOnoffline(PassRefPtr<EventListener> eventListener)
+{
+ document()->setAttributeEventListener(eventNames().offlineEvent, eventListener);
+}
+
+EventListener* HTMLFrameSetElement::ononline() const
+{
+ return document()->getWindowAttributeEventListener(eventNames().onlineEvent);
+}
+
+void HTMLFrameSetElement::setOnonline(PassRefPtr<EventListener> eventListener)
+{
+ document()->setAttributeEventListener(eventNames().onlineEvent, eventListener);
+}
+
+EventListener* HTMLFrameSetElement::onresize() const
+{
+ return document()->getWindowAttributeEventListener(eventNames().resizeEvent);
+}
+
+void HTMLFrameSetElement::setOnresize(PassRefPtr<EventListener> eventListener)
+{
+ document()->setAttributeEventListener(eventNames().resizeEvent, eventListener);
+}
+
+EventListener* HTMLFrameSetElement::onstorage() const
+{
+ return document()->getWindowAttributeEventListener(eventNames().storageEvent);
+}
+
+void HTMLFrameSetElement::setOnstorage(PassRefPtr<EventListener> eventListener)
+{
+ document()->setAttributeEventListener(eventNames().storageEvent, eventListener);
+}
+
+EventListener* HTMLFrameSetElement::onunload() const
+{
+ return document()->getWindowAttributeEventListener(eventNames().unloadEvent);
+}
+
+void HTMLFrameSetElement::setOnunload(PassRefPtr<EventListener> eventListener)
+{
+ document()->setAttributeEventListener(eventNames().unloadEvent, eventListener);
+}
+
+} // namespace WebCore
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLFrameSetElement.h b/src/3rdparty/webkit/WebCore/html/HTMLFrameSetElement.h
index bb9156f..4319c7a 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLFrameSetElement.h
+++ b/src/3rdparty/webkit/WebCore/html/HTMLFrameSetElement.h
@@ -1,10 +1,8 @@
/*
- * This file is part of the DOM implementation for KDE.
- *
* Copyright (C) 1999 Lars Knoll (knoll@kde.org)
* (C) 1999 Antti Koivisto (koivisto@kde.org)
* (C) 2000 Simon Hausmann <hausmann@kde.org>
- * Copyright (C) 2004, 2006 Apple Computer, Inc.
+ * Copyright (C) 2004, 2006, 2009 Apple Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -45,7 +43,7 @@ public:
virtual void attach();
virtual bool rendererIsNeeded(RenderStyle*);
- virtual RenderObject *createRenderer(RenderArena*, RenderStyle*);
+ virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
virtual void defaultEventHandler(Event*);
@@ -58,7 +56,7 @@ public:
bool hasBorderColor() const { return m_borderColorSet; }
- virtual void recalcStyle( StyleChange ch );
+ virtual void recalcStyle(StyleChange);
String cols() const;
void setCols(const String&);
@@ -69,6 +67,31 @@ public:
const Length* rowLengths() const { return m_rows; }
const Length* colLengths() const { return m_cols; }
+ // Event handler attributes
+ virtual EventListener* onblur() const;
+ virtual void setOnblur(PassRefPtr<EventListener>);
+ virtual EventListener* onerror() const;
+ virtual void setOnerror(PassRefPtr<EventListener>);
+ virtual EventListener* onfocus() const;
+ virtual void setOnfocus(PassRefPtr<EventListener>);
+ virtual EventListener* onload() const;
+ virtual void setOnload(PassRefPtr<EventListener>);
+
+ EventListener* onbeforeunload() const;
+ void setOnbeforeunload(PassRefPtr<EventListener>);
+ EventListener* onmessage() const;
+ void setOnmessage(PassRefPtr<EventListener>);
+ EventListener* onoffline() const;
+ void setOnoffline(PassRefPtr<EventListener>);
+ EventListener* ononline() const;
+ void setOnonline(PassRefPtr<EventListener>);
+ EventListener* onresize() const;
+ void setOnresize(PassRefPtr<EventListener>);
+ EventListener* onstorage() const;
+ void setOnstorage(PassRefPtr<EventListener>);
+ EventListener* onunload() const;
+ void setOnunload(PassRefPtr<EventListener>);
+
private:
Length* m_rows;
Length* m_cols;
@@ -86,6 +109,6 @@ private:
bool noresize;
};
-} //namespace
+} // namespace WebCore
-#endif
+#endif // HTMLFrameSetElement_h
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLFrameSetElement.idl b/src/3rdparty/webkit/WebCore/html/HTMLFrameSetElement.idl
index 060616e..4050f2c 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLFrameSetElement.idl
+++ b/src/3rdparty/webkit/WebCore/html/HTMLFrameSetElement.idl
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006, 2007 Apple Inc. All rights reserve
+ * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserve
* Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
*
* This library is free software; you can redistribute it and/or
@@ -26,10 +26,35 @@ module html {
InterfaceUUID=5038a73d-c0db-4847-acb4-4c6d31f48790,
ImplementationUUID=450f7bf6-fdc0-4a0f-b7e1-baea7f7e5732
] HTMLFrameSetElement : HTMLElement {
-
attribute [ConvertNullToNullString] DOMString cols;
attribute [ConvertNullToNullString] DOMString rows;
+#if !defined(LANGUAGE_OBJECTIVE_C) || !LANGUAGE_OBJECTIVE_C
+#if !defined(LANGUAGE_COM) || !LANGUAGE_COM
+ // Event handler attributes
+ attribute [DontEnum] EventListener onbeforeunload;
+ attribute [DontEnum] EventListener onmessage;
+ attribute [DontEnum] EventListener onoffline;
+ attribute [DontEnum] EventListener ononline;
+ attribute [DontEnum] EventListener onresize;
+ attribute [DontEnum] EventListener onstorage;
+ attribute [DontEnum] EventListener onunload;
+
+ // Overrides of Element attributes.
+ // attribute [DontEnum] EventListener onblur;
+ // attribute [DontEnum] EventListener onerror;
+ // attribute [DontEnum] EventListener onfocus;
+ // attribute [DontEnum] EventListener onload;
+
+ // Not implemented yet.
+ // attribute [DontEnum] EventListener onafterprint;
+ // attribute [DontEnum] EventListener onbeforeprint;
+ // attribute [DontEnum] EventListener onhashchange;
+ // attribute [DontEnum] EventListener onpopstate;
+ // attribute [DontEnum] EventListener onredo;
+ // attribute [DontEnum] EventListener onundo;
+#endif
+#endif
};
}
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLImageElement.idl b/src/3rdparty/webkit/WebCore/html/HTMLImageElement.idl
index d7da088..a90ae25 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLImageElement.idl
+++ b/src/3rdparty/webkit/WebCore/html/HTMLImageElement.idl
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006 Apple Computer, Inc.
+ * Copyright (C) 2006, 2009 Apple Inc. All rights reserved.
* Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
*
* This library is free software; you can redistribute it and/or
@@ -25,22 +25,22 @@ module html {
InterfaceUUID=b21b8125-d00b-4bdf-b0e8-659678db3923,
ImplementationUUID=2121ca21-8118-4f1b-b9fe-4788a9050281
] HTMLImageElement : HTMLElement {
- attribute [ConvertNullToNullString] DOMString name;
- attribute [ConvertNullToNullString] DOMString align;
- attribute [ConvertNullToNullString] DOMString alt;
- attribute [ConvertNullToNullString] DOMString border;
+ attribute [ConvertNullToNullString, Reflect] DOMString name;
+ attribute [ConvertNullToNullString, Reflect] DOMString align;
+ attribute [ConvertNullToNullString, Reflect] DOMString alt;
+ attribute [ConvertNullToNullString, Reflect] DOMString border;
attribute long height;
attribute long hspace;
attribute boolean isMap;
- attribute [ConvertNullToNullString] DOMString longDesc;
- attribute [ConvertNullToNullString] DOMString src;
- attribute [ConvertNullToNullString] DOMString useMap;
+ attribute [ConvertNullToNullString, ReflectURL=longdesc] DOMString longDesc;
+ attribute [ConvertNullToNullString, ReflectURL] DOMString src;
+ attribute [ConvertNullToNullString, Reflect=usemap] DOMString useMap;
attribute long vspace;
attribute long width;
// Extensions
readonly attribute boolean complete;
- attribute [ConvertNullToNullString] DOMString lowsrc;
+ attribute [ConvertNullToNullString, ReflectURL] DOMString lowsrc;
readonly attribute long naturalHeight;
readonly attribute long naturalWidth;
readonly attribute long x;
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLInputElement.cpp b/src/3rdparty/webkit/WebCore/html/HTMLInputElement.cpp
index dbc818b..ae7e768 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLInputElement.cpp
+++ b/src/3rdparty/webkit/WebCore/html/HTMLInputElement.cpp
@@ -632,8 +632,6 @@ void HTMLInputElement::parseMappedAttribute(MappedAttribute *attr)
setAttributeEventListener(eventNames().selectEvent, createAttributeEventListener(this, attr));
} else if (attr->name() == onchangeAttr) {
setAttributeEventListener(eventNames().changeEvent, createAttributeEventListener(this, attr));
- } else if (attr->name() == oninputAttr) {
- setAttributeEventListener(eventNames().inputEvent, createAttributeEventListener(this, attr));
}
// Search field and slider attributes all just cause updateFromElement to be called through style
// recalcing.
@@ -881,9 +879,9 @@ void HTMLInputElement::setChecked(bool nowChecked, bool sendChangeEvent)
setNeedsStyleRecalc();
checkedRadioButtons(this).addButton(this);
-
+
if (renderer() && renderer()->style()->hasAppearance())
- theme()->stateChanged(renderer(), CheckedState);
+ renderer()->theme()->stateChanged(renderer(), CheckedState);
// Only send a change event for items in the document (avoid firing during
// parsing) and don't send a change event for a radio button that's getting
@@ -905,7 +903,7 @@ void HTMLInputElement::setIndeterminate(bool _indeterminate)
setNeedsStyleRecalc();
if (renderer() && renderer()->style()->hasAppearance())
- theme()->stateChanged(renderer(), CheckedState);
+ renderer()->theme()->stateChanged(renderer(), CheckedState);
}
int HTMLInputElement::size() const
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLLinkElement.cpp b/src/3rdparty/webkit/WebCore/html/HTMLLinkElement.cpp
index 76a9703..cb8f36c 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLLinkElement.cpp
+++ b/src/3rdparty/webkit/WebCore/html/HTMLLinkElement.cpp
@@ -225,11 +225,11 @@ void HTMLLinkElement::removedFromDocument()
{
HTMLElement::removedFromDocument();
+ document()->removeStyleSheetCandidateNode(this);
+
// FIXME: It's terrible to do a synchronous update of the style selector just because a <style> or <link> element got removed.
- if (document()->renderer()) {
- document()->removeStyleSheetCandidateNode(this);
+ if (document()->renderer())
document()->updateStyleSelector();
- }
}
void HTMLLinkElement::finishParsingChildren()
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLMediaElement.cpp b/src/3rdparty/webkit/WebCore/html/HTMLMediaElement.cpp
index 6ad0653..3d48b82 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLMediaElement.cpp
+++ b/src/3rdparty/webkit/WebCore/html/HTMLMediaElement.cpp
@@ -52,11 +52,17 @@
#include "Page.h"
#include "ProgressEvent.h"
#include "RenderVideo.h"
+#include "ScriptEventListener.h"
#include "TimeRanges.h"
#include <limits>
#include <wtf/CurrentTime.h>
#include <wtf/MathExtras.h>
+#if USE(ACCELERATED_COMPOSITING)
+#include "RenderView.h"
+#include "RenderLayerCompositor.h"
+#endif
+
#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
#include "RenderPartObject.h"
#include "Widget.h"
@@ -77,6 +83,7 @@ HTMLMediaElement::HTMLMediaElement(const QualifiedName& tagName, Document* doc)
, m_playedTimeRanges()
, m_playbackRate(1.0f)
, m_defaultPlaybackRate(1.0f)
+ , m_webkitPreservesPitch(true)
, m_networkState(NETWORK_EMPTY)
, m_readyState(HAVE_NOTHING)
, m_volume(1.0f)
@@ -144,12 +151,60 @@ void HTMLMediaElement::attributeChanged(Attribute* attr, bool preserveDecls)
#endif
}
-void HTMLMediaElement::parseMappedAttribute(MappedAttribute *attr)
+void HTMLMediaElement::parseMappedAttribute(MappedAttribute* attr)
{
- if (attr->name() == autobufferAttr) {
+ const QualifiedName& attrName = attr->name();
+
+ if (attrName == autobufferAttr) {
if (m_player)
m_player->setAutobuffer(!attr->isNull());
- } else
+ } else if (attrName == onabortAttr)
+ setAttributeEventListener(eventNames().abortEvent, createAttributeEventListener(this, attr));
+ else if (attrName == oncanplayAttr)
+ setAttributeEventListener(eventNames().canplayEvent, createAttributeEventListener(this, attr));
+ else if (attrName == oncanplaythroughAttr)
+ setAttributeEventListener(eventNames().canplaythroughEvent, createAttributeEventListener(this, attr));
+ else if (attrName == ondurationchangeAttr)
+ setAttributeEventListener(eventNames().durationchangeEvent, createAttributeEventListener(this, attr));
+ else if (attrName == onemptiedAttr)
+ setAttributeEventListener(eventNames().emptiedEvent, createAttributeEventListener(this, attr));
+ else if (attrName == onendedAttr)
+ setAttributeEventListener(eventNames().endedEvent, createAttributeEventListener(this, attr));
+ else if (attrName == onerrorAttr)
+ setAttributeEventListener(eventNames().errorEvent, createAttributeEventListener(this, attr));
+ else if (attrName == onloadAttr)
+ setAttributeEventListener(eventNames().loadEvent, createAttributeEventListener(this, attr));
+ else if (attrName == onloadeddataAttr)
+ setAttributeEventListener(eventNames().loadeddataEvent, createAttributeEventListener(this, attr));
+ else if (attrName == onloadedmetadataAttr)
+ setAttributeEventListener(eventNames().loadedmetadataEvent, createAttributeEventListener(this, attr));
+ else if (attrName == onloadstartAttr)
+ setAttributeEventListener(eventNames().loadstartEvent, createAttributeEventListener(this, attr));
+ else if (attrName == onpauseAttr)
+ setAttributeEventListener(eventNames().pauseEvent, createAttributeEventListener(this, attr));
+ else if (attrName == onplayAttr)
+ setAttributeEventListener(eventNames().playEvent, createAttributeEventListener(this, attr));
+ else if (attrName == onplayingAttr)
+ setAttributeEventListener(eventNames().playingEvent, createAttributeEventListener(this, attr));
+ else if (attrName == onprogressAttr)
+ setAttributeEventListener(eventNames().progressEvent, createAttributeEventListener(this, attr));
+ else if (attrName == onratechangeAttr)
+ setAttributeEventListener(eventNames().ratechangeEvent, createAttributeEventListener(this, attr));
+ else if (attrName == onseekedAttr)
+ setAttributeEventListener(eventNames().seekedEvent, createAttributeEventListener(this, attr));
+ else if (attrName == onseekingAttr)
+ setAttributeEventListener(eventNames().seekingEvent, createAttributeEventListener(this, attr));
+ else if (attrName == onstalledAttr)
+ setAttributeEventListener(eventNames().stalledEvent, createAttributeEventListener(this, attr));
+ else if (attrName == onsuspendAttr)
+ setAttributeEventListener(eventNames().suspendEvent, createAttributeEventListener(this, attr));
+ else if (attrName == ontimeupdateAttr)
+ setAttributeEventListener(eventNames().timeupdateEvent, createAttributeEventListener(this, attr));
+ else if (attrName == onvolumechangeAttr)
+ setAttributeEventListener(eventNames().volumechangeEvent, createAttributeEventListener(this, attr));
+ else if (attrName == onwaitingAttr)
+ setAttributeEventListener(eventNames().waitingEvent, createAttributeEventListener(this, attr));
+ else
HTMLElement::parseMappedAttribute(attr);
}
@@ -495,6 +550,7 @@ void HTMLMediaElement::loadResource(const KURL& url, ContentType& contentType)
m_player.set(new MediaPlayer(this));
#endif
+ m_player->setPreservesPitch(m_webkitPreservesPitch);
updateVolume();
m_player->load(m_currentSrc, contentType);
@@ -710,7 +766,7 @@ void HTMLMediaElement::setReadyState(MediaPlayer::ReadyState state)
scheduleEvent(eventNames().loadedmetadataEvent);
#if !ENABLE(PLUGIN_PROXY_FOR_VIDEO)
- if (renderer() && !renderer()->isImage()) {
+ if (renderer() && renderer()->isVideo()) {
static_cast<RenderVideo*>(renderer())->videoSizeChanged();
}
#endif
@@ -903,6 +959,21 @@ void HTMLMediaElement::setPlaybackRate(float rate)
m_player->setRate(rate);
}
+bool HTMLMediaElement::webkitPreservesPitch() const
+{
+ return m_webkitPreservesPitch;
+}
+
+void HTMLMediaElement::setWebkitPreservesPitch(bool preservesPitch)
+{
+ m_webkitPreservesPitch = preservesPitch;
+
+ if (!m_player)
+ return;
+
+ m_player->setPreservesPitch(preservesPitch);
+}
+
bool HTMLMediaElement::ended() const
{
return endedPlayback();
@@ -1130,6 +1201,14 @@ bool HTMLMediaElement::canPlay() const
return paused() || ended() || m_readyState < HAVE_METADATA;
}
+float HTMLMediaElement::percentLoaded() const
+{
+ if (!m_player)
+ return 0;
+ float duration = m_player->duration();
+ return duration ? m_player->maxTimeBuffered() / duration : 0;
+}
+
bool HTMLMediaElement::havePotentialSourceChild()
{
// Stash the current <source> node so we can restore it after checking
@@ -1226,14 +1305,6 @@ void HTMLMediaElement::mediaPlayerTimeChanged(MediaPlayer*)
endProcessingMediaPlayerCallback();
}
-void HTMLMediaElement::mediaPlayerRepaint(MediaPlayer*)
-{
- beginProcessingMediaPlayerCallback();
- if (renderer())
- renderer()->repaint();
- endProcessingMediaPlayerCallback();
-}
-
void HTMLMediaElement::mediaPlayerVolumeChanged(MediaPlayer*)
{
beginProcessingMediaPlayerCallback();
@@ -1248,7 +1319,7 @@ void HTMLMediaElement::mediaPlayerDurationChanged(MediaPlayer*)
#if !ENABLE(PLUGIN_PROXY_FOR_VIDEO)
if (renderer()) {
renderer()->updateFromElement();
- if (!renderer()->isImage())
+ if (renderer()->isVideo())
static_cast<RenderVideo*>(renderer())->videoSizeChanged();
}
#endif
@@ -1264,27 +1335,54 @@ void HTMLMediaElement::mediaPlayerRateChanged(MediaPlayer*)
endProcessingMediaPlayerCallback();
}
+void HTMLMediaElement::mediaPlayerSawUnsupportedTracks(MediaPlayer*)
+{
+ // The MediaPlayer came across content it cannot completely handle.
+ // This is normally acceptable except when we are in a standalone
+ // MediaDocument. If so, tell the document what has happened.
+ if (ownerDocument()->isMediaDocument()) {
+ MediaDocument* mediaDocument = static_cast<MediaDocument*>(ownerDocument());
+ mediaDocument->mediaElementSawUnsupportedTracks();
+ }
+}
+
+// MediaPlayerPresentation methods
+void HTMLMediaElement::mediaPlayerRepaint(MediaPlayer*)
+{
+ beginProcessingMediaPlayerCallback();
+ if (renderer())
+ renderer()->repaint();
+ endProcessingMediaPlayerCallback();
+}
+
void HTMLMediaElement::mediaPlayerSizeChanged(MediaPlayer*)
{
beginProcessingMediaPlayerCallback();
#if !ENABLE(PLUGIN_PROXY_FOR_VIDEO)
- if (renderer() && !renderer()->isImage())
+ if (renderer() && renderer()->isVideo())
static_cast<RenderVideo*>(renderer())->videoSizeChanged();
#endif
endProcessingMediaPlayerCallback();
}
-void HTMLMediaElement::mediaPlayerSawUnsupportedTracks(MediaPlayer*)
+#if USE(ACCELERATED_COMPOSITING)
+bool HTMLMediaElement::mediaPlayerRenderingCanBeAccelerated(MediaPlayer*)
{
- // The MediaPlayer came across content it cannot completely handle.
- // This is normally acceptable except when we are in a standalone
- // MediaDocument. If so, tell the document what has happened.
- if (ownerDocument()->isMediaDocument()) {
- MediaDocument* mediaDocument = static_cast<MediaDocument*>(ownerDocument());
- mediaDocument->mediaElementSawUnsupportedTracks();
+ if (renderer() && renderer()->isVideo()) {
+ ASSERT(renderer()->view());
+ return renderer()->view()->compositor()->canAccelerateVideoRendering(static_cast<RenderVideo*>(renderer()));
}
+ return false;
}
+GraphicsLayer* HTMLMediaElement::mediaPlayerGraphicsLayer(MediaPlayer*)
+{
+ if (renderer() && renderer()->isVideo())
+ return static_cast<RenderVideo*>(renderer())->videoGraphicsLayer();
+ return 0;
+}
+#endif
+
PassRefPtr<TimeRanges> HTMLMediaElement::buffered() const
{
// FIXME real ranges support
@@ -1452,6 +1550,9 @@ void HTMLMediaElement::documentWillBecomeInactive()
if (renderer())
renderer()->updateFromElement();
+
+ stopPeriodicTimers();
+ cancelPendingEventsAndCallbacks();
}
void HTMLMediaElement::documentDidBecomeActive()
@@ -1509,8 +1610,7 @@ bool HTMLMediaElement::processingUserGesture() const
void HTMLMediaElement::deliverNotification(MediaPlayerProxyNotificationType notification)
{
if (notification == MediaPlayerNotificationPlayPauseButtonPressed) {
- ExceptionCode ec;
- togglePlayState(ec);
+ togglePlayState();
return;
}
@@ -1529,7 +1629,7 @@ String HTMLMediaElement::initialURL()
KURL initialSrc = document()->completeURL(getAttribute(srcAttr));
if (!initialSrc.isValid())
- initialSrc = selectNextSourceChild(0, DoNothing).string();
+ initialSrc = selectNextSourceChild(0, DoNothing);
m_currentSrc = initialSrc.string();
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLMediaElement.h b/src/3rdparty/webkit/WebCore/html/HTMLMediaElement.h
index 65c542b..8d238d5 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLMediaElement.h
+++ b/src/3rdparty/webkit/WebCore/html/HTMLMediaElement.h
@@ -65,7 +65,9 @@ public:
virtual bool isVideo() const { return false; }
virtual bool hasVideo() const { return false; }
-
+
+ virtual bool supportsFullscreen() const { return false; }
+
void scheduleLoad();
virtual void defaultEventHandler(Event*);
@@ -108,6 +110,8 @@ public:
void setDefaultPlaybackRate(float);
float playbackRate() const;
void setPlaybackRate(float);
+ bool webkitPreservesPitch() const;
+ void setWebkitPreservesPitch(bool);
PassRefPtr<TimeRanges> played() const;
PassRefPtr<TimeRanges> seekable() const;
bool ended() const;
@@ -131,6 +135,8 @@ public:
bool canPlay() const;
+ float percentLoaded() const;
+
#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
void setNeedWidgetUpdate(bool needWidgetUpdate) { m_needWidgetUpdate = needWidgetUpdate; }
void deliverNotification(MediaPlayerProxyNotificationType notification);
@@ -139,6 +145,8 @@ public:
virtual void finishParsingChildren();
#endif
+ bool hasSingleSecurityOrigin() const { return !m_player || m_player->hasSingleSecurityOrigin(); }
+
protected:
float getTimeOffsetAttribute(const QualifiedName&, float valueOnError) const;
void setTimeOffsetAttribute(const QualifiedName&, float value);
@@ -150,16 +158,20 @@ protected:
void setReadyState(MediaPlayer::ReadyState);
void setNetworkState(MediaPlayer::NetworkState);
-private: // MediaPlayerObserver
+private: // MediaPlayerClient
virtual void mediaPlayerNetworkStateChanged(MediaPlayer*);
virtual void mediaPlayerReadyStateChanged(MediaPlayer*);
virtual void mediaPlayerTimeChanged(MediaPlayer*);
- virtual void mediaPlayerRepaint(MediaPlayer*);
virtual void mediaPlayerVolumeChanged(MediaPlayer*);
virtual void mediaPlayerDurationChanged(MediaPlayer*);
virtual void mediaPlayerRateChanged(MediaPlayer*);
- virtual void mediaPlayerSizeChanged(MediaPlayer*);
virtual void mediaPlayerSawUnsupportedTracks(MediaPlayer*);
+ virtual void mediaPlayerRepaint(MediaPlayer*);
+ virtual void mediaPlayerSizeChanged(MediaPlayer*);
+#if USE(ACCELERATED_COMPOSITING)
+ virtual bool mediaPlayerRenderingCanBeAccelerated(MediaPlayer*);
+ virtual GraphicsLayer* mediaPlayerGraphicsLayer(MediaPlayer*);
+#endif
private:
void loadTimerFired(Timer<HTMLMediaElement>*);
@@ -228,6 +240,7 @@ protected:
float m_playbackRate;
float m_defaultPlaybackRate;
+ bool m_webkitPreservesPitch;
NetworkState m_networkState;
ReadyState m_readyState;
String m_currentSrc;
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLMediaElement.idl b/src/3rdparty/webkit/WebCore/html/HTMLMediaElement.idl
index 008e059..7278fa6 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLMediaElement.idl
+++ b/src/3rdparty/webkit/WebCore/html/HTMLMediaElement.idl
@@ -76,5 +76,8 @@ interface [GenerateConstructor, Conditional=VIDEO] HTMLMediaElement : HTMLElemen
attribute float volume
setter raises (DOMException);
attribute boolean muted;
+
+ // WebKit extension
+ attribute boolean webkitPreservesPitch;
};
}
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLObjectElement.idl b/src/3rdparty/webkit/WebCore/html/HTMLObjectElement.idl
index 5d4562c..1880836 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLObjectElement.idl
+++ b/src/3rdparty/webkit/WebCore/html/HTMLObjectElement.idl
@@ -22,8 +22,8 @@ module html {
interface [
GenerateConstructor,
- CustomPutFunction,
- CustomGetOwnPropertySlot,
+ DelegatingPutFunction,
+ DelegatingGetOwnPropertySlot,
CustomCall,
HasOverridingNameGetter,
InterfaceUUID=9d04a3b8-9016-4b64-913a-3b00d548aca7,
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLParser.cpp b/src/3rdparty/webkit/WebCore/html/HTMLParser.cpp
index dab58b3..ea6bbe2 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLParser.cpp
+++ b/src/3rdparty/webkit/WebCore/html/HTMLParser.cpp
@@ -1076,6 +1076,7 @@ bool HTMLParser::isAffectedByResidualStyle(const AtomicString& tagName)
unaffectedTags.add(optgroupTag.localName().impl());
unaffectedTags.add(selectTag.localName().impl());
unaffectedTags.add(objectTag.localName().impl());
+ unaffectedTags.add(datagridTag.localName().impl());
}
return !unaffectedTags.contains(tagName.impl());
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLSelectElement.cpp b/src/3rdparty/webkit/WebCore/html/HTMLSelectElement.cpp
index 95038e6..c47bb70 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLSelectElement.cpp
+++ b/src/3rdparty/webkit/WebCore/html/HTMLSelectElement.cpp
@@ -80,9 +80,14 @@ void HTMLSelectElement::deselectItems(HTMLOptionElement* excludeElement)
SelectElement::deselectItems(m_data, this, excludeElement);
}
-void HTMLSelectElement::setSelectedIndex(int optionIndex, bool deselect, bool fireOnChange)
+void HTMLSelectElement::setSelectedIndex(int optionIndex, bool deselect)
{
- SelectElement::setSelectedIndex(m_data, this, optionIndex, deselect, fireOnChange);
+ SelectElement::setSelectedIndex(m_data, this, optionIndex, deselect, false, false);
+}
+
+void HTMLSelectElement::setSelectedIndexByUser(int optionIndex, bool deselect, bool fireOnChangeNow)
+{
+ SelectElement::setSelectedIndex(m_data, this, optionIndex, deselect, fireOnChangeNow, true);
}
int HTMLSelectElement::activeSelectionStartListIndex() const
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLSelectElement.h b/src/3rdparty/webkit/WebCore/html/HTMLSelectElement.h
index b00d68f..e523641 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLSelectElement.h
+++ b/src/3rdparty/webkit/WebCore/html/HTMLSelectElement.h
@@ -39,7 +39,8 @@ public:
HTMLSelectElement(const QualifiedName&, Document*, HTMLFormElement* = 0);
virtual int selectedIndex() const;
- virtual void setSelectedIndex(int index, bool deselect = true, bool fireOnChange = false);
+ virtual void setSelectedIndex(int index, bool deselect = true);
+ virtual void setSelectedIndexByUser(int index, bool deselect = true, bool fireOnChangeNow = false);
unsigned length() const;
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLStyleElement.cpp b/src/3rdparty/webkit/WebCore/html/HTMLStyleElement.cpp
index f6b5924..206aec4 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLStyleElement.cpp
+++ b/src/3rdparty/webkit/WebCore/html/HTMLStyleElement.cpp
@@ -71,8 +71,7 @@ void HTMLStyleElement::insertedIntoDocument()
void HTMLStyleElement::removedFromDocument()
{
HTMLElement::removedFromDocument();
- if (document()->renderer())
- document()->removeStyleSheetCandidateNode(this);
+ document()->removeStyleSheetCandidateNode(this);
StyleElement::removedFromDocument(document());
}
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLTableColElement.cpp b/src/3rdparty/webkit/WebCore/html/HTMLTableColElement.cpp
index ae18ab1..4e4f89e 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLTableColElement.cpp
+++ b/src/3rdparty/webkit/WebCore/html/HTMLTableColElement.cpp
@@ -81,8 +81,15 @@ void HTMLTableColElement::parseMappedAttribute(MappedAttribute *attr)
if (renderer() && renderer()->isTableCol())
static_cast<RenderTableCol*>(renderer())->updateFromElement();
} else if (attr->name() == widthAttr) {
- if (!attr->value().isEmpty())
+ if (!attr->value().isEmpty()) {
addCSSLength(attr, CSSPropertyWidth, attr->value());
+ if (renderer() && renderer()->isTableCol()) {
+ RenderTableCol* col = static_cast<RenderTableCol*>(renderer());
+ int newWidth = width().toInt();
+ if (newWidth != col->width())
+ col->setNeedsLayoutAndPrefWidthsRecalc();
+ }
+ }
} else
HTMLTablePartElement::parseMappedAttribute(attr);
}
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLTagNames.in b/src/3rdparty/webkit/WebCore/html/HTMLTagNames.in
index 14119ef..e6bbfc9 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLTagNames.in
+++ b/src/3rdparty/webkit/WebCore/html/HTMLTagNames.in
@@ -25,6 +25,10 @@ cite interfaceName=HTMLElement
code interfaceName=HTMLElement
col interfaceName=HTMLTableColElement
colgroup interfaceName=HTMLTableColElement
+datagrid interfaceName=HTMLDataGridElement
+dcell interfaceName=HTMLDataGridCellElement
+dcol interfaceName=HTMLDataGridColElement
+drow interfaceName=HTMLDataGridRowElement
dd interfaceName=HTMLElement
del interfaceName=HTMLModElement
dfn interfaceName=HTMLElement
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLTokenizer.cpp b/src/3rdparty/webkit/WebCore/html/HTMLTokenizer.cpp
index 341eecc..6966351 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLTokenizer.cpp
+++ b/src/3rdparty/webkit/WebCore/html/HTMLTokenizer.cpp
@@ -48,6 +48,7 @@
#include "ScriptController.h"
#include "ScriptSourceCode.h"
#include "ScriptValue.h"
+#include "XSSAuditor.h"
#include <wtf/ASCIICType.h>
#include <wtf/CurrentTime.h>
@@ -316,7 +317,7 @@ HTMLTokenizer::State HTMLTokenizer::processListing(SegmentedString list, State s
return state;
}
-HTMLTokenizer::State HTMLTokenizer::parseSpecial(SegmentedString& src, State state)
+HTMLTokenizer::State HTMLTokenizer::parseNonHTMLText(SegmentedString& src, State state)
{
ASSERT(state.inTextArea() || state.inTitle() || state.inIFrame() || !state.hasEntityState());
ASSERT(!state.hasTagState());
@@ -864,7 +865,9 @@ HTMLTokenizer::State HTMLTokenizer::parseEntity(SegmentedString& src, UChar*& de
}
} else {
// FIXME: We should eventually colorize entities by sending them as a special token.
- checkBuffer(11);
+ // 12 bytes required: up to 10 bytes in m_cBuffer plus the
+ // leading '&' and trailing ';'
+ checkBuffer(12);
*dest++ = '&';
for (unsigned i = 0; i < cBufferPos; i++)
dest[i] = m_cBuffer[i];
@@ -875,7 +878,9 @@ HTMLTokenizer::State HTMLTokenizer::parseEntity(SegmentedString& src, UChar*& de
}
}
} else {
- checkBuffer(10);
+ // 11 bytes required: up to 10 bytes in m_cBuffer plus the
+ // leading '&'
+ checkBuffer(11);
// ignore the sequence, add it to the buffer as plaintext
*dest++ = '&';
for (unsigned i = 0; i < cBufferPos; i++)
@@ -1468,8 +1473,11 @@ HTMLTokenizer::State HTMLTokenizer::parseTag(SegmentedString& src, State state)
m_scriptTagCharsetAttrValue = String();
if (m_currentToken.attrs && !m_fragment) {
if (m_doc->frame() && m_doc->frame()->script()->isEnabled()) {
- if ((a = m_currentToken.attrs->getAttributeItem(srcAttr)))
+ if ((a = m_currentToken.attrs->getAttributeItem(srcAttr))) {
m_scriptTagSrcAttrValue = m_doc->completeURL(parseURL(a->value())).string();
+ if (m_XSSAuditor && !m_XSSAuditor->canLoadExternalScriptFromSrc(a->value()))
+ m_scriptTagSrcAttrValue = String();
+ }
}
}
}
@@ -1477,6 +1485,9 @@ HTMLTokenizer::State HTMLTokenizer::parseTag(SegmentedString& src, State state)
RefPtr<Node> n = processToken();
m_cBufferPos = cBufferPos;
if (n || inViewSourceMode()) {
+ State savedState = state;
+ SegmentedString savedSrc = src;
+ long savedLineno = m_lineNumber;
if ((tagName == preTag || tagName == listingTag) && !inViewSourceMode()) {
if (beginTag)
state.setDiscardLF(true); // Discard the first LF after we open a pre.
@@ -1489,7 +1500,7 @@ HTMLTokenizer::State HTMLTokenizer::parseTag(SegmentedString& src, State state)
m_searchStopper = scriptEnd;
m_searchStopperLength = 8;
state.setInScript(true);
- state = parseSpecial(src, state);
+ state = parseNonHTMLText(src, state);
} else if (isSelfClosingScript) { // Handle <script src="foo"/>
state.setInScript(true);
state = scriptHandler(state);
@@ -1499,53 +1510,50 @@ HTMLTokenizer::State HTMLTokenizer::parseTag(SegmentedString& src, State state)
m_searchStopper = styleEnd;
m_searchStopperLength = 7;
state.setInStyle(true);
- state = parseSpecial(src, state);
+ state = parseNonHTMLText(src, state);
}
} else if (tagName == textareaTag) {
if (beginTag) {
m_searchStopper = textareaEnd;
m_searchStopperLength = 10;
state.setInTextArea(true);
- state = parseSpecial(src, state);
+ state = parseNonHTMLText(src, state);
}
} else if (tagName == titleTag) {
if (beginTag) {
m_searchStopper = titleEnd;
m_searchStopperLength = 7;
- State savedState = state;
- SegmentedString savedSrc = src;
- long savedLineno = m_lineNumber;
state.setInTitle(true);
- state = parseSpecial(src, state);
- if (state.inTitle() && src.isEmpty()) {
- // We just ate the rest of the document as the title #text node!
- // Reset the state then retokenize without special title handling.
- // Let the parser clean up the missing </title> tag.
- // FIXME: This is incorrect, because src.isEmpty() doesn't mean we're
- // at the end of the document unless m_noMoreData is also true. We need
- // to detect this case elsewhere, and save the state somewhere other
- // than a local variable.
- state = savedState;
- src = savedSrc;
- m_lineNumber = savedLineno;
- m_scriptCodeSize = 0;
- }
+ state = parseNonHTMLText(src, state);
}
} else if (tagName == xmpTag) {
if (beginTag) {
m_searchStopper = xmpEnd;
m_searchStopperLength = 5;
state.setInXmp(true);
- state = parseSpecial(src, state);
+ state = parseNonHTMLText(src, state);
}
} else if (tagName == iframeTag) {
if (beginTag) {
m_searchStopper = iframeEnd;
m_searchStopperLength = 8;
state.setInIFrame(true);
- state = parseSpecial(src, state);
+ state = parseNonHTMLText(src, state);
}
}
+ if (src.isEmpty() && (state.inTitle() || inViewSourceMode()) && !state.inComment() && !(state.inScript() && m_currentScriptTagStartLineNumber)) {
+ // We just ate the rest of the document as the #text node under the special tag!
+ // Reset the state then retokenize without special handling.
+ // Let the parser clean up the missing close tag.
+ // FIXME: This is incorrect, because src.isEmpty() doesn't mean we're
+ // at the end of the document unless m_noMoreData is also true. We need
+ // to detect this case elsewhere, and save the state somewhere other
+ // than a local variable.
+ state = savedState;
+ src = savedSrc;
+ m_lineNumber = savedLineno;
+ m_scriptCodeSize = 0;
+ }
}
if (tagName == plaintextTag)
state.setInPlainText(beginTag);
@@ -1661,8 +1669,8 @@ void HTMLTokenizer::write(const SegmentedString& str, bool appendData)
state = parseEntity(m_src, m_dest, state, m_cBufferPos, false, state.hasTagState());
else if (state.inPlainText())
state = parseText(m_src, state);
- else if (state.inAnySpecial())
- state = parseSpecial(m_src, state);
+ else if (state.inAnyNonHTMLText())
+ state = parseNonHTMLText(m_src, state);
else if (state.inComment())
state = parseComment(m_src, state);
else if (state.inDoctype())
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLTokenizer.h b/src/3rdparty/webkit/WebCore/html/HTMLTokenizer.h
index 2896974..6612af8 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLTokenizer.h
+++ b/src/3rdparty/webkit/WebCore/html/HTMLTokenizer.h
@@ -173,7 +173,7 @@ private:
State parseDoctype(SegmentedString&, State);
State parseServer(SegmentedString&, State);
State parseText(SegmentedString&, State);
- State parseSpecial(SegmentedString&, State);
+ State parseNonHTMLText(SegmentedString&, State);
State parseTag(SegmentedString&, State);
State parseEntity(SegmentedString&, UChar*& dest, State, unsigned& cBufferPos, bool start, bool parsingTag);
State parseProcessingInstruction(SegmentedString&, State);
@@ -288,7 +288,7 @@ private:
bool forceSynchronous() const { return testBit(ForceSynchronous); }
void setForceSynchronous(bool v) { setBit(ForceSynchronous, v); }
- bool inAnySpecial() const { return m_bits & (InScript | InStyle | InXmp | InTextArea | InTitle | InIFrame); }
+ bool inAnyNonHTMLText() const { return m_bits & (InScript | InStyle | InXmp | InTextArea | InTitle | InIFrame); }
bool hasTagState() const { return m_bits & TagMask; }
bool hasEntityState() const { return m_bits & EntityMask; }
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLVideoElement.cpp b/src/3rdparty/webkit/WebCore/html/HTMLVideoElement.cpp
index d465b73..a6210a2 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLVideoElement.cpp
+++ b/src/3rdparty/webkit/WebCore/html/HTMLVideoElement.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2007, 2008, 2009 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -186,5 +186,17 @@ void HTMLVideoElement::updatePosterImage()
#endif
}
+void HTMLVideoElement::paint(GraphicsContext* context, const IntRect& r)
+{
+ // FIXME: We should also be able to paint the poster image.
+
+ MediaPlayer* player = HTMLMediaElement::player();
+ if (!player)
+ return;
+
+ player->setVisible(true); // Make player visible or it won't draw.
+ player->paint(context, r);
+}
+
}
#endif
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLVideoElement.h b/src/3rdparty/webkit/WebCore/html/HTMLVideoElement.h
index d35f3f8..830e72e 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLVideoElement.h
+++ b/src/3rdparty/webkit/WebCore/html/HTMLVideoElement.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2007, 2008, 2009 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -50,6 +50,7 @@ public:
virtual void parseMappedAttribute(MappedAttribute* attr);
virtual bool isVideo() const { return true; }
virtual bool hasVideo() const { return player() && player()->hasVideo(); }
+ virtual bool supportsFullscreen() const { return player() && player()->supportsFullscreen(); }
virtual bool isURLAttribute(Attribute*) const;
virtual const QualifiedName& imageSourceAttributeName() const;
@@ -66,6 +67,9 @@ public:
void updatePosterImage();
+ // Used by canvas to gain raw pixel access
+ void paint(GraphicsContext*, const IntRect&);
+
private:
OwnPtr<HTMLImageLoader> m_imageLoader;
bool m_shouldShowPosterImage;
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLViewSourceDocument.cpp b/src/3rdparty/webkit/WebCore/html/HTMLViewSourceDocument.cpp
index d4d6df7..13404cc 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLViewSourceDocument.cpp
+++ b/src/3rdparty/webkit/WebCore/html/HTMLViewSourceDocument.cpp
@@ -56,9 +56,16 @@ HTMLViewSourceDocument::HTMLViewSourceDocument(Frame* frame, const String& mimeT
Tokenizer* HTMLViewSourceDocument::createTokenizer()
{
- if (implementation()->isTextMIMEType(m_type))
- return createTextTokenizer(this);
- return new HTMLTokenizer(this);
+ // Use HTMLTokenizer if applicable, otherwise use TextTokenizer.
+ if (m_type == "text/html" || m_type == "application/xhtml+xml" || m_type == "image/svg+xml" || implementation()->isXMLMIMEType(m_type)
+#if ENABLE(XHTMLMP)
+ || m_type == "application/vnd.wap.xhtml+xml"
+#endif
+ ) {
+ return new HTMLTokenizer(this);
+ }
+
+ return createTextTokenizer(this);
}
void HTMLViewSourceDocument::createContainingTable()
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLViewSourceDocument.h b/src/3rdparty/webkit/WebCore/html/HTMLViewSourceDocument.h
index 4e725c7..57a8f21 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLViewSourceDocument.h
+++ b/src/3rdparty/webkit/WebCore/html/HTMLViewSourceDocument.h
@@ -38,9 +38,10 @@ public:
{
return new HTMLViewSourceDocument(frame, mimeType);
}
-
+
+ // Returns HTMLTokenizer or TextTokenizer based on m_type.
virtual Tokenizer* createTokenizer();
-
+
void addViewSourceToken(Token*); // Used by the HTML tokenizer.
void addViewSourceText(const String&); // Used by the plaintext tokenizer.
void addViewSourceDoctypeToken(DoctypeToken*);