Diff
Modified: trunk/LayoutTests/ChangeLog (200296 => 200297)
--- trunk/LayoutTests/ChangeLog 2016-04-30 21:41:11 UTC (rev 200296)
+++ trunk/LayoutTests/ChangeLog 2016-04-30 21:58:41 UTC (rev 200297)
@@ -1,3 +1,18 @@
+2016-04-30 Ryosuke Niwa <[email protected]>
+
+ Node.prototype.rootNode is not Web compatible
+ https://bugs.webkit.org/show_bug.cgi?id=157233
+
+ Reviewed by Chris Dumez.
+
+ Removed tests for Node.prototype.rootNode.
+
+ * fast/dom/Node/rootNode-expected.txt: Removed.
+ * fast/dom/Node/rootNode.html: Removed.
+ * fast/shadow-dom/Node-interface-rootNode-expected.txt: Removed.
+ * fast/shadow-dom/Node-interface-rootNode.html: Removed.
+ * js/dom/dom-static-property-for-in-iteration-expected.txt:
+
2016-04-30 Nan Wang <[email protected]>
AX: @aria-label attribute should work on <label> element
Deleted: trunk/LayoutTests/fast/dom/Node/rootNode-expected.txt (200296 => 200297)
--- trunk/LayoutTests/fast/dom/Node/rootNode-expected.txt 2016-04-30 21:41:11 UTC (rev 200296)
+++ trunk/LayoutTests/fast/dom/Node/rootNode-expected.txt 2016-04-30 21:58:41 UTC (rev 200297)
@@ -1,7 +0,0 @@
-
-PASS rootNode attribute must be defined on Node interface
-PASS rootNode attribute must return the context object when it does not have any parent
-PASS rootNode attribute must return the parent node of the context object when the context object has a single ancestor not in a document
-PASS rootNode attribute must return the document when a node is in document
-PASS rootNode attribute must return a document fragment when a node is in the fragment
-
Deleted: trunk/LayoutTests/fast/dom/Node/rootNode.html (200296 => 200297)
--- trunk/LayoutTests/fast/dom/Node/rootNode.html 2016-04-30 21:41:11 UTC (rev 200296)
+++ trunk/LayoutTests/fast/dom/Node/rootNode.html 2016-04-30 21:58:41 UTC (rev 200297)
@@ -1,94 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<title>DOM: 4.4. Interface Node</title>
-<meta name="author" title="Ryosuke Niwa" href=""
-<meta name="assert" content="Node interface must have rootNode attribute">
-<link rel="help" href=""
-<script src=""
-<script src=""
-<link rel='stylesheet' href=''>
-</head>
-<body>
-<div id="log"></div>
-<script>
-
-test(function () {
- assert_true('rootNode' in Node.prototype, 'rootNode must be defined on Node.prototype');
- assert_true('rootNode' in document.createElement('div'), 'rootNode must be defined on a div element');
- assert_true('rootNode' in document.createTextNode(''), 'rootNode must be defined on a text node');
- assert_true('rootNode' in document.createComment(''), 'rootNode must be defined on a comment node');
- assert_true('rootNode' in document.createProcessingInstruction('target', 'data'), 'rootNode must be defined on a processing instruction node');
- assert_true('rootNode' in document, 'rootNode must be defined on a document node');
-}, 'rootNode attribute must be defined on Node interface');
-
-test(function () {
- var element = document.createElement('div');
- assert_equals(element.rootNode, element, 'rootNode on an element without a parent must return the element itself');
-
- var text = document.createTextNode('');
- assert_equals(text.rootNode, text, 'rootNode on a text node without a parent must return the text node itself');
-
- var processingInstruction = document.createProcessingInstruction('target', 'data');
- assert_equals(processingInstruction.rootNode, processingInstruction, 'rootNode on a processing instruction node without a parent must return the processing instruction node itself');
-
- assert_equals(document.rootNode, document, 'rootNode on a document node must return the document itself');
-
-}, 'rootNode attribute must return the context object when it does not have any parent');
-
-test(function () {
- var parent = document.createElement('div');
-
- var element = document.createElement('div');
- parent.appendChild(element);
- assert_equals(element.rootNode, parent, 'rootNode on an element with a single ancestor must return the parent node');
-
- var text = document.createTextNode('');
- parent.appendChild(text);
- assert_equals(text.rootNode, parent, 'rootNode on a text node with a single ancestor must return the parent node');
-
- var processingInstruction = document.createProcessingInstruction('target', 'data');
- parent.appendChild(processingInstruction)
- assert_equals(processingInstruction.rootNode, parent, 'rootNode on a processing instruction node with a single ancestor must return the parent node');
-
-}, 'rootNode attribute must return the parent node of the context object when the context object has a single ancestor not in a document');
-
-test(function () {
- var parent = document.createElement('div');
- document.body.appendChild(parent);
-
- var element = document.createElement('div');
- parent.appendChild(element);
- assert_equals(element.rootNode, document, 'rootNode on an element inside a document must return the document');
-
- var text = document.createTextNode('');
- parent.appendChild(text);
- assert_equals(text.rootNode, document, 'rootNode on a text node inside a document must return the document');
-
- var processingInstruction = document.createProcessingInstruction('target', 'data');
- parent.appendChild(processingInstruction)
- assert_equals(processingInstruction.rootNode, document, 'rootNode on a processing instruction node inside a document must return the document');
-}, 'rootNode attribute must return the document when a node is in document');
-
-test(function () {
- var fragment = document.createDocumentFragment();
- var parent = document.createElement('div');
- fragment.appendChild(parent);
-
- var element = document.createElement('div');
- parent.appendChild(element);
- assert_equals(element.rootNode, fragment, 'rootNode on an element inside a document fragment must return the fragment');
-
- var text = document.createTextNode('');
- parent.appendChild(text);
- assert_equals(text.rootNode, fragment, 'rootNode on a text node inside a document fragment must return the fragment');
-
- var processingInstruction = document.createProcessingInstruction('target', 'data');
- parent.appendChild(processingInstruction)
- assert_equals(processingInstruction.rootNode, fragment,
- 'rootNode on a processing instruction node inside a document fragment must return the fragment');
-}, 'rootNode attribute must return a document fragment when a node is in the fragment');
-
-</script>
-</body>
-</html>
Deleted: trunk/LayoutTests/fast/shadow-dom/Node-interface-rootNode-expected.txt (200296 => 200297)
--- trunk/LayoutTests/fast/shadow-dom/Node-interface-rootNode-expected.txt 2016-04-30 21:41:11 UTC (rev 200296)
+++ trunk/LayoutTests/fast/shadow-dom/Node-interface-rootNode-expected.txt 2016-04-30 21:58:41 UTC (rev 200297)
@@ -1,12 +0,0 @@
-
-PASS rootNode attribute must be defined on ShadowRoot interface
-PASS rootNode attribute must return the context object when it does not have any parent
-PASS rootNode attribute must return the parent node of the context object when the context object has a single ancestor not in a document
-PASS rootNode attribute must return the document when a node is in document and not in a shadow tree
-PASS rootNode attribute must return the open shadow root of the context object when the shadow host is in a document
-PASS rootNode attribute must return the closed shadow root of the context object when the shadow host is in a document
-PASS rootNode attribute must return the root node of the context object when the context object is inside a open shadow root whose shadow host is in another open shadow root
-PASS rootNode attribute must return the root node of the context object when the context object is inside a closed shadow root whose shadow host is in another open shadow root
-PASS rootNode attribute must return the root node of the context object when the context object is inside a open shadow root whose shadow host is in another closed shadow root
-PASS rootNode attribute must return the root node of the context object when the context object is inside a closed shadow root whose shadow host is in another closed shadow root
-
Deleted: trunk/LayoutTests/fast/shadow-dom/Node-interface-rootNode.html (200296 => 200297)
--- trunk/LayoutTests/fast/shadow-dom/Node-interface-rootNode.html 2016-04-30 21:41:11 UTC (rev 200296)
+++ trunk/LayoutTests/fast/shadow-dom/Node-interface-rootNode.html 2016-04-30 21:58:41 UTC (rev 200297)
@@ -1,121 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<title>Shadow DOM: Extensions to Node interface</title>
-<meta name="author" title="Ryosuke Niwa" href=""
-<meta name="assert" content="Node interface must have rootNode attribute">
-<link rel="help" href=""
-<script src=""
-<script src=""
-<link rel='stylesheet' href=''>
-</head>
-<body>
-<div id="log"></div>
-<script>
-
-test(function () {
- assert_true('rootNode' in document.createElement('div').attachShadow({mode: 'closed'}), 'rootNode must be defined on a closed shadow root element');
- assert_true('rootNode' in document.createElement('div').attachShadow({mode: 'open'}), 'rootNode must be defined on a open shadow root element');
-}, 'rootNode attribute must be defined on ShadowRoot interface');
-
-test(function () {
- var closedShadowRoot = document.createElement('div').attachShadow({mode: 'closed'});
- assert_equals(closedShadowRoot.rootNode, closedShadowRoot, 'rootNode on a closed shadow root must return the shadow root itself');
-
- var openShadowRoot = document.createElement('div').attachShadow({mode: 'open'});
- assert_equals(openShadowRoot.rootNode, openShadowRoot, 'rootNode on a open shadow root must return the shadow root itself');
-}, 'rootNode attribute must return the context object when it does not have any parent');
-
-test(function () {
- var parent = document.createElement('div');
-
- var hostWithClosedShadowRoot = document.createElement('div');
- parent.appendChild(hostWithClosedShadowRoot);
- var closedShadowRoot = hostWithClosedShadowRoot.attachShadow({mode: 'closed'});
- assert_equals(closedShadowRoot.rootNode, closedShadowRoot, 'rootNode on a closed shadow root with a single ancestor on its host must return the shadow root itself');
-
- var hostWithOpenShadowRoot = document.createElement('div');
- parent.appendChild(hostWithOpenShadowRoot);
- var openShadowRoot = hostWithOpenShadowRoot.attachShadow({mode: 'open'});
- assert_equals(openShadowRoot.rootNode, openShadowRoot, 'rootNode on a open shadow root with a single ancestor on its host must return the shadow root itself');
-}, 'rootNode attribute must return the parent node of the context object when the context object has a single ancestor not in a document');
-
-test(function () {
- var parent = document.createElement('div');
- document.body.appendChild(parent);
-
- var element = document.createElement('div');
- parent.appendChild(element);
- assert_equals(element.rootNode, document, 'rootNode on an element inside a document must return the document');
-
- var text = document.createTextNode('');
- parent.appendChild(text);
- assert_equals(text.rootNode, document, 'rootNode on a text node inside a document must return the document');
-
- var processingInstruction = document.createProcessingInstruction('target', 'data');
- parent.appendChild(processingInstruction)
- assert_equals(processingInstruction.rootNode, document, 'rootNode on a processing instruction node inside a document must return the document');
-}, 'rootNode attribute must return the document when a node is in document and not in a shadow tree');
-
-function testrootNodeOnNodeInsideShadowTree(mode) {
- test(function () {
- var host = document.createElement('div');
- document.body.appendChild(host);
-
- var shadowRoot = host.attachShadow({mode: mode});
- var parent = document.createElement('p');
- shadowRoot.appendChild(parent);
-
- var element = document.createElement('span');
- parent.appendChild(element);
- assert_equals(element.rootNode, shadowRoot, 'rootNode on an element inside a shadow tree must return the shadow root');
-
- var text = document.createTextNode('');
- parent.appendChild(text);
- assert_equals(text.rootNode, shadowRoot, 'rootNode on a text node inside a shadow tree must return the shadow root');
-
- var processingInstruction = document.createProcessingInstruction('target', 'data');
- parent.appendChild(processingInstruction);
- assert_equals(processingInstruction.rootNode, shadowRoot, 'rootNode on a processing instruction node inside a shadow tree must return the shadow root');
- }, 'rootNode attribute must return the ' + mode + ' shadow root of the context object when the shadow host is in a document');
-}
-
-testrootNodeOnNodeInsideShadowTree('open');
-testrootNodeOnNodeInsideShadowTree('closed');
-
-function testrootNodeOnNodeInsideNestedShadowTree(outerMode, innerMode) {
- test(function () {
- var outerHost = document.createElement('div');
- document.body.appendChild(outerHost);
- var outerShadowRoot = outerHost.attachShadow({mode: outerMode});
-
- var innerHost = document.createElement('section');
- outerShadowRoot.appendChild(innerHost);
- var innerShadowRoot = innerHost.attachShadow({mode: innerMode});
-
- var parent = document.createElement('p');
- innerShadowRoot.appendChild(parent);
-
- var element = document.createElement('span');
- parent.appendChild(element);
- assert_equals(element.rootNode, innerShadowRoot, 'rootNode on an element inside a shadow tree must return its root node');
-
- var text = document.createTextNode('');
- parent.appendChild(text);
- assert_equals(text.rootNode, innerShadowRoot, 'rootNode on a text node inside a shadow tree must return its root node');
-
- var processingInstruction = document.createProcessingInstruction('target', 'data');
- parent.appendChild(processingInstruction);
- assert_equals(processingInstruction.rootNode, innerShadowRoot, 'rootNode on a processing instruction node inside a shadow tree must return its root node');
- }, 'rootNode attribute must return the root node of the context object when the context object is inside a ' + innerMode
- + ' shadow root whose shadow host is in another ' + outerMode + ' shadow root');
-}
-
-testrootNodeOnNodeInsideNestedShadowTree('open', 'open');
-testrootNodeOnNodeInsideNestedShadowTree('open', 'closed');
-testrootNodeOnNodeInsideNestedShadowTree('closed', 'open');
-testrootNodeOnNodeInsideNestedShadowTree('closed', 'closed');
-
-</script>
-</body>
-</html>
Modified: trunk/LayoutTests/js/dom/dom-static-property-for-in-iteration-expected.txt (200296 => 200297)
--- trunk/LayoutTests/js/dom/dom-static-property-for-in-iteration-expected.txt 2016-04-30 21:41:11 UTC (rev 200296)
+++ trunk/LayoutTests/js/dom/dom-static-property-for-in-iteration-expected.txt 2016-04-30 21:58:41 UTC (rev 200297)
@@ -143,7 +143,6 @@
PASS a["previousSibling"] is [object Text]
PASS a["nextSibling"] is [object Text]
PASS a["ownerDocument"] is [object HTMLDocument]
-PASS a["rootNode"] is [object HTMLDocument]
PASS a["namespaceURI"] is http://www.w3.org/1999/xhtml
PASS a["prefix"] is null
PASS a["localName"] is a
Modified: trunk/Source/WebCore/ChangeLog (200296 => 200297)
--- trunk/Source/WebCore/ChangeLog 2016-04-30 21:41:11 UTC (rev 200296)
+++ trunk/Source/WebCore/ChangeLog 2016-04-30 21:58:41 UTC (rev 200297)
@@ -1,3 +1,17 @@
+2016-04-30 Ryosuke Niwa <[email protected]>
+
+ Node.prototype.rootNode is not Web compatible
+ https://bugs.webkit.org/show_bug.cgi?id=157233
+
+ Reviewed by Chris Dumez.
+
+ Turns out that the name rootNode is not Web compatible. Remove the method for now
+ until we can come up with a better name in https://github.com/whatwg/dom/issues/241.
+
+ No new tests since we're just removing a method.
+
+ * dom/Node.idl:
+
2016-04-30 Darin Adler <[email protected]>
Try to fix GTK build.
Modified: trunk/Source/WebCore/dom/Node.idl (200296 => 200297)
--- trunk/Source/WebCore/dom/Node.idl 2016-04-30 21:41:11 UTC (rev 200296)
+++ trunk/Source/WebCore/dom/Node.idl 2016-04-30 21:58:41 UTC (rev 200297)
@@ -61,8 +61,6 @@
readonly attribute Node nextSibling;
readonly attribute Document ownerDocument;
- readonly attribute Node rootNode;
-
// FIXME: newChild should not be nullable.
[ObjCLegacyUnnamedParameters, Custom, RaisesException] Node insertBefore([CustomReturn] Node? newChild,
Node? refChild);