Title: [216208] trunk
Revision
216208
Author
cdu...@apple.com
Date
2017-05-04 14:27:11 -0700 (Thu, 04 May 2017)

Log Message

Reformat / Clean up Node.idl to match the specification
https://bugs.webkit.org/show_bug.cgi?id=171686

Reviewed by Sam Weinig.

Source/WebCore:

Reformat / Clean up Node.idl to match the specification:
- https://dom.spec.whatwg.org/#node

There should be no Web-facing behavior change, except for Node properties
being enumerated in a slightly different order.

* dom/Node.idl:

LayoutTests:

Rebaseline existing test now that the Node properties are enumerated in a
slightly different order.

* js/dom/dom-static-property-for-in-iteration-expected.txt:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (216207 => 216208)


--- trunk/LayoutTests/ChangeLog	2017-05-04 21:06:37 UTC (rev 216207)
+++ trunk/LayoutTests/ChangeLog	2017-05-04 21:27:11 UTC (rev 216208)
@@ -1,3 +1,15 @@
+2017-05-04  Chris Dumez  <cdu...@apple.com>
+
+        Reformat / Clean up Node.idl to match the specification
+        https://bugs.webkit.org/show_bug.cgi?id=171686
+
+        Reviewed by Sam Weinig.
+
+        Rebaseline existing test now that the Node properties are enumerated in a
+        slightly different order.
+
+        * js/dom/dom-static-property-for-in-iteration-expected.txt:
+
 2017-05-04  Sam Weinig  <s...@webkit.org>
 
         Remove support for legacy Notifications

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


--- trunk/LayoutTests/js/dom/dom-static-property-for-in-iteration-expected.txt	2017-05-04 21:06:37 UTC (rev 216207)
+++ trunk/LayoutTests/js/dom/dom-static-property-for-in-iteration-expected.txt	2017-05-04 21:27:11 UTC (rev 216208)
@@ -138,19 +138,19 @@
 PASS a["lastElementChild"] is null
 PASS a["childElementCount"] is 0
 PASS a["assignedSlot"] is null
+PASS a["nodeType"] is 1
 PASS a["nodeName"] is A
-PASS a["nodeValue"] is null
-PASS a["nodeType"] is 1
+PASS a["isConnected"] is true
+PASS a["ownerDocument"] is [object HTMLDocument]
 PASS a["parentNode"] is [object HTMLBodyElement]
+PASS a["parentElement"] is [object HTMLBodyElement]
 PASS a["childNodes"] is [object NodeList]
 PASS a["firstChild"] is [object Text]
 PASS a["lastChild"] is [object Text]
 PASS a["previousSibling"] is [object Text]
 PASS a["nextSibling"] is [object Text]
-PASS a["ownerDocument"] is [object HTMLDocument]
+PASS a["nodeValue"] is null
 PASS a["textContent"] is nerget
-PASS a["isConnected"] is true
-PASS a["parentElement"] is [object HTMLBodyElement]
 PASS a["ELEMENT_NODE"] is 1
 PASS a["ATTRIBUTE_NODE"] is 2
 PASS a["TEXT_NODE"] is 3

Modified: trunk/Source/WebCore/ChangeLog (216207 => 216208)


--- trunk/Source/WebCore/ChangeLog	2017-05-04 21:06:37 UTC (rev 216207)
+++ trunk/Source/WebCore/ChangeLog	2017-05-04 21:27:11 UTC (rev 216208)
@@ -1,3 +1,18 @@
+2017-05-04  Chris Dumez  <cdu...@apple.com>
+
+        Reformat / Clean up Node.idl to match the specification
+        https://bugs.webkit.org/show_bug.cgi?id=171686
+
+        Reviewed by Sam Weinig.
+
+        Reformat / Clean up Node.idl to match the specification:
+        - https://dom.spec.whatwg.org/#node
+
+        There should be no Web-facing behavior change, except for Node properties
+        being enumerated in a slightly different order.
+
+        * dom/Node.idl:
+
 2017-05-04  Sam Weinig  <s...@webkit.org>
 
         Remove support for legacy Notifications

Modified: trunk/Source/WebCore/dom/Node.idl (216207 => 216208)


--- trunk/Source/WebCore/dom/Node.idl	2017-05-04 21:06:37 UTC (rev 216207)
+++ trunk/Source/WebCore/dom/Node.idl	2017-05-04 21:27:11 UTC (rev 216208)
@@ -26,56 +26,43 @@
     JSCustomMarkFunction,
     JSCustomPushEventHandlerScope,
 ] interface Node : EventTarget {
-    // NodeType
     const unsigned short ELEMENT_NODE = 1;
     const unsigned short ATTRIBUTE_NODE = 2;
     const unsigned short TEXT_NODE = 3;
     const unsigned short CDATA_SECTION_NODE = 4;
-    const unsigned short ENTITY_REFERENCE_NODE = 5;
-    const unsigned short ENTITY_NODE = 6;
+    const unsigned short ENTITY_REFERENCE_NODE = 5; // Historical.
+    const unsigned short ENTITY_NODE = 6; // Historical.
     const unsigned short PROCESSING_INSTRUCTION_NODE = 7;
     const unsigned short COMMENT_NODE = 8;
     const unsigned short DOCUMENT_NODE = 9;
     const unsigned short DOCUMENT_TYPE_NODE = 10;
     const unsigned short DOCUMENT_FRAGMENT_NODE = 11;
-    const unsigned short NOTATION_NODE = 12;
-
+    const unsigned short NOTATION_NODE = 12; // Historical.
+    [DOMJIT=Getter, CustomGetter] readonly attribute unsigned short nodeType;
     readonly attribute DOMString nodeName;
 
-    [CEReactions, SetterMayThrowException] attribute DOMString? nodeValue;
+    readonly attribute USVString baseURI;
 
-    [DOMJIT=Getter, CustomGetter] readonly attribute unsigned short nodeType;
+    [EnabledAtRuntime=ShadowDOM] readonly attribute boolean isConnected;
+    [DOMJIT=Getter] readonly attribute Document? ownerDocument;
+    [EnabledAtRuntime=ShadowDOM] Node getRootNode(optional GetRootNodeOptions options);
     [DOMJIT=Getter] readonly attribute Node? parentNode;
-    readonly attribute NodeList childNodes;
+    readonly attribute Element? parentElement;
+    boolean hasChildNodes();
+    readonly attribute NodeList childNodes; // FIXME: Should be [SameObject].
     [DOMJIT=Getter] readonly attribute Node? firstChild;
     [DOMJIT=Getter] readonly attribute Node? lastChild;
     [DOMJIT=Getter] readonly attribute Node? previousSibling;
     [DOMJIT=Getter] readonly attribute Node? nextSibling;
-    [DOMJIT=Getter] readonly attribute Document? ownerDocument;
 
-    [CEReactions, Custom, MayThrowException] Node insertBefore(Node newChild, Node? refChild);
-    [CEReactions, Custom, MayThrowException] Node replaceChild(Node newChild, Node oldChild);
-    [CEReactions, Custom, MayThrowException] Node removeChild(Node oldChild);
-    [CEReactions, Custom, MayThrowException] Node appendChild(Node newChild);
+    [CEReactions, SetterMayThrowException] attribute DOMString? nodeValue;
+    [CEReactions, SetterMayThrowException] attribute DOMString? textContent;
+    [CEReactions] void normalize();
 
-    boolean hasChildNodes();
-
     [CEReactions, ImplementedAs=cloneNodeForBindings, MayThrowException, NewObject] Node cloneNode(optional boolean deep = false);
-
-    void normalize();
-
-    readonly attribute USVString baseURI;
-
-    [CEReactions, SetterMayThrowException] attribute DOMString? textContent;
-
-    boolean isSameNode(Node? other);
     boolean isEqualNode(Node? other);
+    boolean isSameNode(Node? other); // Historical alias of ===.
 
-    DOMString? lookupPrefix(DOMString? namespaceURI);
-    DOMString? lookupNamespaceURI(DOMString? prefix);
-    boolean isDefaultNamespace(DOMString? namespaceURI);
-
-    // DocumentPosition
     const unsigned short DOCUMENT_POSITION_DISCONNECTED = 0x01;
     const unsigned short DOCUMENT_POSITION_PRECEDING = 0x02;
     const unsigned short DOCUMENT_POSITION_FOLLOWING = 0x04;
@@ -82,15 +69,17 @@
     const unsigned short DOCUMENT_POSITION_CONTAINS = 0x08;
     const unsigned short DOCUMENT_POSITION_CONTAINED_BY = 0x10;
     const unsigned short DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 0x20;
-
     unsigned short compareDocumentPosition(Node other);
-
     boolean contains(Node? other);
 
-    [EnabledAtRuntime=ShadowDOM] Node getRootNode(optional GetRootNodeOptions options);
-    [EnabledAtRuntime=ShadowDOM] readonly attribute boolean isConnected;
+    DOMString? lookupPrefix(DOMString? namespaceURI);
+    DOMString? lookupNamespaceURI(DOMString? prefix);
+    boolean isDefaultNamespace(DOMString? namespaceURI);
 
-    readonly attribute Element parentElement;
+    [CEReactions, Custom, MayThrowException] Node insertBefore(Node node, Node? child);
+    [CEReactions, Custom, MayThrowException] Node appendChild(Node node);
+    [CEReactions, Custom, MayThrowException] Node replaceChild(Node node, Node child);
+    [CEReactions, Custom, MayThrowException] Node removeChild(Node child);
 };
 
 dictionary GetRootNodeOptions {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to