mirror of
https://github.com/servo/servo.git
synced 2025-07-23 15:23:42 +01:00
Replacing Node.prototype.rootNode for Node.prototype.getRootNode.
This commit is contained in:
parent
3916d1d613
commit
0074d2a7a8
5 changed files with 6 additions and 73 deletions
|
@ -1934,8 +1934,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()
|
||||
}
|
||||
|
||||
|
@ -2703,3 +2703,4 @@ impl Into<LayoutElementType> for ElementTypeId {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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]
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
[historical.html]
|
||||
type: testharness
|
||||
[Node member must be nuked: rootNode]
|
||||
expected: FAIL
|
||||
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue