Title: [125092] trunk
- Revision
- 125092
- Author
- a...@chromium.org
- Date
- 2012-08-08 14:52:11 -0700 (Wed, 08 Aug 2012)
Log Message
DOM4: classList should be defined on Element and not on HTMLElement
https://bugs.webkit.org/show_bug.cgi?id=93015
Reviewed by Adam Barth.
DOM4 specs that Element should have the classList WebIDL attribute. This moves the
attribute to the correct IDL file.
Source/WebCore:
Test: fast/dom/Element/class-list.html
* dom/Element.idl:
* html/HTMLElement.idl:
LayoutTests:
* fast/dom/Element/class-list-expected.txt: Added.
* fast/dom/Element/class-list.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (125091 => 125092)
--- trunk/LayoutTests/ChangeLog 2012-08-08 21:49:46 UTC (rev 125091)
+++ trunk/LayoutTests/ChangeLog 2012-08-08 21:52:11 UTC (rev 125092)
@@ -1,3 +1,16 @@
+2012-08-08 Erik Arvidsson <a...@chromium.org>
+
+ DOM4: classList should be defined on Element and not on HTMLElement
+ https://bugs.webkit.org/show_bug.cgi?id=93015
+
+ Reviewed by Adam Barth.
+
+ DOM4 specs that Element should have the classList WebIDL attribute. This moves the
+ attribute to the correct IDL file.
+
+ * fast/dom/Element/class-list-expected.txt: Added.
+ * fast/dom/Element/class-list.html: Added.
+
2012-08-08 Beth Dakin <bda...@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=93393
Added: trunk/LayoutTests/fast/dom/Element/class-list-expected.txt (0 => 125092)
--- trunk/LayoutTests/fast/dom/Element/class-list-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/dom/Element/class-list-expected.txt 2012-08-08 21:52:11 UTC (rev 125092)
@@ -0,0 +1,12 @@
+Tests that classList works on non HTMLElements
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS htmlElement.classList instanceof DOMTokenList is true
+PASS svgElement.classList instanceof DOMTokenList is true
+PASS xmlElement.classList instanceof DOMTokenList is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/fast/dom/Element/class-list.html (0 => 125092)
--- trunk/LayoutTests/fast/dom/Element/class-list.html (rev 0)
+++ trunk/LayoutTests/fast/dom/Element/class-list.html 2012-08-08 21:52:11 UTC (rev 125092)
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<script src=""
+<script>
+description('Tests that classList works on non HTMLElements');
+
+var htmlElement = document.createElement('div');
+htmlElement.setAttribute('class', 'foo');
+shouldBeTrue('htmlElement.classList instanceof DOMTokenList');
+
+var svgElement = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
+svgElement.setAttribute('class', 'foo');
+shouldBeTrue('svgElement.classList instanceof DOMTokenList');
+
+
+var xmlElement = document.createElementNS('http://www.example.com', 'xml');
+xmlElement.setAttribute('class', 'foo');
+shouldBeTrue('xmlElement.classList instanceof DOMTokenList');
+
+</script>
+<script src=""
Modified: trunk/Source/WebCore/ChangeLog (125091 => 125092)
--- trunk/Source/WebCore/ChangeLog 2012-08-08 21:49:46 UTC (rev 125091)
+++ trunk/Source/WebCore/ChangeLog 2012-08-08 21:52:11 UTC (rev 125092)
@@ -1,3 +1,18 @@
+2012-08-08 Erik Arvidsson <a...@chromium.org>
+
+ DOM4: classList should be defined on Element and not on HTMLElement
+ https://bugs.webkit.org/show_bug.cgi?id=93015
+
+ Reviewed by Adam Barth.
+
+ DOM4 specs that Element should have the classList WebIDL attribute. This moves the
+ attribute to the correct IDL file.
+
+ Test: fast/dom/Element/class-list.html
+
+ * dom/Element.idl:
+ * html/HTMLElement.idl:
+
2012-08-08 Beth Dakin <bda...@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=92275
Modified: trunk/Source/WebCore/bindings/gobject/WebKitDOMCustom.h (125091 => 125092)
--- trunk/Source/WebCore/bindings/gobject/WebKitDOMCustom.h 2012-08-08 21:49:46 UTC (rev 125091)
+++ trunk/Source/WebCore/bindings/gobject/WebKitDOMCustom.h 2012-08-08 21:52:11 UTC (rev 125092)
@@ -32,6 +32,7 @@
WEBKIT_API WebKitDOMBlob* webkit_dom_blob_webkit_slice(WebKitDOMBlob* self, gint64 start, gint64 end, const gchar* content_type);
WEBKIT_API gchar* webkit_dom_html_element_get_class_name(WebKitDOMHTMLElement* element);
WEBKIT_API void webkit_dom_html_element_set_class_name(WebKitDOMHTMLElement* element, const gchar* value);
+WEBKIT_API WebKitDOMDOMTokenList* webkit_dom_html_element_get_class_list(WebKitDOMHTMLElement* element);
WEBKIT_API void webkit_dom_html_form_element_dispatch_form_change(WebKitDOMHTMLFormElement* self);
WEBKIT_API void webkit_dom_html_form_element_dispatch_form_input(WebKitDOMHTMLFormElement* self);
Modified: trunk/Source/WebCore/dom/Element.idl (125091 => 125092)
--- trunk/Source/WebCore/dom/Element.idl 2012-08-08 21:49:46 UTC (rev 125091)
+++ trunk/Source/WebCore/dom/Element.idl 2012-08-08 21:52:11 UTC (rev 125092)
@@ -97,6 +97,7 @@
NodeList getElementsByClassName(in [Optional=DefaultIsUndefined] DOMString name);
attribute [Reflect=class] DOMString className;
+ readonly attribute DOMTokenList classList;
#if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT
readonly attribute DOMStringMap dataset;
Modified: trunk/Source/WebCore/html/HTMLElement.idl (125091 => 125092)
--- trunk/Source/WebCore/html/HTMLElement.idl 2012-08-08 21:49:46 UTC (rev 125091)
+++ trunk/Source/WebCore/html/HTMLElement.idl 2012-08-08 21:52:11 UTC (rev 125092)
@@ -32,7 +32,6 @@
attribute [Reflect] DOMString lang;
attribute boolean translate;
attribute [Reflect] DOMString dir;
- readonly attribute DOMTokenList classList;
attribute long tabIndex;
attribute boolean draggable;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes