diff options
-rw-r--r-- | components/script/dom/node.rs | 5 | ||||
-rw-r--r-- | components/script/dom/webidls/Node.webidl | 4 | ||||
-rw-r--r-- | tests/wpt/metadata/dom/historical.html.ini | 5 | ||||
-rw-r--r-- | tests/wpt/metadata/dom/interfaces.html.ini | 51 | ||||
-rw-r--r-- | tests/wpt/metadata/dom/nodes/rootNode.html.ini | 14 |
5 files changed, 6 insertions, 73 deletions
diff --git a/components/script/dom/node.rs b/components/script/dom/node.rs index d8e14aff343..c9275306e53 100644 --- a/components/script/dom/node.rs +++ b/components/script/dom/node.rs @@ -1935,8 +1935,8 @@ impl NodeMethods for Node { } } - // https://dom.spec.whatwg.org/#dom-node-rootnode - fn RootNode(&self) -> Root<Node> { + // https://dom.spec.whatwg.org/#dom-node-getrootnode + fn GetRootNode(&self) -> Root<Node> { self.inclusive_ancestors().last().unwrap() } @@ -2704,3 +2704,4 @@ impl Into<LayoutElementType> for ElementTypeId { } } } + diff --git a/components/script/dom/webidls/Node.webidl b/components/script/dom/webidls/Node.webidl index 94532e8e93a..7dcd49286d5 100644 --- a/components/script/dom/webidls/Node.webidl +++ b/components/script/dom/webidls/Node.webidl @@ -30,8 +30,10 @@ interface Node : EventTarget { [Pure] readonly attribute Document? ownerDocument; + [Pure] - readonly attribute Node rootNode; + Node getRootNode(); + [Pure] readonly attribute Node? parentNode; [Pure] diff --git a/tests/wpt/metadata/dom/historical.html.ini b/tests/wpt/metadata/dom/historical.html.ini deleted file mode 100644 index 7455c7e2525..00000000000 --- a/tests/wpt/metadata/dom/historical.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[historical.html] - type: testharness - [Node member must be nuked: rootNode] - expected: FAIL - diff --git a/tests/wpt/metadata/dom/interfaces.html.ini b/tests/wpt/metadata/dom/interfaces.html.ini index 247d68eba6a..7f3791eadd8 100644 --- a/tests/wpt/metadata/dom/interfaces.html.ini +++ b/tests/wpt/metadata/dom/interfaces.html.ini @@ -384,39 +384,6 @@ [CDATASection interface: existence and properties of interface prototype object's "constructor" property] expected: FAIL - [Node interface: operation getRootNode(GetRootNodeOptions)] - expected: FAIL - - [Node interface: new Document() must inherit property "getRootNode" with the proper type (17)] - expected: FAIL - - [Node interface: calling getRootNode(GetRootNodeOptions) on new Document() with too few arguments must throw TypeError] - expected: FAIL - - [Node interface: xmlDoc must inherit property "getRootNode" with the proper type (17)] - expected: FAIL - - [Node interface: calling getRootNode(GetRootNodeOptions) on xmlDoc with too few arguments must throw TypeError] - expected: FAIL - - [Node interface: document.doctype must inherit property "getRootNode" with the proper type (17)] - expected: FAIL - - [Node interface: calling getRootNode(GetRootNodeOptions) on document.doctype with too few arguments must throw TypeError] - expected: FAIL - - [Node interface: document.createDocumentFragment() must inherit property "getRootNode" with the proper type (17)] - expected: FAIL - - [Node interface: calling getRootNode(GetRootNodeOptions) on document.createDocumentFragment() with too few arguments must throw TypeError] - expected: FAIL - - [Node interface: element must inherit property "getRootNode" with the proper type (17)] - expected: FAIL - - [Node interface: calling getRootNode(GetRootNodeOptions) on element with too few arguments must throw TypeError] - expected: FAIL - [Node interface: document.querySelector("[id\]").attributes[0\] must inherit property "getRootNode" with the proper type (17)] expected: FAIL @@ -504,21 +471,3 @@ [Node interface: document.querySelector("[id\]").attributes[0\] must inherit property "removeChild" with the proper type (46)] expected: FAIL - [Node interface: document.createTextNode("abc") must inherit property "getRootNode" with the proper type (17)] - expected: FAIL - - [Node interface: calling getRootNode(GetRootNodeOptions) on document.createTextNode("abc") with too few arguments must throw TypeError] - expected: FAIL - - [Node interface: xmlDoc.createProcessingInstruction("abc", "def") must inherit property "getRootNode" with the proper type (17)] - expected: FAIL - - [Node interface: calling getRootNode(GetRootNodeOptions) on xmlDoc.createProcessingInstruction("abc", "def") with too few arguments must throw TypeError] - expected: FAIL - - [Node interface: document.createComment("abc") must inherit property "getRootNode" with the proper type (17)] - expected: FAIL - - [Node interface: calling getRootNode(GetRootNodeOptions) on document.createComment("abc") with too few arguments must throw TypeError] - expected: FAIL - diff --git a/tests/wpt/metadata/dom/nodes/rootNode.html.ini b/tests/wpt/metadata/dom/nodes/rootNode.html.ini deleted file mode 100644 index a3c447e420e..00000000000 --- a/tests/wpt/metadata/dom/nodes/rootNode.html.ini +++ /dev/null @@ -1,14 +0,0 @@ -[rootNode.html] - type: testharness - [getRootNode() must return the context object when it does not have any parent] - expected: FAIL - - [getRootNode() must return the parent node of the context object when the context object has a single ancestor not in a document] - expected: FAIL - - [getRootNode() must return the document when a node is in document] - expected: FAIL - - [getRootNode() must return a document fragment when a node is in the fragment] - expected: FAIL - |