mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
Implement Node::rootNode
This commit is contained in:
parent
89b276c889
commit
00b3f7930e
4 changed files with 7 additions and 66 deletions
|
@ -1858,6 +1858,11 @@ impl NodeMethods for Node {
|
|||
}
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#dom-node-rootnode
|
||||
fn RootNode(&self) -> Root<Node> {
|
||||
self.inclusive_ancestors().last().unwrap()
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#dom-node-parentnode
|
||||
fn GetParentNode(&self) -> Option<Root<Node>> {
|
||||
self.parent_node.get()
|
||||
|
|
|
@ -32,6 +32,8 @@ interface Node : EventTarget {
|
|||
[Pure]
|
||||
readonly attribute Document? ownerDocument;
|
||||
[Pure]
|
||||
readonly attribute Node rootNode;
|
||||
[Pure]
|
||||
readonly attribute Node? parentNode;
|
||||
[Pure]
|
||||
readonly attribute Element? parentElement;
|
||||
|
|
|
@ -165,9 +165,6 @@
|
|||
[DOMTokenList interface: calling supports(DOMString) on document.body.classList with too few arguments must throw TypeError]
|
||||
expected: FAIL
|
||||
|
||||
[Node interface: attribute rootNode]
|
||||
expected: FAIL
|
||||
|
||||
[Document interface: new Document() must inherit property "origin" with the proper type (3)]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -183,30 +180,6 @@
|
|||
[Document interface: calling queryAll(DOMString) on new Document() with too few arguments must throw TypeError]
|
||||
expected: FAIL
|
||||
|
||||
[Node interface: new Document() must inherit property "rootNode" with the proper type (16)]
|
||||
expected: FAIL
|
||||
|
||||
[Node interface: xmlDoc must inherit property "rootNode" with the proper type (16)]
|
||||
expected: FAIL
|
||||
|
||||
[Node interface: document.createDocumentFragment() must inherit property "rootNode" with the proper type (16)]
|
||||
expected: FAIL
|
||||
|
||||
[Node interface: document.doctype must inherit property "rootNode" with the proper type (16)]
|
||||
expected: FAIL
|
||||
|
||||
[Node interface: element must inherit property "rootNode" with the proper type (16)]
|
||||
expected: FAIL
|
||||
|
||||
[Node interface: document.createTextNode("abc") must inherit property "rootNode" with the proper type (16)]
|
||||
expected: FAIL
|
||||
|
||||
[Node interface: xmlDoc.createProcessingInstruction("abc", "def") must inherit property "rootNode" with the proper type (16)]
|
||||
expected: FAIL
|
||||
|
||||
[Node interface: document.createComment("abc") must inherit property "rootNode" with the proper type (16)]
|
||||
expected: FAIL
|
||||
|
||||
[Element interface: element must inherit property "query" with the proper type (36)]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -222,9 +195,6 @@
|
|||
[Node interface: new Document() must inherit property "isConnected" with the proper type (15)]
|
||||
expected: FAIL
|
||||
|
||||
[Node interface: new Document() must inherit property "rootNode" with the proper type (17)]
|
||||
expected: FAIL
|
||||
|
||||
[Node interface: new Document() must inherit property "isSameNode" with the proper type (31)]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -234,9 +204,6 @@
|
|||
[Node interface: xmlDoc must inherit property "isConnected" with the proper type (15)]
|
||||
expected: FAIL
|
||||
|
||||
[Node interface: xmlDoc must inherit property "rootNode" with the proper type (17)]
|
||||
expected: FAIL
|
||||
|
||||
[Node interface: xmlDoc must inherit property "isSameNode" with the proper type (31)]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -246,9 +213,6 @@
|
|||
[Node interface: document.doctype must inherit property "isConnected" with the proper type (15)]
|
||||
expected: FAIL
|
||||
|
||||
[Node interface: document.doctype must inherit property "rootNode" with the proper type (17)]
|
||||
expected: FAIL
|
||||
|
||||
[Node interface: document.doctype must inherit property "isSameNode" with the proper type (31)]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -258,9 +222,6 @@
|
|||
[Node interface: document.createDocumentFragment() must inherit property "isConnected" with the proper type (15)]
|
||||
expected: FAIL
|
||||
|
||||
[Node interface: document.createDocumentFragment() must inherit property "rootNode" with the proper type (17)]
|
||||
expected: FAIL
|
||||
|
||||
[Node interface: document.createDocumentFragment() must inherit property "isSameNode" with the proper type (31)]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -321,9 +282,6 @@
|
|||
[Node interface: element must inherit property "isConnected" with the proper type (15)]
|
||||
expected: FAIL
|
||||
|
||||
[Node interface: element must inherit property "rootNode" with the proper type (17)]
|
||||
expected: FAIL
|
||||
|
||||
[Node interface: element must inherit property "isSameNode" with the proper type (31)]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -339,9 +297,6 @@
|
|||
[Node interface: document.createTextNode("abc") must inherit property "isConnected" with the proper type (15)]
|
||||
expected: FAIL
|
||||
|
||||
[Node interface: document.createTextNode("abc") must inherit property "rootNode" with the proper type (17)]
|
||||
expected: FAIL
|
||||
|
||||
[Node interface: document.createTextNode("abc") must inherit property "isSameNode" with the proper type (31)]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -351,9 +306,6 @@
|
|||
[Node interface: xmlDoc.createProcessingInstruction("abc", "def") must inherit property "isConnected" with the proper type (15)]
|
||||
expected: FAIL
|
||||
|
||||
[Node interface: xmlDoc.createProcessingInstruction("abc", "def") must inherit property "rootNode" with the proper type (17)]
|
||||
expected: FAIL
|
||||
|
||||
[Node interface: xmlDoc.createProcessingInstruction("abc", "def") must inherit property "isSameNode" with the proper type (31)]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -363,9 +315,6 @@
|
|||
[Node interface: document.createComment("abc") must inherit property "isConnected" with the proper type (15)]
|
||||
expected: FAIL
|
||||
|
||||
[Node interface: document.createComment("abc") must inherit property "rootNode" with the proper type (17)]
|
||||
expected: FAIL
|
||||
|
||||
[Node interface: document.createComment("abc") must inherit property "isSameNode" with the proper type (31)]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
[rootNode.html]
|
||||
type: testharness
|
||||
bug: https://github.com/servo/servo/issues/10747
|
||||
[rootNode attribute must return the context object when it does not have any parent]
|
||||
expected: FAIL
|
||||
|
||||
[rootNode attribute must return the parent node of the context object when the context object has a single ancestor not in a document]
|
||||
expected: FAIL
|
||||
|
||||
[rootNode attribute must return the document when a node is in document]
|
||||
expected: FAIL
|
||||
|
||||
[rootNode attribute must return a document fragment when a node is in the fragment]
|
||||
expected: FAIL
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue