Title: [203552] trunk
Revision
203552
Author
[email protected]
Date
2016-07-21 21:51:28 -0700 (Thu, 21 Jul 2016)

Log Message

Parameter to Node.isSameNode() / isEqualNode() should be mandatory
https://bugs.webkit.org/show_bug.cgi?id=160070

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

Rebaseline several W3C tests now that more checks are passing.

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

Source/WebCore:

Parameter to Node.isSameNode() / isEqualNode() should be mandatory as
per the specification:
- https://dom.spec.whatwg.org/#interface-node

Chrome and Firefox agree with the specification (although Firefox does
not support isSameNode()).

No new tests, rebaselined existing tests.

* dom/Node.idl:

Modified Paths

Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (203551 => 203552)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2016-07-22 04:45:20 UTC (rev 203551)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2016-07-22 04:51:28 UTC (rev 203552)
@@ -1,5 +1,17 @@
 2016-07-21  Chris Dumez  <[email protected]>
 
+        Parameter to Node.isSameNode() / isEqualNode() should be mandatory
+        https://bugs.webkit.org/show_bug.cgi?id=160070
+
+        Reviewed by Ryosuke Niwa.
+
+        Rebaseline several W3C tests now that more checks are passing.
+
+        * web-platform-tests/dom/interfaces-expected.txt:
+        * web-platform-tests/html/dom/interfaces-expected.txt:
+
+2016-07-21  Chris Dumez  <[email protected]>
+
         Parameter to Document.createEvent() should be mandatory
         https://bugs.webkit.org/show_bug.cgi?id=160065
 

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


--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/interfaces-expected.txt	2016-07-22 04:45:20 UTC (rev 203551)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/interfaces-expected.txt	2016-07-22 04:51:28 UTC (rev 203552)
@@ -216,8 +216,8 @@
 PASS Node interface: attribute textContent 
 PASS Node interface: operation normalize() 
 PASS Node interface: operation cloneNode(boolean) 
-FAIL Node interface: operation isEqualNode(Node) assert_equals: property has wrong .length expected 1 but got 0
-FAIL Node interface: operation isSameNode(Node) assert_equals: property has wrong .length expected 1 but got 0
+PASS Node interface: operation isEqualNode(Node) 
+PASS Node interface: operation isSameNode(Node) 
 PASS Node interface: constant DOCUMENT_POSITION_DISCONNECTED on interface object 
 PASS Node interface: constant DOCUMENT_POSITION_DISCONNECTED on interface prototype object 
 PASS Node interface: constant DOCUMENT_POSITION_PRECEDING on interface object 
@@ -373,13 +373,9 @@
 PASS Node interface: new Document() must inherit property "cloneNode" with the proper type (28) 
 PASS Node interface: calling cloneNode(boolean) on new Document() with too few arguments must throw TypeError 
 PASS Node interface: new Document() must inherit property "isEqualNode" with the proper type (29) 
-FAIL Node interface: calling isEqualNode(Node) on new Document() with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
-            fn.apply(obj, args);
-        }" did not throw
+PASS Node interface: calling isEqualNode(Node) on new Document() with too few arguments must throw TypeError 
 PASS Node interface: new Document() must inherit property "isSameNode" with the proper type (30) 
-FAIL Node interface: calling isSameNode(Node) on new Document() with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
-            fn.apply(obj, args);
-        }" did not throw
+PASS Node interface: calling isSameNode(Node) on new Document() with too few arguments must throw TypeError 
 PASS Node interface: new Document() must inherit property "DOCUMENT_POSITION_DISCONNECTED" with the proper type (31) 
 PASS Node interface: new Document() must inherit property "DOCUMENT_POSITION_PRECEDING" with the proper type (32) 
 PASS Node interface: new Document() must inherit property "DOCUMENT_POSITION_FOLLOWING" with the proper type (33) 
@@ -519,13 +515,9 @@
 PASS Node interface: xmlDoc must inherit property "cloneNode" with the proper type (28) 
 PASS Node interface: calling cloneNode(boolean) on xmlDoc with too few arguments must throw TypeError 
 PASS Node interface: xmlDoc must inherit property "isEqualNode" with the proper type (29) 
-FAIL Node interface: calling isEqualNode(Node) on xmlDoc with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
-            fn.apply(obj, args);
-        }" did not throw
+PASS Node interface: calling isEqualNode(Node) on xmlDoc with too few arguments must throw TypeError 
 PASS Node interface: xmlDoc must inherit property "isSameNode" with the proper type (30) 
-FAIL Node interface: calling isSameNode(Node) on xmlDoc with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
-            fn.apply(obj, args);
-        }" did not throw
+PASS Node interface: calling isSameNode(Node) on xmlDoc with too few arguments must throw TypeError 
 PASS Node interface: xmlDoc must inherit property "DOCUMENT_POSITION_DISCONNECTED" with the proper type (31) 
 PASS Node interface: xmlDoc must inherit property "DOCUMENT_POSITION_PRECEDING" with the proper type (32) 
 PASS Node interface: xmlDoc must inherit property "DOCUMENT_POSITION_FOLLOWING" with the proper type (33) 
@@ -643,13 +635,9 @@
 PASS Node interface: document.doctype must inherit property "cloneNode" with the proper type (28) 
 PASS Node interface: calling cloneNode(boolean) on document.doctype with too few arguments must throw TypeError 
 PASS Node interface: document.doctype must inherit property "isEqualNode" with the proper type (29) 
-FAIL Node interface: calling isEqualNode(Node) on document.doctype with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
-            fn.apply(obj, args);
-        }" did not throw
+PASS Node interface: calling isEqualNode(Node) on document.doctype with too few arguments must throw TypeError 
 PASS Node interface: document.doctype must inherit property "isSameNode" with the proper type (30) 
-FAIL Node interface: calling isSameNode(Node) on document.doctype with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
-            fn.apply(obj, args);
-        }" did not throw
+PASS Node interface: calling isSameNode(Node) on document.doctype with too few arguments must throw TypeError 
 PASS Node interface: document.doctype must inherit property "DOCUMENT_POSITION_DISCONNECTED" with the proper type (31) 
 PASS Node interface: document.doctype must inherit property "DOCUMENT_POSITION_PRECEDING" with the proper type (32) 
 PASS Node interface: document.doctype must inherit property "DOCUMENT_POSITION_FOLLOWING" with the proper type (33) 
@@ -755,13 +743,9 @@
 PASS Node interface: document.createDocumentFragment() must inherit property "cloneNode" with the proper type (28) 
 PASS Node interface: calling cloneNode(boolean) on document.createDocumentFragment() with too few arguments must throw TypeError 
 PASS Node interface: document.createDocumentFragment() must inherit property "isEqualNode" with the proper type (29) 
-FAIL Node interface: calling isEqualNode(Node) on document.createDocumentFragment() with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
-            fn.apply(obj, args);
-        }" did not throw
+PASS Node interface: calling isEqualNode(Node) on document.createDocumentFragment() with too few arguments must throw TypeError 
 PASS Node interface: document.createDocumentFragment() must inherit property "isSameNode" with the proper type (30) 
-FAIL Node interface: calling isSameNode(Node) on document.createDocumentFragment() with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
-            fn.apply(obj, args);
-        }" did not throw
+PASS Node interface: calling isSameNode(Node) on document.createDocumentFragment() with too few arguments must throw TypeError 
 PASS Node interface: document.createDocumentFragment() must inherit property "DOCUMENT_POSITION_DISCONNECTED" with the proper type (31) 
 PASS Node interface: document.createDocumentFragment() must inherit property "DOCUMENT_POSITION_PRECEDING" with the proper type (32) 
 PASS Node interface: document.createDocumentFragment() must inherit property "DOCUMENT_POSITION_FOLLOWING" with the proper type (33) 
@@ -976,13 +960,9 @@
 PASS Node interface: element must inherit property "cloneNode" with the proper type (28) 
 PASS Node interface: calling cloneNode(boolean) on element with too few arguments must throw TypeError 
 PASS Node interface: element must inherit property "isEqualNode" with the proper type (29) 
-FAIL Node interface: calling isEqualNode(Node) on element with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
-            fn.apply(obj, args);
-        }" did not throw
+PASS Node interface: calling isEqualNode(Node) on element with too few arguments must throw TypeError 
 PASS Node interface: element must inherit property "isSameNode" with the proper type (30) 
-FAIL Node interface: calling isSameNode(Node) on element with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
-            fn.apply(obj, args);
-        }" did not throw
+PASS Node interface: calling isSameNode(Node) on element with too few arguments must throw TypeError 
 PASS Node interface: element must inherit property "DOCUMENT_POSITION_DISCONNECTED" with the proper type (31) 
 PASS Node interface: element must inherit property "DOCUMENT_POSITION_PRECEDING" with the proper type (32) 
 PASS Node interface: element must inherit property "DOCUMENT_POSITION_FOLLOWING" with the proper type (33) 
@@ -1153,13 +1133,9 @@
 PASS Node interface: document.createTextNode("abc") must inherit property "cloneNode" with the proper type (28) 
 PASS Node interface: calling cloneNode(boolean) on document.createTextNode("abc") with too few arguments must throw TypeError 
 PASS Node interface: document.createTextNode("abc") must inherit property "isEqualNode" with the proper type (29) 
-FAIL Node interface: calling isEqualNode(Node) on document.createTextNode("abc") with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
-            fn.apply(obj, args);
-        }" did not throw
+PASS Node interface: calling isEqualNode(Node) on document.createTextNode("abc") with too few arguments must throw TypeError 
 PASS Node interface: document.createTextNode("abc") must inherit property "isSameNode" with the proper type (30) 
-FAIL Node interface: calling isSameNode(Node) on document.createTextNode("abc") with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
-            fn.apply(obj, args);
-        }" did not throw
+PASS Node interface: calling isSameNode(Node) on document.createTextNode("abc") with too few arguments must throw TypeError 
 PASS Node interface: document.createTextNode("abc") must inherit property "DOCUMENT_POSITION_DISCONNECTED" with the proper type (31) 
 PASS Node interface: document.createTextNode("abc") must inherit property "DOCUMENT_POSITION_PRECEDING" with the proper type (32) 
 PASS Node interface: document.createTextNode("abc") must inherit property "DOCUMENT_POSITION_FOLLOWING" with the proper type (33) 
@@ -1263,13 +1239,9 @@
 PASS Node interface: xmlDoc.createProcessingInstruction("abc", "def") must inherit property "cloneNode" with the proper type (28) 
 PASS Node interface: calling cloneNode(boolean) on xmlDoc.createProcessingInstruction("abc", "def") with too few arguments must throw TypeError 
 PASS Node interface: xmlDoc.createProcessingInstruction("abc", "def") must inherit property "isEqualNode" with the proper type (29) 
-FAIL Node interface: calling isEqualNode(Node) on xmlDoc.createProcessingInstruction("abc", "def") with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
-            fn.apply(obj, args);
-        }" did not throw
+PASS Node interface: calling isEqualNode(Node) on xmlDoc.createProcessingInstruction("abc", "def") with too few arguments must throw TypeError 
 PASS Node interface: xmlDoc.createProcessingInstruction("abc", "def") must inherit property "isSameNode" with the proper type (30) 
-FAIL Node interface: calling isSameNode(Node) on xmlDoc.createProcessingInstruction("abc", "def") with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
-            fn.apply(obj, args);
-        }" did not throw
+PASS Node interface: calling isSameNode(Node) on xmlDoc.createProcessingInstruction("abc", "def") with too few arguments must throw TypeError 
 PASS Node interface: xmlDoc.createProcessingInstruction("abc", "def") must inherit property "DOCUMENT_POSITION_DISCONNECTED" with the proper type (31) 
 PASS Node interface: xmlDoc.createProcessingInstruction("abc", "def") must inherit property "DOCUMENT_POSITION_PRECEDING" with the proper type (32) 
 PASS Node interface: xmlDoc.createProcessingInstruction("abc", "def") must inherit property "DOCUMENT_POSITION_FOLLOWING" with the proper type (33) 
@@ -1371,13 +1343,9 @@
 PASS Node interface: document.createComment("abc") must inherit property "cloneNode" with the proper type (28) 
 PASS Node interface: calling cloneNode(boolean) on document.createComment("abc") with too few arguments must throw TypeError 
 PASS Node interface: document.createComment("abc") must inherit property "isEqualNode" with the proper type (29) 
-FAIL Node interface: calling isEqualNode(Node) on document.createComment("abc") with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
-            fn.apply(obj, args);
-        }" did not throw
+PASS Node interface: calling isEqualNode(Node) on document.createComment("abc") with too few arguments must throw TypeError 
 PASS Node interface: document.createComment("abc") must inherit property "isSameNode" with the proper type (30) 
-FAIL Node interface: calling isSameNode(Node) on document.createComment("abc") with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
-            fn.apply(obj, args);
-        }" did not throw
+PASS Node interface: calling isSameNode(Node) on document.createComment("abc") with too few arguments must throw TypeError 
 PASS Node interface: document.createComment("abc") must inherit property "DOCUMENT_POSITION_DISCONNECTED" with the proper type (31) 
 PASS Node interface: document.createComment("abc") must inherit property "DOCUMENT_POSITION_PRECEDING" with the proper type (32) 
 PASS Node interface: document.createComment("abc") must inherit property "DOCUMENT_POSITION_FOLLOWING" with the proper type (33) 

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


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt	2016-07-22 04:45:20 UTC (rev 203551)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt	2016-07-22 04:51:28 UTC (rev 203552)
@@ -356,9 +356,7 @@
 PASS Node interface: iframe.contentDocument must inherit property "cloneNode" with the proper type (27) 
 PASS Node interface: calling cloneNode(boolean) on iframe.contentDocument with too few arguments must throw TypeError 
 PASS Node interface: iframe.contentDocument must inherit property "isEqualNode" with the proper type (28) 
-FAIL Node interface: calling isEqualNode(Node) on iframe.contentDocument with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
-            fn.apply(obj, args);
-        }" did not throw
+PASS Node interface: calling isEqualNode(Node) on iframe.contentDocument with too few arguments must throw TypeError 
 PASS Node interface: iframe.contentDocument must inherit property "DOCUMENT_POSITION_DISCONNECTED" with the proper type (29) 
 PASS Node interface: iframe.contentDocument must inherit property "DOCUMENT_POSITION_PRECEDING" with the proper type (30) 
 PASS Node interface: iframe.contentDocument must inherit property "DOCUMENT_POSITION_FOLLOWING" with the proper type (31) 
@@ -636,9 +634,7 @@
 PASS Node interface: new Document() must inherit property "cloneNode" with the proper type (27) 
 PASS Node interface: calling cloneNode(boolean) on new Document() with too few arguments must throw TypeError 
 PASS Node interface: new Document() must inherit property "isEqualNode" with the proper type (28) 
-FAIL Node interface: calling isEqualNode(Node) on new Document() with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
-            fn.apply(obj, args);
-        }" did not throw
+PASS Node interface: calling isEqualNode(Node) on new Document() with too few arguments must throw TypeError 
 PASS Node interface: new Document() must inherit property "DOCUMENT_POSITION_DISCONNECTED" with the proper type (29) 
 PASS Node interface: new Document() must inherit property "DOCUMENT_POSITION_PRECEDING" with the proper type (30) 
 PASS Node interface: new Document() must inherit property "DOCUMENT_POSITION_FOLLOWING" with the proper type (31) 
@@ -919,9 +915,7 @@
 PASS Node interface: document.implementation.createDocument(null, "", null) must inherit property "cloneNode" with the proper type (27) 
 PASS Node interface: calling cloneNode(boolean) on document.implementation.createDocument(null, "", null) with too few arguments must throw TypeError 
 PASS Node interface: document.implementation.createDocument(null, "", null) must inherit property "isEqualNode" with the proper type (28) 
-FAIL Node interface: calling isEqualNode(Node) on document.implementation.createDocument(null, "", null) with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
-            fn.apply(obj, args);
-        }" did not throw
+PASS Node interface: calling isEqualNode(Node) on document.implementation.createDocument(null, "", null) with too few arguments must throw TypeError 
 PASS Node interface: document.implementation.createDocument(null, "", null) must inherit property "DOCUMENT_POSITION_DISCONNECTED" with the proper type (29) 
 PASS Node interface: document.implementation.createDocument(null, "", null) must inherit property "DOCUMENT_POSITION_PRECEDING" with the proper type (30) 
 PASS Node interface: document.implementation.createDocument(null, "", null) must inherit property "DOCUMENT_POSITION_FOLLOWING" with the proper type (31) 
@@ -1325,9 +1319,7 @@
 PASS Node interface: document.createElement("noscript") must inherit property "cloneNode" with the proper type (27) 
 PASS Node interface: calling cloneNode(boolean) on document.createElement("noscript") with too few arguments must throw TypeError 
 PASS Node interface: document.createElement("noscript") must inherit property "isEqualNode" with the proper type (28) 
-FAIL Node interface: calling isEqualNode(Node) on document.createElement("noscript") with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
-            fn.apply(obj, args);
-        }" did not throw
+PASS Node interface: calling isEqualNode(Node) on document.createElement("noscript") with too few arguments must throw TypeError 
 PASS Node interface: document.createElement("noscript") must inherit property "DOCUMENT_POSITION_DISCONNECTED" with the proper type (29) 
 PASS Node interface: document.createElement("noscript") must inherit property "DOCUMENT_POSITION_PRECEDING" with the proper type (30) 
 PASS Node interface: document.createElement("noscript") must inherit property "DOCUMENT_POSITION_FOLLOWING" with the proper type (31) 

Modified: trunk/Source/WebCore/ChangeLog (203551 => 203552)


--- trunk/Source/WebCore/ChangeLog	2016-07-22 04:45:20 UTC (rev 203551)
+++ trunk/Source/WebCore/ChangeLog	2016-07-22 04:51:28 UTC (rev 203552)
@@ -1,5 +1,23 @@
 2016-07-21  Chris Dumez  <[email protected]>
 
+        Parameter to Node.isSameNode() / isEqualNode() should be mandatory
+        https://bugs.webkit.org/show_bug.cgi?id=160070
+
+        Reviewed by Ryosuke Niwa.
+
+        Parameter to Node.isSameNode() / isEqualNode() should be mandatory as
+        per the specification:
+        - https://dom.spec.whatwg.org/#interface-node
+
+        Chrome and Firefox agree with the specification (although Firefox does
+        not support isSameNode()).
+
+        No new tests, rebaselined existing tests.
+
+        * dom/Node.idl:
+
+2016-07-21  Chris Dumez  <[email protected]>
+
         Parameter to Document.createEvent() should be mandatory
         https://bugs.webkit.org/show_bug.cgi?id=160065
 

Modified: trunk/Source/WebCore/dom/Node.idl (203551 => 203552)


--- trunk/Source/WebCore/dom/Node.idl	2016-07-22 04:45:20 UTC (rev 203551)
+++ trunk/Source/WebCore/dom/Node.idl	2016-07-22 04:51:28 UTC (rev 203552)
@@ -96,10 +96,8 @@
     // FIXME: the spec says this can also raise on retrieval.
     [SetterRaisesException] attribute DOMString? textContent;
 
-    // FIXME: other should not be optional.
-    boolean            isSameNode(optional Node? other = null);
-    // FIXME: other should not be optional.
-    boolean            isEqualNode(optional Node? other = null);
+    boolean isSameNode(Node? other);
+    boolean isEqualNode(Node? other);
 
     DOMString?         lookupPrefix(optional DOMString? namespaceURI = null);
     boolean            isDefaultNamespace(optional DOMString? namespaceURI = null);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to