1
0
mirror of https://github.com/roytam1/UXP.git synced 2026-05-26 13:58:49 +00:00

Issue #1585 - Replace node.rootNode with node.getRootNode()

This removes the (default disabled) node.rootNode readonly attribute
and replaces it with a node.getRootNode() function per WhatWG
spec discussion.
Based on work by John Dai <jdai@mozilla.com>
This commit is contained in:
Moonchild
2020-06-10 01:19:37 +00:00
committed by Roy Tam
parent 7359f90456
commit 7900742344
9 changed files with 128 additions and 89 deletions
@@ -12,7 +12,3 @@
expected: FAIL
bug: 660660
[Node member must be nuked: rootNode]
disabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1303802
bug: 1269155
@@ -1,6 +1,5 @@
[interfaces.html]
type: testharness
prefs: [dom.node.rootNode.enabled:true]
[Document interface: attribute origin]
expected: FAIL
@@ -42,60 +41,4 @@
[Text interface: document.createTextNode("abc") must inherit property "assignedSlot" with the proper type (2)]
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
[Node interface: calling getRootNode(GetRootNodeOptions) on document.querySelector("[id\]").attributes[0\] with too few arguments must throw TypeError]
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,15 +0,0 @@
[rootNode.html]
type: testharness
prefs: [dom.node.rootNode.enabled:true]
[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