Title: [204624] trunk
Revision
204624
Author
[email protected]
Date
2016-08-18 19:40:11 -0700 (Thu, 18 Aug 2016)

Log Message

Move prefix / namespaceURI / localName attributes from Node to Attr / Element
https://bugs.webkit.org/show_bug.cgi?id=160988

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

Rebaseline several W3C test now that more checks are passing.

* web-platform-tests/dom/historical-expected.txt:
* web-platform-tests/dom/interfaces-expected.txt:

Source/WebCore:

Move prefix / namespaceURI / localName attributes from Node to Attr / Element
as per the latest DOM specification:
- https://dom.spec.whatwg.org/#element
- https://dom.spec.whatwg.org/#attr

Firefox and Chrome match the specification.

No new tests, rebaselined existing tests.

* dom/Attr.h:
* dom/Attr.idl:
* dom/Element.h:
* dom/Element.idl:
* dom/Node.idl:

LayoutTests:

Update existing layout tests to reflect behavior change.

* fast/dom/Node/initial-values-expected.txt:
* fast/dom/Node/script-tests/initial-values.js:
* http/tests/misc/createElementNamespace1-expected.txt:
* http/tests/misc/createElementNamespace1.xml:
* http/tests/misc/createElementNamespace2-expected.txt:
* http/tests/misc/createElementNamespace2.xhtml:
* http/tests/misc/createElementNamespace3-expected.txt:
* http/tests/misc/createElementNamespace3.html:
* js/dom/dom-static-property-for-in-iteration-expected.txt:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (204623 => 204624)


--- trunk/LayoutTests/ChangeLog	2016-08-19 02:37:52 UTC (rev 204623)
+++ trunk/LayoutTests/ChangeLog	2016-08-19 02:40:11 UTC (rev 204624)
@@ -1,3 +1,22 @@
+2016-08-18  Chris Dumez  <[email protected]>
+
+        Move prefix / namespaceURI / localName attributes from Node to Attr / Element
+        https://bugs.webkit.org/show_bug.cgi?id=160988
+
+        Reviewed by Ryosuke Niwa.
+
+        Update existing layout tests to reflect behavior change.
+
+        * fast/dom/Node/initial-values-expected.txt:
+        * fast/dom/Node/script-tests/initial-values.js:
+        * http/tests/misc/createElementNamespace1-expected.txt:
+        * http/tests/misc/createElementNamespace1.xml:
+        * http/tests/misc/createElementNamespace2-expected.txt:
+        * http/tests/misc/createElementNamespace2.xhtml:
+        * http/tests/misc/createElementNamespace3-expected.txt:
+        * http/tests/misc/createElementNamespace3.html:
+        * js/dom/dom-static-property-for-in-iteration-expected.txt:
+
 2016-08-18  Dean Jackson  <[email protected]>
 
         Support passing preferLowPowerToHighPerformance and failIfMajorPerformanceCaveat

Modified: trunk/LayoutTests/fast/dom/Node/initial-values-expected.txt (204623 => 204624)


--- trunk/LayoutTests/fast/dom/Node/initial-values-expected.txt	2016-08-19 02:37:52 UTC (rev 204623)
+++ trunk/LayoutTests/fast/dom/Node/initial-values-expected.txt	2016-08-19 02:40:11 UTC (rev 204624)
@@ -36,33 +36,33 @@
 PASS attr.nodeValue is ''
 PASS attr.value is ''
 PASS comment.nodeName is '#comment'
-PASS comment.localName is null
-PASS comment.namespaceURI is null
-PASS comment.prefix is null
+PASS comment.localName is undefined.
+PASS comment.namespaceURI is undefined.
+PASS comment.prefix is undefined.
 PASS comment.nodeValue is 'foo'
 PASS comment.data is 'foo'
 PASS document.createCDATASection('foo') threw exception NotSupportedError (DOM Exception 9): The operation is not supported..
 PASS cdata.nodeName is '#cdata-section'
-PASS cdata.localName is null
-PASS cdata.namespaceURI is null
-PASS cdata.prefix is null
+PASS cdata.localName is undefined.
+PASS cdata.namespaceURI is undefined.
+PASS cdata.prefix is undefined.
 PASS cdata.nodeValue is 'foo'
 PASS cdata.data is 'foo'
 PASS fragment.nodeName is '#document-fragment'
-PASS fragment.localName is null
-PASS fragment.namespaceURI is null
-PASS fragment.prefix is null
+PASS fragment.localName is undefined.
+PASS fragment.namespaceURI is undefined.
+PASS fragment.prefix is undefined.
 PASS fragment.nodeValue is null
 PASS doc.nodeName is '#document'
-PASS doc.localName is null
-FAIL doc.namespaceURI should be http://www.w3.org/1999/xhtml (of type string). Was null (of type object).
-PASS doc.prefix is null
+PASS doc.localName is undefined.
+PASS doc.namespaceURI is undefined.
+PASS doc.prefix is undefined.
 PASS doc.nodeValue is null
 PASS doctype.nodeName is 'svg'
 PASS doctype.name is 'svg'
-PASS doctype.localName is null
-PASS doctype.namespaceURI is null
-PASS doctype.prefix is null
+PASS doctype.localName is undefined.
+PASS doctype.namespaceURI is undefined.
+PASS doctype.prefix is undefined.
 PASS doctype.nodeValue is null
 Element creation using createElement on an HTML doc:
 PASS element.nodeName is 'PRE'
@@ -114,20 +114,20 @@
 PASS element.nodeValue is null
 PASS element.attributes.toString() is '[object NamedNodeMap]'
 PASS processingInstruction.nodeName is 'xml-stylesheet'
-PASS processingInstruction.localName is null
-PASS processingInstruction.namespaceURI is null
-PASS processingInstruction.prefix is null
+PASS processingInstruction.localName is undefined.
+PASS processingInstruction.namespaceURI is undefined.
+PASS processingInstruction.prefix is undefined.
 PASS processingInstruction.nodeName is 'xml-stylesheet'
-PASS processingInstruction.localName is null
-PASS processingInstruction.namespaceURI is null
-PASS processingInstruction.prefix is null
+PASS processingInstruction.localName is undefined.
+PASS processingInstruction.namespaceURI is undefined.
+PASS processingInstruction.prefix is undefined.
 PASS processingInstruction.nodeValue is 'type="text/xsl" href=""
 PASS processingInstruction.target is 'xml-stylesheet'
 PASS processingInstruction.data is 'type="text/xsl" href=""
 PASS text.nodeName is '#text'
-PASS text.localName is null
-PASS text.namespaceURI is null
-PASS text.prefix is null
+PASS text.localName is undefined.
+PASS text.namespaceURI is undefined.
+PASS text.prefix is undefined.
 PASS text.nodeValue is 'foo'
 PASS text.data is 'foo'
 PASS successfullyParsed is true

Modified: trunk/LayoutTests/fast/dom/Node/script-tests/initial-values.js (204623 => 204624)


--- trunk/LayoutTests/fast/dom/Node/script-tests/initial-values.js	2016-08-19 02:37:52 UTC (rev 204623)
+++ trunk/LayoutTests/fast/dom/Node/script-tests/initial-values.js	2016-08-19 02:40:11 UTC (rev 204624)
@@ -48,9 +48,9 @@
 
 var comment = document.createComment("foo");
 shouldBe("comment.nodeName", "'#comment'");
-shouldBe("comment.localName", "null");
-shouldBe("comment.namespaceURI", "null");
-shouldBe("comment.prefix", "null");
+shouldBeUndefined("comment.localName");
+shouldBeUndefined("comment.namespaceURI");
+shouldBeUndefined("comment.prefix");
 shouldBe("comment.nodeValue", "'foo'");
 shouldBe("comment.data", "'foo'");
 
@@ -57,34 +57,32 @@
 shouldThrow("document.createCDATASection('foo')");
 var cdata = xmlDoc.createCDATASection("foo");
 shouldBe("cdata.nodeName", "'#cdata-section'");
-shouldBe("cdata.localName", "null");
-shouldBe("cdata.namespaceURI", "null");
-shouldBe("cdata.prefix", "null");
+shouldBeUndefined("cdata.localName");
+shouldBeUndefined("cdata.namespaceURI");
+shouldBeUndefined("cdata.prefix");
 shouldBe("cdata.nodeValue", "'foo'");
 shouldBe("cdata.data", "'foo'");
 
 var fragment = document.createDocumentFragment();
 shouldBe("fragment.nodeName", "'#document-fragment'");
-shouldBe("fragment.localName", "null");
-shouldBe("fragment.namespaceURI", "null");
-shouldBe("fragment.prefix", "null");
+shouldBeUndefined("fragment.localName");
+shouldBeUndefined("fragment.namespaceURI");
+shouldBeUndefined("fragment.prefix");
 shouldBe("fragment.nodeValue", "null");
 
 var doc = document.implementation.createDocument("http://www.w3.org/1999/xhtml", "html", null);
 shouldBe("doc.nodeName", "'#document'");
-shouldBe("doc.localName", "null");
-// Spec: http://www.w3.org/TR/DOM-Level-2-Core/core.html#Level-2-Core-DOM-createDocument
-// Currently both FF and WebKit return null here, disagreeing with the spec
-shouldBe("doc.namespaceURI", "'http://www.w3.org/1999/xhtml'");
-shouldBe("doc.prefix", "null");
+shouldBeUndefined("doc.localName");
+shouldBeUndefined("doc.namespaceURI");
+shouldBeUndefined("doc.prefix");
 shouldBe("doc.nodeValue", "null");
 
 var doctype = document.implementation.createDocumentType("svg", "-//W3C//DTD SVG 1.1//EN", "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd");
 shouldBe("doctype.nodeName", "'svg'");
 shouldBe("doctype.name", "'svg'");
-shouldBe("doctype.localName", "null");
-shouldBe("doctype.namespaceURI", "null");
-shouldBe("doctype.prefix", "null");
+shouldBeUndefined("doctype.localName");
+shouldBeUndefined("doctype.namespaceURI");
+shouldBeUndefined("doctype.prefix");
 shouldBe("doctype.nodeValue", "null");
 
 debug("Element creation using createElement on an HTML doc:")
@@ -160,15 +158,15 @@
 
 var processingInstruction = document.createProcessingInstruction('xml-stylesheet', 'type=\"text/xsl\" href=""
 shouldBe("processingInstruction.nodeName", "'xml-stylesheet'");
-shouldBe("processingInstruction.localName", "null");
-shouldBe("processingInstruction.namespaceURI", "null");
-shouldBe("processingInstruction.prefix", "null");
+shouldBeUndefined("processingInstruction.localName");
+shouldBeUndefined("processingInstruction.namespaceURI");
+shouldBeUndefined("processingInstruction.prefix");
 
 processingInstruction = xmlDoc.createProcessingInstruction('xml-stylesheet', 'type="text/xsl" href=""
 shouldBe("processingInstruction.nodeName", "'xml-stylesheet'");
-shouldBe("processingInstruction.localName", "null");
-shouldBe("processingInstruction.namespaceURI", "null");
-shouldBe("processingInstruction.prefix", "null");
+shouldBeUndefined("processingInstruction.localName");
+shouldBeUndefined("processingInstruction.namespaceURI");
+shouldBeUndefined("processingInstruction.prefix");
 // DOM Core Level 2 and DOM Core Level 3 disagree on ProcessingInstruction.nodeValue
 // L2: entire content excluding the target
 // L3: same as ProcessingInstruction.data
@@ -179,8 +177,8 @@
 
 var text = document.createTextNode("foo");
 shouldBe("text.nodeName", "'#text'");
-shouldBe("text.localName", "null");
-shouldBe("text.namespaceURI", "null");
-shouldBe("text.prefix", "null");
+shouldBeUndefined("text.localName");
+shouldBeUndefined("text.namespaceURI");
+shouldBeUndefined("text.prefix");
 shouldBe("text.nodeValue", "'foo'");
 shouldBe("text.data", "'foo'");

Modified: trunk/LayoutTests/http/tests/misc/createElementNamespace1-expected.txt (204623 => 204624)


--- trunk/LayoutTests/http/tests/misc/createElementNamespace1-expected.txt	2016-08-19 02:37:52 UTC (rev 204623)
+++ trunk/LayoutTests/http/tests/misc/createElementNamespace1-expected.txt	2016-08-19 02:40:11 UTC (rev 204624)
@@ -1,8 +1,5 @@
 This test was written to address rdar://problem/4976879.  And tests how namespaceURI's are assigned.
 
-Test1: document.namespaceURI
-PASS: document.namespaceURI should be 'null' and is.
-
 Test2: document.createElement().namespaceURI
 PASS: document.createElement("div").namespaceURI should be 'null' and is.
 

Modified: trunk/LayoutTests/http/tests/misc/createElementNamespace1.xml (204623 => 204624)


--- trunk/LayoutTests/http/tests/misc/createElementNamespace1.xml	2016-08-19 02:37:52 UTC (rev 204623)
+++ trunk/LayoutTests/http/tests/misc/createElementNamespace1.xml	2016-08-19 02:40:11 UTC (rev 204624)
@@ -10,10 +10,6 @@
     log("This test was written to address rdar://problem/4976879.  And tests how namespaceURI's are assigned.");
     log("");
 
-    log("Test1: document.namespaceURI")
-    shouldBe("document.namespaceURI", "null");
-    log("");
-
     log("Test2: document.createElement().namespaceURI")
     shouldBe("document.createElement(\"div\").namespaceURI", "null");
     log("");

Modified: trunk/LayoutTests/http/tests/misc/createElementNamespace2-expected.txt (204623 => 204624)


--- trunk/LayoutTests/http/tests/misc/createElementNamespace2-expected.txt	2016-08-19 02:37:52 UTC (rev 204623)
+++ trunk/LayoutTests/http/tests/misc/createElementNamespace2-expected.txt	2016-08-19 02:40:11 UTC (rev 204624)
@@ -1,8 +1,5 @@
 This test was written to address rdar://problem/4976879.  And tests how namespaceURI's are assigned.
 
-Test1: document.namespaceURI
-PASS: document.namespaceURI should be 'null' and is.
-
 Test2: document.createElement().namespaceURI
 PASS: document.createElement("div").namespaceURI should be 'http://www.w3.org/1999/xhtml' and is.
 

Modified: trunk/LayoutTests/http/tests/misc/createElementNamespace2.xhtml (204623 => 204624)


--- trunk/LayoutTests/http/tests/misc/createElementNamespace2.xhtml	2016-08-19 02:37:52 UTC (rev 204623)
+++ trunk/LayoutTests/http/tests/misc/createElementNamespace2.xhtml	2016-08-19 02:40:11 UTC (rev 204624)
@@ -8,10 +8,6 @@
     log("This test was written to address rdar://problem/4976879.  And tests how namespaceURI's are assigned.");
     log("");
 
-    log("Test1: document.namespaceURI")
-    shouldBe("document.namespaceURI", "null");
-    log("");
-
     log("Test2: document.createElement().namespaceURI")
     shouldBe("document.createElement(\"div\").namespaceURI", "'http://www.w3.org/1999/xhtml'");
     log("");

Modified: trunk/LayoutTests/http/tests/misc/createElementNamespace3-expected.txt (204623 => 204624)


--- trunk/LayoutTests/http/tests/misc/createElementNamespace3-expected.txt	2016-08-19 02:37:52 UTC (rev 204623)
+++ trunk/LayoutTests/http/tests/misc/createElementNamespace3-expected.txt	2016-08-19 02:40:11 UTC (rev 204624)
@@ -1,8 +1,5 @@
 This test was written to address rdar://problem/4976879.  And tests how namespaceURI's are assigned.
 
-Test1: document.namespaceURI
-PASS: document.namespaceURI should be 'null' and is.
-
 Test2: document.createElement().namespaceURI
 PASS: document.createElement("div").namespaceURI should be 'http://www.w3.org/1999/xhtml' and is.
 
@@ -9,9 +6,6 @@
 Test3: script tag.namespaceURI
 PASS: myScriptTag.namespaceURI should be 'http://www.w3.org/1999/xhtml' and is.
 
-Test4: created document.namespaceURI
-PASS: newDoc.namespaceURI should be 'null' and is.
-
 Test5: created document.createElement.namespaceURI
 PASS: newDoc.createElement("div").namespaceURI should be 'http://www.w3.org/1999/xhtml' and is.
 

Modified: trunk/LayoutTests/http/tests/misc/createElementNamespace3.html (204623 => 204624)


--- trunk/LayoutTests/http/tests/misc/createElementNamespace3.html	2016-08-19 02:37:52 UTC (rev 204623)
+++ trunk/LayoutTests/http/tests/misc/createElementNamespace3.html	2016-08-19 02:40:11 UTC (rev 204624)
@@ -12,10 +12,6 @@
     log("This test was written to address rdar://problem/4976879.  And tests how namespaceURI's are assigned.");
     log("");
 
-    log("Test1: document.namespaceURI")
-    shouldBe("document.namespaceURI", "null");
-    log("");
-
     log("Test2: document.createElement().namespaceURI")
     shouldBe("document.createElement(\"div\").namespaceURI", "'http://www.w3.org/1999/xhtml'");
     log("");
@@ -26,9 +22,6 @@
     log("");
 
     var newDoc = document.implementation.createDocument("http://www.w3.org/1999/xhtml", "", null);
-    log("Test4: created document.namespaceURI");
-    shouldBe("newDoc.namespaceURI", "null");
-    log("");
 
     log("Test5: created document.createElement.namespaceURI");
     shouldBe("newDoc.createElement(\"div\").namespaceURI", "'http://www.w3.org/1999/xhtml'");

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (204623 => 204624)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2016-08-19 02:37:52 UTC (rev 204623)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2016-08-19 02:40:11 UTC (rev 204624)
@@ -1,5 +1,17 @@
 2016-08-18  Chris Dumez  <[email protected]>
 
+        Move prefix / namespaceURI / localName attributes from Node to Attr / Element
+        https://bugs.webkit.org/show_bug.cgi?id=160988
+
+        Reviewed by Ryosuke Niwa.
+
+        Rebaseline several W3C test now that more checks are passing.
+
+        * web-platform-tests/dom/historical-expected.txt:
+        * web-platform-tests/dom/interfaces-expected.txt:
+
+2016-08-18  Chris Dumez  <[email protected]>
+
         Re-sync DOM web platform tests from upstream
         https://bugs.webkit.org/show_bug.cgi?id=160980
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/historical-expected.txt (204623 => 204624)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/historical-expected.txt	2016-08-19 02:37:52 UTC (rev 204623)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/historical-expected.txt	2016-08-19 02:40:11 UTC (rev 204624)
@@ -45,9 +45,9 @@
 PASS Text member must be nuked: replaceWholeText 
 PASS Node member must be nuked: hasAttributes 
 PASS Node member must be nuked: attributes 
-FAIL Node member must be nuked: namespaceURI assert_equals: expected (undefined) undefined but got (object) null
-FAIL Node member must be nuked: prefix assert_equals: expected (undefined) undefined but got (object) null
-FAIL Node member must be nuked: localName assert_equals: expected (undefined) undefined but got (object) null
+PASS Node member must be nuked: namespaceURI 
+PASS Node member must be nuked: prefix 
+PASS Node member must be nuked: localName 
 PASS Node member must be nuked: isSupported 
 PASS Node member must be nuked: getFeature 
 PASS Node member must be nuked: getUserData 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/interfaces-expected.txt (204623 => 204624)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/interfaces-expected.txt	2016-08-19 02:37:52 UTC (rev 204623)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/interfaces-expected.txt	2016-08-19 02:40:11 UTC (rev 204624)
@@ -732,9 +732,11 @@
 PASS Element interface object name 
 PASS Element interface: existence and properties of interface prototype object 
 PASS Element interface: existence and properties of interface prototype object's "constructor" property 
-FAIL Element interface: attribute namespaceURI assert_own_property: expected property "namespaceURI" missing
-FAIL Element interface: attribute prefix assert_own_property: expected property "prefix" missing
-FAIL Element interface: attribute localName assert_own_property: expected property "localName" missing
+PASS Element interface: attribute namespaceURI 
+FAIL Element interface: attribute prefix assert_equals: setter must be undefined for readonly attributes expected (undefined) undefined but got (function) function "function prefix() {
+    [native code]
+}"
+PASS Element interface: attribute localName 
 PASS Element interface: attribute tagName 
 PASS Element interface: attribute id 
 PASS Element interface: attribute className 
@@ -947,9 +949,11 @@
 PASS Attr interface object name 
 FAIL Attr interface: existence and properties of interface prototype object assert_equals: prototype of Attr.prototype is not Object.prototype expected object "[object Object]" but got object "[object NodePrototype]"
 PASS Attr interface: existence and properties of interface prototype object's "constructor" property 
-FAIL Attr interface: attribute namespaceURI assert_own_property: expected property "namespaceURI" missing
-FAIL Attr interface: attribute prefix assert_own_property: expected property "prefix" missing
-FAIL Attr interface: attribute localName assert_own_property: expected property "localName" missing
+PASS Attr interface: attribute namespaceURI 
+FAIL Attr interface: attribute prefix assert_equals: setter must be undefined for readonly attributes expected (undefined) undefined but got (function) function "function prefix() {
+    [native code]
+}"
+PASS Attr interface: attribute localName 
 PASS Attr interface: attribute name 
 FAIL Attr interface: attribute nodeName assert_own_property: expected property "nodeName" missing
 PASS Attr interface: attribute value 

Modified: trunk/LayoutTests/js/dom/dom-static-property-for-in-iteration-expected.txt (204623 => 204624)


--- trunk/LayoutTests/js/dom/dom-static-property-for-in-iteration-expected.txt	2016-08-19 02:37:52 UTC (rev 204623)
+++ trunk/LayoutTests/js/dom/dom-static-property-for-in-iteration-expected.txt	2016-08-19 02:40:11 UTC (rev 204624)
@@ -104,8 +104,11 @@
 PASS a["attributes"] is [object NamedNodeMap]
 PASS a["style"] is [object CSSStyleDeclaration]
 PASS a["id"] is foo
+PASS a["namespaceURI"] is http://www.w3.org/1999/xhtml
+PASS a["prefix"] is null
+PASS a["localName"] is a
 PASS a["offsetLeft"] is 8
-PASS a["offsetTop"] is 1614
+PASS a["offsetTop"] is 1659
 PASS a["offsetWidth"] is 40
 PASS a["offsetHeight"] is 18
 PASS a["clientLeft"] is 0
@@ -143,9 +146,6 @@
 PASS a["previousSibling"] is [object Text]
 PASS a["nextSibling"] is [object Text]
 PASS a["ownerDocument"] is [object HTMLDocument]
-PASS a["namespaceURI"] is http://www.w3.org/1999/xhtml
-PASS a["prefix"] is null
-PASS a["localName"] is a
 PASS a["textContent"] is nerget
 PASS a["isConnected"] is true
 PASS a["parentElement"] is [object HTMLBodyElement]

Modified: trunk/Source/WebCore/ChangeLog (204623 => 204624)


--- trunk/Source/WebCore/ChangeLog	2016-08-19 02:37:52 UTC (rev 204623)
+++ trunk/Source/WebCore/ChangeLog	2016-08-19 02:40:11 UTC (rev 204624)
@@ -1,3 +1,25 @@
+2016-08-18  Chris Dumez  <[email protected]>
+
+        Move prefix / namespaceURI / localName attributes from Node to Attr / Element
+        https://bugs.webkit.org/show_bug.cgi?id=160988
+
+        Reviewed by Ryosuke Niwa.
+
+        Move prefix / namespaceURI / localName attributes from Node to Attr / Element
+        as per the latest DOM specification:
+        - https://dom.spec.whatwg.org/#element
+        - https://dom.spec.whatwg.org/#attr
+
+        Firefox and Chrome match the specification.
+
+        No new tests, rebaselined existing tests.
+
+        * dom/Attr.h:
+        * dom/Attr.idl:
+        * dom/Element.h:
+        * dom/Element.idl:
+        * dom/Node.idl:
+
 2016-08-18  Jonathan Bedard  <[email protected]>
 
         Binding NULL pointer to reference in WebCore::RenderObject

Modified: trunk/Source/WebCore/dom/Attr.h (204623 => 204624)


--- trunk/Source/WebCore/dom/Attr.h	2016-08-19 02:37:52 UTC (rev 204623)
+++ trunk/Source/WebCore/dom/Attr.h	2016-08-19 02:40:11 UTC (rev 204624)
@@ -64,8 +64,12 @@
     void attachToElement(Element*);
     void detachFromElementWithValue(const AtomicString&);
 
-    const AtomicString& namespaceURI() const override { return m_name.namespaceURI(); }
+    const AtomicString& namespaceURI() const final { return m_name.namespaceURI(); }
+    const AtomicString& localName() const final { return m_name.localName(); }
+    const AtomicString& prefix() const final { return m_name.prefix(); }
 
+    void setPrefix(const AtomicString&, ExceptionCode&) final;
+
 private:
     Attr(Element*, const QualifiedName&);
     Attr(Document&, const QualifiedName&, const AtomicString& value);
@@ -75,11 +79,6 @@
     String nodeName() const override { return name(); }
     NodeType nodeType() const override { return ATTRIBUTE_NODE; }
 
-    const AtomicString& localName() const override { return m_name.localName(); }
-    const AtomicString& prefix() const override { return m_name.prefix(); }
-
-    void setPrefix(const AtomicString&, ExceptionCode&) override;
-
     String nodeValue() const override { return value(); }
     void setNodeValue(const String&, ExceptionCode&) override;
     Ref<Node> cloneNodeInternal(Document&, CloningOperation) override;

Modified: trunk/Source/WebCore/dom/Attr.idl (204623 => 204624)


--- trunk/Source/WebCore/dom/Attr.idl	2016-08-19 02:37:52 UTC (rev 204623)
+++ trunk/Source/WebCore/dom/Attr.idl	2016-08-19 02:40:11 UTC (rev 204624)
@@ -39,5 +39,9 @@
     // DOM Level 3
 
     readonly attribute boolean isId;
+
+    readonly attribute DOMString? namespaceURI;
+    [SetterRaisesException] attribute DOMString? prefix;
+    readonly attribute DOMString? localName;
 };
 

Modified: trunk/Source/WebCore/dom/Element.h (204623 => 204624)


--- trunk/Source/WebCore/dom/Element.h	2016-08-19 02:37:52 UTC (rev 204623)
+++ trunk/Source/WebCore/dom/Element.h	2016-08-19 02:40:11 UTC (rev 204624)
@@ -209,6 +209,8 @@
     const AtomicString& prefix() const final { return m_tagName.prefix(); }
     const AtomicString& namespaceURI() const final { return m_tagName.namespaceURI(); }
 
+    void setPrefix(const AtomicString&, ExceptionCode&) final;
+
     String nodeName() const override;
 
     Ref<Element> cloneElementWithChildren(Document&);
@@ -605,7 +607,6 @@
 
     void scrollByUnits(int units, ScrollGranularity);
 
-    void setPrefix(const AtomicString&, ExceptionCode&) final;
     NodeType nodeType() const final;
     bool childTypeAllowed(NodeType) const final;
 

Modified: trunk/Source/WebCore/dom/Element.idl (204623 => 204624)


--- trunk/Source/WebCore/dom/Element.idl	2016-08-19 02:37:52 UTC (rev 204623)
+++ trunk/Source/WebCore/dom/Element.idl	2016-08-19 02:40:11 UTC (rev 204624)
@@ -65,6 +65,10 @@
     // DOM 4
     [Reflect] attribute DOMString id;
 
+    readonly attribute DOMString? namespaceURI;
+    [SetterRaisesException] attribute DOMString? prefix;
+    readonly attribute DOMString? localName;
+
     // Common extensions
 
     readonly attribute double offsetLeft;

Modified: trunk/Source/WebCore/dom/Node.idl (204623 => 204624)


--- trunk/Source/WebCore/dom/Node.idl	2016-08-19 02:37:52 UTC (rev 204623)
+++ trunk/Source/WebCore/dom/Node.idl	2016-08-19 02:40:11 UTC (rev 204624)
@@ -72,10 +72,6 @@
     [ImplementedAs=isSupportedForBindings] boolean isSupported(optional DOMString feature, optional DOMString version);
 #endif
 
-    readonly attribute DOMString?        namespaceURI;
-    [SetterRaisesException] attribute DOMString? prefix;
-    readonly attribute DOMString?        localName;
-
     // Introduced in DOM Level 3:
 
     readonly attribute USVString baseURI;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to