Title: [124499] trunk
Revision
124499
Author
[email protected]
Date
2012-08-02 14:28:12 -0700 (Thu, 02 Aug 2012)

Log Message

DOM4: className should be defined on Element and not on HTMLElement
https://bugs.webkit.org/show_bug.cgi?id=93014

Reviewed by Adam Barth.

DOM4 specs that Element should have the className WebIDL attribute. This moves the
attribute to the correct IDL file.

Source/WebCore:

Test: fast/dom/Element/class-name.html

* dom/Element.idl:
* html/HTMLElement.idl:

LayoutTests:

* fast/dom/Element/class-name-expected.txt: Added.
* fast/dom/Element/class-name.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (124498 => 124499)


--- trunk/LayoutTests/ChangeLog	2012-08-02 21:25:37 UTC (rev 124498)
+++ trunk/LayoutTests/ChangeLog	2012-08-02 21:28:12 UTC (rev 124499)
@@ -1,3 +1,16 @@
+2012-08-02  Erik Arvidsson  <[email protected]>
+
+        DOM4: className should be defined on Element and not on HTMLElement
+        https://bugs.webkit.org/show_bug.cgi?id=93014
+
+        Reviewed by Adam Barth.
+
+        DOM4 specs that Element should have the className WebIDL attribute. This moves the
+        attribute to the correct IDL file.
+
+        * fast/dom/Element/class-name-expected.txt: Added.
+        * fast/dom/Element/class-name.html: Added.
+
 2012-08-02  Abhishek Arya  <[email protected]>
 
         No isChildAllowed checked when adding RenderFullScreen as the child..

Added: trunk/LayoutTests/fast/dom/Element/class-name-expected.txt (0 => 124499)


--- trunk/LayoutTests/fast/dom/Element/class-name-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/dom/Element/class-name-expected.txt	2012-08-02 21:28:12 UTC (rev 124499)
@@ -0,0 +1,11 @@
+Tests that className works on non HTMLElements
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS htmlElement.className is "foo"
+PASS xmlElement.className is "foo"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/fast/dom/Element/class-name.html (0 => 124499)


--- trunk/LayoutTests/fast/dom/Element/class-name.html	                        (rev 0)
+++ trunk/LayoutTests/fast/dom/Element/class-name.html	2012-08-02 21:28:12 UTC (rev 124499)
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<script src=""
+<script>
+description('Tests that className works on non HTMLElements');
+
+var htmlElement = document.createElement('div');
+htmlElement.setAttribute('class', 'foo');
+shouldBeEqualToString('htmlElement.className', 'foo');
+
+var xmlElement = document.createElementNS('http://www.example.com', 'xml');
+xmlElement.setAttribute('class', 'foo');
+shouldBeEqualToString('xmlElement.className', 'foo');
+
+</script>
+<script src=""

Modified: trunk/Source/WebCore/ChangeLog (124498 => 124499)


--- trunk/Source/WebCore/ChangeLog	2012-08-02 21:25:37 UTC (rev 124498)
+++ trunk/Source/WebCore/ChangeLog	2012-08-02 21:28:12 UTC (rev 124499)
@@ -1,5 +1,20 @@
 2012-08-02  Erik Arvidsson  <[email protected]>
 
+        DOM4: className should be defined on Element and not on HTMLElement
+        https://bugs.webkit.org/show_bug.cgi?id=93014
+
+        Reviewed by Adam Barth.
+
+        DOM4 specs that Element should have the className WebIDL attribute. This moves the
+        attribute to the correct IDL file.
+
+        Test: fast/dom/Element/class-name.html
+
+        * dom/Element.idl:
+        * html/HTMLElement.idl:
+
+2012-08-02  Erik Arvidsson  <[email protected]>
+
         [V8] Handle case where Error.prototype returns an empty object
         https://bugs.webkit.org/show_bug.cgi?id=91792
 

Modified: trunk/Source/WebCore/bindings/objc/PublicDOMInterfaces.h (124498 => 124499)


--- trunk/Source/WebCore/bindings/objc/PublicDOMInterfaces.h	2012-08-02 21:25:37 UTC (rev 124498)
+++ trunk/Source/WebCore/bindings/objc/PublicDOMInterfaces.h	2012-08-02 21:28:12 UTC (rev 124499)
@@ -174,6 +174,7 @@
 @interface DOMElement : DOMNode WEBKIT_VERSION_1_3
 @property(readonly, copy) NSString *tagName;
 @property(readonly, retain) DOMCSSStyleDeclaration *style;
+@property(copy) NSString *className;
 @property(readonly) int offsetLeft;
 @property(readonly) int offsetTop;
 @property(readonly) int offsetWidth;
@@ -472,7 +473,6 @@
 @property(copy) NSString *idName;
 @property(copy) NSString *lang;
 @property(copy) NSString *dir;
-@property(copy) NSString *className;
 @property(copy) NSString *innerHTML;
 @property(copy) NSString *innerText;
 @property(copy) NSString *outerHTML;

Modified: trunk/Source/WebCore/dom/Element.idl (124498 => 124499)


--- trunk/Source/WebCore/dom/Element.idl	2012-08-02 21:25:37 UTC (rev 124498)
+++ trunk/Source/WebCore/dom/Element.idl	2012-08-02 21:28:12 UTC (rev 124499)
@@ -96,6 +96,8 @@
         // HTML 5
         NodeList getElementsByClassName(in [Optional=DefaultIsUndefined] DOMString name);
 
+        attribute [Reflect=class] DOMString className;
+
 #if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT
         readonly attribute DOMStringMap dataset;
 #endif

Modified: trunk/Source/WebCore/html/HTMLElement.idl (124498 => 124499)


--- trunk/Source/WebCore/html/HTMLElement.idl	2012-08-02 21:25:37 UTC (rev 124498)
+++ trunk/Source/WebCore/html/HTMLElement.idl	2012-08-02 21:28:12 UTC (rev 124499)
@@ -32,7 +32,6 @@
                  attribute [Reflect] DOMString lang;
                  attribute boolean             translate;
                  attribute [Reflect] DOMString dir;
-                 attribute [Reflect=class] DOMString className;
                  readonly attribute DOMTokenList classList;
 
                  attribute long              tabIndex;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to