Bug 911477 - Implement DOM4 methods: prepend(), append(), before(), after() and replaceWith(). r?bz draft
authorJocelyn Liu <joliu@mozilla.com>
Tue, 12 Apr 2016 10:48:14 +0800
changeset 356290 c4ac617766fe2ea4f0638ee03221f110be5a01ff
parent 356253 cfc7ebe592937ad937cebe04fdad4213eee72fae
child 519378 6375feefdf6bc5299ac55ce7d4365e2633337b08
push id16487
push userbmo:joliu@mozilla.com
push dateTue, 26 Apr 2016 03:13:20 +0000
reviewersbz
bugs911477
milestone49.0a1
Bug 911477 - Implement DOM4 methods: prepend(), append(), before(), after() and replaceWith(). r?bz MozReview-Commit-ID: A6SklLqXZtv
dom/base/nsINode.cpp
dom/base/nsINode.h
dom/webidl/ChildNode.webidl
dom/webidl/ParentNode.webidl
testing/web-platform/meta/dom/interfaces.html.ini
testing/web-platform/meta/dom/nodes/ChildNode-after.html.ini
testing/web-platform/meta/dom/nodes/ChildNode-before.html.ini
testing/web-platform/meta/dom/nodes/ChildNode-replaceWith.html.ini
testing/web-platform/meta/dom/nodes/ParentNode-append.html.ini
testing/web-platform/meta/dom/nodes/ParentNode-prepend.html.ini
testing/web-platform/meta/dom/nodes/append-on-Document.html.ini
testing/web-platform/meta/dom/nodes/prepend-on-Document.html.ini
testing/web-platform/meta/html/dom/interfaces.html.ini
--- a/dom/base/nsINode.cpp
+++ b/dom/base/nsINode.cpp
@@ -1651,16 +1651,177 @@ nsINode::GetNextElementSibling() const
       return nextSibling->AsElement();
     }
     nextSibling = nextSibling->GetNextSibling();
   }
 
   return nullptr;
 }
 
+static already_AddRefed<nsINode>
+GetNodeFromNodeOrString(const OwningNodeOrString& aNode,
+                        nsIDocument* aDocument)
+{
+  if (aNode.IsNode()) {
+    nsCOMPtr<nsINode> node = aNode.GetAsNode();
+    return node.forget();
+  }
+
+  if (aNode.IsString()){
+    RefPtr<nsTextNode> textNode =
+      aDocument->CreateTextNode(aNode.GetAsString());
+    return textNode.forget();
+  }
+
+  MOZ_CRASH("Impossible type");
+}
+
+/**
+ * Implement the algorithm specified at
+ * https://dom.spec.whatwg.org/#converting-nodes-into-a-node for |prepend()|,
+ * |append()|, |before()|, |after()|, and |replaceWith()| APIs.
+ */
+static already_AddRefed<nsINode>
+ConvertNodesOrStringsIntoNode(const Sequence<OwningNodeOrString>& aNodes,
+                              nsIDocument* aDocument,
+                              ErrorResult& aRv)
+{
+  if (aNodes.Length() == 1) {
+    return GetNodeFromNodeOrString(aNodes[0], aDocument);
+  }
+
+  nsCOMPtr<nsINode> fragment = aDocument->CreateDocumentFragment();
+
+  for (const auto& node : aNodes) {
+    nsCOMPtr<nsINode> childNode = GetNodeFromNodeOrString(node, aDocument);
+    fragment->AppendChild(*childNode, aRv);
+    if (aRv.Failed()) {
+      return nullptr;
+    }
+  }
+
+  return fragment.forget();
+}
+
+static void
+InsertNodesIntoHashset(const Sequence<OwningNodeOrString>& aNodes,
+                       nsTHashtable<nsPtrHashKey<nsINode>>& aHashset)
+{
+  for (const auto& node : aNodes) {
+    if (node.IsNode()) {
+      aHashset.PutEntry(node.GetAsNode());
+    }
+  }
+}
+
+static nsINode*
+FindViablePreviousSibling(const nsINode& aNode,
+                          const Sequence<OwningNodeOrString>& aNodes)
+{
+  nsTHashtable<nsPtrHashKey<nsINode>> nodeSet(16);
+  InsertNodesIntoHashset(aNodes, nodeSet);
+
+  nsINode* viablePreviousSibling = nullptr;
+  for (nsINode* sibling = aNode.GetPreviousSibling(); sibling;
+       sibling = sibling->GetPreviousSibling()) {
+    if (!nodeSet.Contains(sibling)) {
+      viablePreviousSibling = sibling;
+      break;
+    }
+  }
+
+  return viablePreviousSibling;
+}
+
+static nsINode*
+FindViableNextSibling(const nsINode& aNode,
+                      const Sequence<OwningNodeOrString>& aNodes)
+{
+  nsTHashtable<nsPtrHashKey<nsINode>> nodeSet(16);
+  InsertNodesIntoHashset(aNodes, nodeSet);
+
+  nsINode* viableNextSibling = nullptr;
+  for (nsINode* sibling = aNode.GetNextSibling(); sibling;
+       sibling = sibling->GetNextSibling()) {
+    if (!nodeSet.Contains(sibling)) {
+      viableNextSibling = sibling;
+      break;
+    }
+  }
+
+  return viableNextSibling;
+}
+
+void
+nsINode::Before(const Sequence<OwningNodeOrString>& aNodes,
+                ErrorResult& aRv)
+{
+  nsCOMPtr<nsINode> parent = GetParentNode();
+  if (!parent) {
+    return;
+  }
+
+  nsINode* viablePreviousSibling = FindViablePreviousSibling(*this, aNodes);
+
+  nsCOMPtr<nsINode> node =
+    ConvertNodesOrStringsIntoNode(aNodes, OwnerDoc(), aRv);
+  if (aRv.Failed()) {
+    return;
+  }
+
+  viablePreviousSibling = viablePreviousSibling ?
+    viablePreviousSibling->GetNextSibling() : parent->GetFirstChild();
+
+  parent->InsertBefore(*node, viablePreviousSibling, aRv);
+}
+
+void
+nsINode::After(const Sequence<OwningNodeOrString>& aNodes,
+               ErrorResult& aRv)
+{
+  nsCOMPtr<nsINode> parent = GetParentNode();
+  if (!parent) {
+    return;
+  }
+
+  nsINode* viableNextSibling = FindViableNextSibling(*this, aNodes);
+
+  nsCOMPtr<nsINode> node =
+    ConvertNodesOrStringsIntoNode(aNodes, OwnerDoc(), aRv);
+  if (aRv.Failed()) {
+    return;
+  }
+
+  parent->InsertBefore(*node, viableNextSibling, aRv);
+}
+
+void
+nsINode::ReplaceWith(const Sequence<OwningNodeOrString>& aNodes,
+                     ErrorResult& aRv)
+{
+  nsCOMPtr<nsINode> parent = GetParentNode();
+  if (!parent) {
+    return;
+  }
+
+  nsINode* viableNextSibling = FindViableNextSibling(*this, aNodes);
+
+  nsCOMPtr<nsINode> node =
+    ConvertNodesOrStringsIntoNode(aNodes, OwnerDoc(), aRv);
+  if (aRv.Failed()) {
+    return;
+  }
+
+  if (parent == GetParentNode()) {
+    parent->ReplaceChild(*node, *this, aRv);
+  } else {
+    parent->InsertBefore(*node, viableNextSibling, aRv);
+  }
+}
+
 void
 nsINode::Remove()
 {
   nsCOMPtr<nsINode> parent = GetParentNode();
   if (!parent) {
     return;
   }
   int32_t index = parent->IndexOf(this);
@@ -1695,16 +1856,42 @@ nsINode::GetLastElementChild() const
       return child->AsElement();
     }
   }
 
   return nullptr;
 }
 
 void
+nsINode::Prepend(const Sequence<OwningNodeOrString>& aNodes,
+                 ErrorResult& aRv)
+{
+  nsCOMPtr<nsINode> node =
+    ConvertNodesOrStringsIntoNode(aNodes, OwnerDoc(), aRv);
+  if (aRv.Failed()) {
+    return;
+  }
+
+  InsertBefore(*node, mFirstChild, aRv);
+}
+
+void
+nsINode::Append(const Sequence<OwningNodeOrString>& aNodes,
+                 ErrorResult& aRv)
+{
+  nsCOMPtr<nsINode> node =
+    ConvertNodesOrStringsIntoNode(aNodes, OwnerDoc(), aRv);
+  if (aRv.Failed()) {
+    return;
+  }
+
+  AppendChild(*node, aRv);
+}
+
+void
 nsINode::doRemoveChildAt(uint32_t aIndex, bool aNotify,
                          nsIContent* aKid, nsAttrAndChildArray& aChildArray)
 {
   NS_PRECONDITION(aKid && aKid->GetParentNode() == this &&
                   aKid == GetChildAt(aIndex) &&
                   IndexOf(aKid) == (int32_t)aIndex, "Bogus aKid");
 
   nsMutationGuard::DidMutate();
--- a/dom/base/nsINode.h
+++ b/dom/base/nsINode.h
@@ -71,16 +71,18 @@ inline bool IsSpaceCharacter(char aChar)
 struct BoxQuadOptions;
 struct ConvertCoordinateOptions;
 class DOMPoint;
 class DOMQuad;
 class DOMRectReadOnly;
 class Element;
 class EventHandlerNonNull;
 template<typename T> class Optional;
+class OwningNodeOrString;
+template<typename> class Sequence;
 class Text;
 class TextOrElementOrDocument;
 struct DOMPointInit;
 } // namespace dom
 } // namespace mozilla
 
 #define NODE_FLAG_BIT(n_) \
   (nsWrapperCache::FlagsType(1U) << (WRAPPER_CACHE_FLAGS_BITS_USED + (n_)))
@@ -263,19 +265,23 @@ class nsINode : public mozilla::dom::Eve
 {
 public:
   typedef mozilla::dom::BoxQuadOptions BoxQuadOptions;
   typedef mozilla::dom::ConvertCoordinateOptions ConvertCoordinateOptions;
   typedef mozilla::dom::DOMPoint DOMPoint;
   typedef mozilla::dom::DOMPointInit DOMPointInit;
   typedef mozilla::dom::DOMQuad DOMQuad;
   typedef mozilla::dom::DOMRectReadOnly DOMRectReadOnly;
+  typedef mozilla::dom::OwningNodeOrString OwningNodeOrString;
   typedef mozilla::dom::TextOrElementOrDocument TextOrElementOrDocument;
   typedef mozilla::ErrorResult ErrorResult;
 
+  template<class T>
+  using Sequence = mozilla::dom::Sequence<T>;
+
   NS_DECLARE_STATIC_IID_ACCESSOR(NS_INODE_IID)
 
   // Among the sub-classes that inherit (directly or indirectly) from nsINode,
   // measurement of the following members may be added later if DMD finds it is
   // worthwhile:
   // - nsGenericHTMLElement:  mForm, mFieldSet
   // - nsGenericHTMLFrameElement: mFrameLoader (bug 672539)
   // - HTMLBodyElement:       mContentStyleRule
@@ -1790,25 +1796,33 @@ public:
     mozilla::ErrorResult rv;
     parent->RemoveChild(*this, rv);
     return rv.StealNSResult();
   }
 
   // ChildNode methods
   mozilla::dom::Element* GetPreviousElementSibling() const;
   mozilla::dom::Element* GetNextElementSibling() const;
+
+  void Before(const Sequence<OwningNodeOrString>& aNodes, ErrorResult& aRv);
+  void After(const Sequence<OwningNodeOrString>& aNodes, ErrorResult& aRv);
+  void ReplaceWith(const Sequence<OwningNodeOrString>& aNodes,
+                   ErrorResult& aRv);
   /**
    * Remove this node from its parent, if any.
    */
   void Remove();
 
   // ParentNode methods
   mozilla::dom::Element* GetFirstElementChild() const;
   mozilla::dom::Element* GetLastElementChild() const;
 
+  void Prepend(const Sequence<OwningNodeOrString>& aNodes, ErrorResult& aRv);
+  void Append(const Sequence<OwningNodeOrString>& aNodes, ErrorResult& aRv);
+
   void GetBoxQuads(const BoxQuadOptions& aOptions,
                    nsTArray<RefPtr<DOMQuad> >& aResult,
                    mozilla::ErrorResult& aRv);
 
   already_AddRefed<DOMQuad> ConvertQuadFromNode(DOMQuad& aQuad,
                                                 const TextOrElementOrDocument& aFrom,
                                                 const ConvertCoordinateOptions& aOptions,
                                                 ErrorResult& aRv);
--- a/dom/webidl/ChildNode.webidl
+++ b/dom/webidl/ChildNode.webidl
@@ -4,23 +4,22 @@
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  * The origin of this IDL file is
  * http://dom.spec.whatwg.org/#interface-childnode
  */
 
 [NoInterfaceObject]
 interface ChildNode {
-// Not implemented yet:
-//  [Unscopable]
-//  void before((Node or DOMString)... nodes);
-//  [Unscopable]
-//  void after((Node or DOMString)... nodes);
-//  [Unscopable]
-//  void replace((Node or DOMString)... nodes);
+  [Throws, Unscopable]
+  void before((Node or DOMString)... nodes);
+  [Throws, Unscopable]
+  void after((Node or DOMString)... nodes);
+  [Throws, Unscopable]
+  void replaceWith((Node or DOMString)... nodes);
   [Unscopable]
   void remove();
 };
 
 [NoInterfaceObject]
 interface NonDocumentTypeChildNode {
   [Pure]
   readonly attribute Element? previousElementSibling;
--- a/dom/webidl/ParentNode.webidl
+++ b/dom/webidl/ParentNode.webidl
@@ -13,12 +13,13 @@ interface ParentNode {
   readonly attribute HTMLCollection children;
   [Pure]
   readonly attribute Element? firstElementChild;
   [Pure]
   readonly attribute Element? lastElementChild;
   [Pure]
   readonly attribute unsigned long childElementCount;
 
-  // Not implemented yet
-  // void prepend((Node or DOMString)... nodes);
-  // void append((Node or DOMString)... nodes);
+  [Throws, Unscopable]
+  void prepend((Node or DOMString)... nodes);
+  [Throws, Unscopable]
+  void append((Node or DOMString)... nodes);
 };
--- a/testing/web-platform/meta/dom/interfaces.html.ini
+++ b/testing/web-platform/meta/dom/interfaces.html.ini
@@ -1,268 +1,91 @@
 [interfaces.html]
   type: testharness
   [MutationObserver interface: operation observe(Node,MutationObserverInit)]
     expected: FAIL
 
   [Document interface: attribute origin]
     expected: FAIL
 
-  [Document interface: operation prepend([object Object\],[object Object\])]
-    expected: FAIL
-
-  [Document interface: operation append([object Object\],[object Object\])]
-    expected: FAIL
-
   [Document interface: operation query(DOMString)]
     expected: FAIL
 
   [Document interface: operation queryAll(DOMString)]
     expected: FAIL
 
   [Document interface: xmlDoc must inherit property "origin" with the proper type (3)]
     expected: FAIL
 
-  [Document interface: xmlDoc must inherit property "prepend" with the proper type (32)]
-    expected: FAIL
-
-  [Document interface: calling prepend([object Object\],[object Object\]) on xmlDoc with too few arguments must throw TypeError]
-    expected: FAIL
-
-  [Document interface: xmlDoc must inherit property "append" with the proper type (33)]
-    expected: FAIL
-
-  [Document interface: calling append([object Object\],[object Object\]) on xmlDoc with too few arguments must throw TypeError]
-    expected: FAIL
-
   [Document interface: xmlDoc must inherit property "query" with the proper type (34)]
     expected: FAIL
 
   [Document interface: calling query(DOMString) on xmlDoc with too few arguments must throw TypeError]
     expected: FAIL
 
   [Document interface: xmlDoc must inherit property "queryAll" with the proper type (35)]
     expected: FAIL
 
   [Document interface: calling queryAll(DOMString) on xmlDoc with too few arguments must throw TypeError]
     expected: FAIL
 
   [DOMImplementation interface: operation hasFeature()]
     expected: FAIL
 
-  [DocumentFragment interface: operation prepend([object Object\],[object Object\])]
-    expected: FAIL
-
-  [DocumentFragment interface: operation append([object Object\],[object Object\])]
-    expected: FAIL
-
   [DocumentFragment interface: operation query(DOMString)]
     expected: FAIL
 
   [DocumentFragment interface: operation queryAll(DOMString)]
     expected: FAIL
 
-  [DocumentFragment interface: document.createDocumentFragment() must inherit property "prepend" with the proper type (5)]
-    expected: FAIL
-
-  [DocumentFragment interface: calling prepend([object Object\],[object Object\]) on document.createDocumentFragment() with too few arguments must throw TypeError]
-    expected: FAIL
-
-  [DocumentFragment interface: document.createDocumentFragment() must inherit property "append" with the proper type (6)]
-    expected: FAIL
-
-  [DocumentFragment interface: calling append([object Object\],[object Object\]) on document.createDocumentFragment() with too few arguments must throw TypeError]
-    expected: FAIL
-
   [DocumentFragment interface: document.createDocumentFragment() must inherit property "query" with the proper type (7)]
     expected: FAIL
 
   [DocumentFragment interface: calling query(DOMString) on document.createDocumentFragment() with too few arguments must throw TypeError]
     expected: FAIL
 
   [DocumentFragment interface: document.createDocumentFragment() must inherit property "queryAll" with the proper type (8)]
     expected: FAIL
 
   [DocumentFragment interface: calling queryAll(DOMString) on document.createDocumentFragment() with too few arguments must throw TypeError]
     expected: FAIL
 
-  [DocumentType interface: operation before([object Object\],[object Object\])]
-    expected: FAIL
-
-  [DocumentType interface: operation after([object Object\],[object Object\])]
-    expected: FAIL
-
-  [DocumentType interface: operation replaceWith([object Object\],[object Object\])]
-    expected: FAIL
-
-  [DocumentType interface: document.doctype must inherit property "before" with the proper type (3)]
-    expected: FAIL
-
-  [DocumentType interface: calling before([object Object\],[object Object\]) on document.doctype with too few arguments must throw TypeError]
-    expected: FAIL
-
-  [DocumentType interface: document.doctype must inherit property "after" with the proper type (4)]
-    expected: FAIL
-
-  [DocumentType interface: calling after([object Object\],[object Object\]) on document.doctype with too few arguments must throw TypeError]
-    expected: FAIL
-
-  [DocumentType interface: document.doctype must inherit property "replaceWith" with the proper type (5)]
-    expected: FAIL
-
-  [DocumentType interface: calling replaceWith([object Object\],[object Object\]) on document.doctype with too few arguments must throw TypeError]
-    expected: FAIL
-
-  [Element interface: operation prepend([object Object\],[object Object\])]
-    expected: FAIL
-
-  [Element interface: operation append([object Object\],[object Object\])]
-    expected: FAIL
-
   [Element interface: operation query(DOMString)]
     expected: FAIL
 
   [Element interface: operation queryAll(DOMString)]
     expected: FAIL
 
-  [Element interface: operation before([object Object\],[object Object\])]
-    expected: FAIL
-
-  [Element interface: operation after([object Object\],[object Object\])]
-    expected: FAIL
-
-  [Element interface: operation replaceWith([object Object\],[object Object\])]
-    expected: FAIL
-
-  [Element interface: element must inherit property "prepend" with the proper type (31)]
-    expected: FAIL
-
-  [Element interface: calling prepend([object Object\],[object Object\]) on element with too few arguments must throw TypeError]
-    expected: FAIL
-
-  [Element interface: element must inherit property "append" with the proper type (32)]
-    expected: FAIL
-
-  [Element interface: calling append([object Object\],[object Object\]) on element with too few arguments must throw TypeError]
-    expected: FAIL
-
   [Element interface: element must inherit property "query" with the proper type (33)]
     expected: FAIL
 
   [Element interface: calling query(DOMString) on element with too few arguments must throw TypeError]
     expected: FAIL
 
   [Element interface: element must inherit property "queryAll" with the proper type (34)]
     expected: FAIL
 
   [Element interface: calling queryAll(DOMString) on element with too few arguments must throw TypeError]
     expected: FAIL
 
-  [Element interface: element must inherit property "before" with the proper type (39)]
-    expected: FAIL
-
-  [Element interface: calling before([object Object\],[object Object\]) on element with too few arguments must throw TypeError]
-    expected: FAIL
-
-  [Element interface: element must inherit property "after" with the proper type (40)]
-    expected: FAIL
-
-  [Element interface: calling after([object Object\],[object Object\]) on element with too few arguments must throw TypeError]
-    expected: FAIL
-
-  [Element interface: element must inherit property "replaceWith" with the proper type (41)]
-    expected: FAIL
-
-  [Element interface: calling replaceWith([object Object\],[object Object\]) on element with too few arguments must throw TypeError]
-    expected: FAIL
-
   [Attr interface: existence and properties of interface object]
     expected: FAIL
 
   [Attr interface: existence and properties of interface prototype object]
     expected: FAIL
 
   [Attr interface: attribute nodeValue]
     expected: FAIL
 
   [Attr interface: attribute textContent]
     expected: FAIL
 
-  [CharacterData interface: operation before([object Object\],[object Object\])]
-    expected: FAIL
-
-  [CharacterData interface: operation after([object Object\],[object Object\])]
-    expected: FAIL
-
-  [CharacterData interface: operation replaceWith([object Object\],[object Object\])]
-    expected: FAIL
-
-  [CharacterData interface: document.createTextNode("abc") must inherit property "before" with the proper type (9)]
-    expected: FAIL
-
-  [CharacterData interface: calling before([object Object\],[object Object\]) on document.createTextNode("abc") with too few arguments must throw TypeError]
-    expected: FAIL
-
-  [CharacterData interface: document.createTextNode("abc") must inherit property "after" with the proper type (10)]
-    expected: FAIL
-
-  [CharacterData interface: calling after([object Object\],[object Object\]) on document.createTextNode("abc") with too few arguments must throw TypeError]
-    expected: FAIL
-
-  [CharacterData interface: document.createTextNode("abc") must inherit property "replaceWith" with the proper type (11)]
-    expected: FAIL
-
-  [CharacterData interface: calling replaceWith([object Object\],[object Object\]) on document.createTextNode("abc") with too few arguments must throw TypeError]
-    expected: FAIL
-
-  [CharacterData interface: xmlDoc.createProcessingInstruction("abc", "def") must inherit property "before" with the proper type (9)]
-    expected: FAIL
-
-  [CharacterData interface: calling before([object Object\],[object Object\]) on xmlDoc.createProcessingInstruction("abc", "def") with too few arguments must throw TypeError]
-    expected: FAIL
-
-  [CharacterData interface: xmlDoc.createProcessingInstruction("abc", "def") must inherit property "after" with the proper type (10)]
-    expected: FAIL
-
-  [CharacterData interface: calling after([object Object\],[object Object\]) on xmlDoc.createProcessingInstruction("abc", "def") with too few arguments must throw TypeError]
-    expected: FAIL
-
-  [CharacterData interface: xmlDoc.createProcessingInstruction("abc", "def") must inherit property "replaceWith" with the proper type (11)]
-    expected: FAIL
-
-  [CharacterData interface: calling replaceWith([object Object\],[object Object\]) on xmlDoc.createProcessingInstruction("abc", "def") with too few arguments must throw TypeError]
-    expected: FAIL
-
-  [CharacterData interface: document.createComment("abc") must inherit property "before" with the proper type (9)]
-    expected: FAIL
-
-  [CharacterData interface: calling before([object Object\],[object Object\]) on document.createComment("abc") with too few arguments must throw TypeError]
-    expected: FAIL
-
-  [CharacterData interface: document.createComment("abc") must inherit property "after" with the proper type (10)]
-    expected: FAIL
-
-  [CharacterData interface: calling after([object Object\],[object Object\]) on document.createComment("abc") with too few arguments must throw TypeError]
-    expected: FAIL
-
-  [CharacterData interface: document.createComment("abc") must inherit property "replaceWith" with the proper type (11)]
-    expected: FAIL
-
-  [CharacterData interface: calling replaceWith([object Object\],[object Object\]) on document.createComment("abc") with too few arguments must throw TypeError]
-    expected: FAIL
-
   [NodeFilter interface: existence and properties of interface object]
     expected: FAIL
 
-  [Document interface: xmlDoc must inherit property "prepend" with the proper type (33)]
-    expected: FAIL
-
-  [Document interface: xmlDoc must inherit property "append" with the proper type (34)]
-    expected: FAIL
-
   [Document interface: xmlDoc must inherit property "query" with the proper type (35)]
     expected: FAIL
 
   [Document interface: xmlDoc must inherit property "queryAll" with the proper type (36)]
     expected: FAIL
 
   [DOMTokenList interface: operation replace(DOMString,DOMString)]
     expected: FAIL
@@ -277,52 +100,25 @@
     expected: FAIL
 
   [DOMTokenList interface: document.body.classList must inherit property "supports" with the proper type (7)]
     expected: FAIL
 
   [DOMTokenList interface: calling supports(DOMString) on document.body.classList with too few arguments must throw TypeError]
     expected: FAIL
 
-  [Element interface: element must inherit property "prepend" with the proper type (34)]
-    expected: FAIL
-
-  [Element interface: element must inherit property "append" with the proper type (35)]
-    expected: FAIL
-
   [Element interface: element must inherit property "query" with the proper type (36)]
     expected: FAIL
 
   [Element interface: element must inherit property "queryAll" with the proper type (37)]
     expected: FAIL
 
-  [Element interface: element must inherit property "before" with the proper type (42)]
-    expected: FAIL
-
-  [Element interface: element must inherit property "after" with the proper type (43)]
-    expected: FAIL
-
-  [Element interface: element must inherit property "replaceWith" with the proper type (44)]
-    expected: FAIL
-
   [Document interface: new Document() must inherit property "origin" with the proper type (3)]
     expected: FAIL
 
-  [Document interface: new Document() must inherit property "prepend" with the proper type (33)]
-    expected: FAIL
-
-  [Document interface: calling prepend([object Object\],[object Object\]) on new Document() with too few arguments must throw TypeError]
-    expected: FAIL
-
-  [Document interface: new Document() must inherit property "append" with the proper type (34)]
-    expected: FAIL
-
-  [Document interface: calling append([object Object\],[object Object\]) on new Document() with too few arguments must throw TypeError]
-    expected: FAIL
-
   [Document interface: new Document() must inherit property "query" with the proper type (35)]
     expected: FAIL
 
   [Document interface: calling query(DOMString) on new Document() with too few arguments must throw TypeError]
     expected: FAIL
 
   [Document interface: new Document() must inherit property "queryAll" with the proper type (36)]
     expected: FAIL
deleted file mode 100644
--- a/testing/web-platform/meta/dom/nodes/ChildNode-after.html.ini
+++ /dev/null
@@ -1,137 +0,0 @@
-[ChildNode-after.html]
-  type: testharness
-  [Comment.after() without any argument.]
-    expected: FAIL
-
-  [Comment.after() with null as an argument.]
-    expected: FAIL
-
-  [Comment.after() with undefined as an argument.]
-    expected: FAIL
-
-  [Comment.after() with the empty string as an argument.]
-    expected: FAIL
-
-  [Comment.after() with only text as an argument.]
-    expected: FAIL
-
-  [Comment.after() with only one element as an argument.]
-    expected: FAIL
-
-  [Comment.after() with one element and text as arguments.]
-    expected: FAIL
-
-  [Comment.after() with context object itself as the argument.]
-    expected: FAIL
-
-  [Comment.after() with all siblings of child as arguments.]
-    expected: FAIL
-
-  [Comment.after() when pre-insert behaves like append.]
-    expected: FAIL
-
-  [Comment.after() with one sibling of child and text as arguments.]
-    expected: FAIL
-
-  [Comment.after() on a child without any parent.]
-    expected: FAIL
-
-  [Element.after() without any argument.]
-    expected: FAIL
-
-  [Element.after() with null as an argument.]
-    expected: FAIL
-
-  [Element.after() with undefined as an argument.]
-    expected: FAIL
-
-  [Element.after() with the empty string as an argument.]
-    expected: FAIL
-
-  [Element.after() with only text as an argument.]
-    expected: FAIL
-
-  [Element.after() with only one element as an argument.]
-    expected: FAIL
-
-  [Element.after() with one element and text as arguments.]
-    expected: FAIL
-
-  [Element.after() with context object itself as the argument.]
-    expected: FAIL
-
-  [Element.after() with all siblings of child as arguments.]
-    expected: FAIL
-
-  [Element.after() when pre-insert behaves like append.]
-    expected: FAIL
-
-  [Element.after() with one sibling of child and text as arguments.]
-    expected: FAIL
-
-  [Element.after() on a child without any parent.]
-    expected: FAIL
-
-  [Text.after() without any argument.]
-    expected: FAIL
-
-  [Text.after() with null as an argument.]
-    expected: FAIL
-
-  [Text.after() with undefined as an argument.]
-    expected: FAIL
-
-  [Text.after() with the empty string as an argument.]
-    expected: FAIL
-
-  [Text.after() with only text as an argument.]
-    expected: FAIL
-
-  [Text.after() with only one element as an argument.]
-    expected: FAIL
-
-  [Text.after() with one element and text as arguments.]
-    expected: FAIL
-
-  [Text.after() with context object itself as the argument.]
-    expected: FAIL
-
-  [Text.after() with all siblings of child as arguments.]
-    expected: FAIL
-
-  [Text.after() when pre-insert behaves like append.]
-    expected: FAIL
-
-  [Text.after() with one sibling of child and text as arguments.]
-    expected: FAIL
-
-  [Text.after() on a child without any parent.]
-    expected: FAIL
-
-  [Comment.after() with context object itself and node as the arguments, switching positions.]
-    expected: FAIL
-
-  [Comment.before() with some siblings of child as arguments; no changes in tree; viable sibling is first child.]
-    expected: FAIL
-
-  [Comment.after() with some siblings of child as arguments; no changes in tree.]
-    expected: FAIL
-
-  [Element.after() with context object itself and node as the arguments, switching positions.]
-    expected: FAIL
-
-  [Element.before() with some siblings of child as arguments; no changes in tree; viable sibling is first child.]
-    expected: FAIL
-
-  [Element.after() with some siblings of child as arguments; no changes in tree.]
-    expected: FAIL
-
-  [Text.after() with context object itself and node as the arguments, switching positions.]
-    expected: FAIL
-
-  [Text.before() with some siblings of child as arguments; no changes in tree; viable sibling is first child.]
-    expected: FAIL
-
-  [Text.after() with some siblings of child as arguments; no changes in tree.]
-    expected: FAIL
-
deleted file mode 100644
--- a/testing/web-platform/meta/dom/nodes/ChildNode-before.html.ini
+++ /dev/null
@@ -1,137 +0,0 @@
-[ChildNode-before.html]
-  type: testharness
-  [Comment.before() without any argument.]
-    expected: FAIL
-
-  [Comment.before() with null as an argument.]
-    expected: FAIL
-
-  [Comment.before() with undefined as an argument.]
-    expected: FAIL
-
-  [Comment.before() with the empty string as an argument.]
-    expected: FAIL
-
-  [Comment.before() with only text as an argument.]
-    expected: FAIL
-
-  [Comment.before() with only one element as an argument.]
-    expected: FAIL
-
-  [Comment.before() with one element and text as arguments.]
-    expected: FAIL
-
-  [Comment.before() with context object itself as the argument.]
-    expected: FAIL
-
-  [Comment.before() with all siblings of child as arguments.]
-    expected: FAIL
-
-  [Comment.before() when pre-insert behaves like prepend.]
-    expected: FAIL
-
-  [Comment.before() with one sibling of child and text as arguments.]
-    expected: FAIL
-
-  [Comment.before() on a child without any parent.]
-    expected: FAIL
-
-  [Element.before() without any argument.]
-    expected: FAIL
-
-  [Element.before() with null as an argument.]
-    expected: FAIL
-
-  [Element.before() with undefined as an argument.]
-    expected: FAIL
-
-  [Element.before() with the empty string as an argument.]
-    expected: FAIL
-
-  [Element.before() with only text as an argument.]
-    expected: FAIL
-
-  [Element.before() with only one element as an argument.]
-    expected: FAIL
-
-  [Element.before() with one element and text as arguments.]
-    expected: FAIL
-
-  [Element.before() with context object itself as the argument.]
-    expected: FAIL
-
-  [Element.before() with all siblings of child as arguments.]
-    expected: FAIL
-
-  [Element.before() when pre-insert behaves like prepend.]
-    expected: FAIL
-
-  [Element.before() with one sibling of child and text as arguments.]
-    expected: FAIL
-
-  [Element.before() on a child without any parent.]
-    expected: FAIL
-
-  [Text.before() without any argument.]
-    expected: FAIL
-
-  [Text.before() with null as an argument.]
-    expected: FAIL
-
-  [Text.before() with undefined as an argument.]
-    expected: FAIL
-
-  [Text.before() with the empty string as an argument.]
-    expected: FAIL
-
-  [Text.before() with only text as an argument.]
-    expected: FAIL
-
-  [Text.before() with only one element as an argument.]
-    expected: FAIL
-
-  [Text.before() with one element and text as arguments.]
-    expected: FAIL
-
-  [Text.before() with context object itself as the argument.]
-    expected: FAIL
-
-  [Text.before() with all siblings of child as arguments.]
-    expected: FAIL
-
-  [Text.before() when pre-insert behaves like prepend.]
-    expected: FAIL
-
-  [Text.before() with one sibling of child and text as arguments.]
-    expected: FAIL
-
-  [Text.before() on a child without any parent.]
-    expected: FAIL
-
-  [Comment.before() with context object itself and node as the arguments, switching positions.]
-    expected: FAIL
-
-  [Comment.before() with some siblings of child as arguments; no changes in tree; viable sibling is first child.]
-    expected: FAIL
-
-  [Comment.before() with some siblings of child as arguments; no changes in tree.]
-    expected: FAIL
-
-  [Element.before() with context object itself and node as the arguments, switching positions.]
-    expected: FAIL
-
-  [Element.before() with some siblings of child as arguments; no changes in tree; viable sibling is first child.]
-    expected: FAIL
-
-  [Element.before() with some siblings of child as arguments; no changes in tree.]
-    expected: FAIL
-
-  [Text.before() with context object itself and node as the arguments, switching positions.]
-    expected: FAIL
-
-  [Text.before() with some siblings of child as arguments; no changes in tree; viable sibling is first child.]
-    expected: FAIL
-
-  [Text.before() with some siblings of child as arguments; no changes in tree.]
-    expected: FAIL
-
deleted file mode 100644
--- a/testing/web-platform/meta/dom/nodes/ChildNode-replaceWith.html.ini
+++ /dev/null
@@ -1,101 +0,0 @@
-[ChildNode-replaceWith.html]
-  type: testharness
-  [Comment.replaceWith() without any argument.]
-    expected: FAIL
-
-  [Comment.replaceWith() with null as an argument.]
-    expected: FAIL
-
-  [Comment.replaceWith() with undefined as an argument.]
-    expected: FAIL
-
-  [Comment.replaceWith() with empty string as an argument.]
-    expected: FAIL
-
-  [Comment.replaceWith() with only text as an argument.]
-    expected: FAIL
-
-  [Comment.replaceWith() with only one element as an argument.]
-    expected: FAIL
-
-  [Comment.replaceWith() with sibling of child as arguments.]
-    expected: FAIL
-
-  [Comment.replaceWith() with one sibling of child and text as arguments.]
-    expected: FAIL
-
-  [Comment.replaceWith() with one sibling of child and child itself as arguments.]
-    expected: FAIL
-
-  [Comment.replaceWith() with one element and text as arguments.]
-    expected: FAIL
-
-  [Comment.replaceWith() on a parentless child with two elements as arguments.]
-    expected: FAIL
-
-  [Element.replaceWith() without any argument.]
-    expected: FAIL
-
-  [Element.replaceWith() with null as an argument.]
-    expected: FAIL
-
-  [Element.replaceWith() with undefined as an argument.]
-    expected: FAIL
-
-  [Element.replaceWith() with empty string as an argument.]
-    expected: FAIL
-
-  [Element.replaceWith() with only text as an argument.]
-    expected: FAIL
-
-  [Element.replaceWith() with only one element as an argument.]
-    expected: FAIL
-
-  [Element.replaceWith() with sibling of child as arguments.]
-    expected: FAIL
-
-  [Element.replaceWith() with one sibling of child and text as arguments.]
-    expected: FAIL
-
-  [Element.replaceWith() with one sibling of child and child itself as arguments.]
-    expected: FAIL
-
-  [Element.replaceWith() with one element and text as arguments.]
-    expected: FAIL
-
-  [Element.replaceWith() on a parentless child with two elements as arguments.]
-    expected: FAIL
-
-  [Text.replaceWith() without any argument.]
-    expected: FAIL
-
-  [Text.replaceWith() with null as an argument.]
-    expected: FAIL
-
-  [Text.replaceWith() with undefined as an argument.]
-    expected: FAIL
-
-  [Text.replaceWith() with empty string as an argument.]
-    expected: FAIL
-
-  [Text.replaceWith() with only text as an argument.]
-    expected: FAIL
-
-  [Text.replaceWith() with only one element as an argument.]
-    expected: FAIL
-
-  [Text.replaceWith() with sibling of child as arguments.]
-    expected: FAIL
-
-  [Text.replaceWith() with one sibling of child and text as arguments.]
-    expected: FAIL
-
-  [Text.replaceWith() with one sibling of child and child itself as arguments.]
-    expected: FAIL
-
-  [Text.replaceWith() with one element and text as arguments.]
-    expected: FAIL
-
-  [Text.replaceWith() on a parentless child with two elements as arguments.]
-    expected: FAIL
-
deleted file mode 100644
--- a/testing/web-platform/meta/dom/nodes/ParentNode-append.html.ini
+++ /dev/null
@@ -1,44 +0,0 @@
-[ParentNode-append.html]
-  type: testharness
-  [Element.append() without any argument, on a parent having no child.]
-    expected: FAIL
-
-  [Element.append() with null as an argument, on a parent having no child.]
-    expected: FAIL
-
-  [Element.append() with undefined as an argument, on a parent having no child.]
-    expected: FAIL
-
-  [Element.append() with only text as an argument, on a parent having no child.]
-    expected: FAIL
-
-  [Element.append() with only one element as an argument, on a parent having no child.]
-    expected: FAIL
-
-  [Element.append() with null as an argument, on a parent having a child.]
-    expected: FAIL
-
-  [Element.append() with one element and text as argument, on a parent having a child.]
-    expected: FAIL
-
-  [DocumentFrgment.append() without any argument, on a parent having no child.]
-    expected: FAIL
-
-  [DocumentFrgment.append() with null as an argument, on a parent having no child.]
-    expected: FAIL
-
-  [DocumentFrgment.append() with undefined as an argument, on a parent having no child.]
-    expected: FAIL
-
-  [DocumentFrgment.append() with only text as an argument, on a parent having no child.]
-    expected: FAIL
-
-  [DocumentFrgment.append() with only one element as an argument, on a parent having no child.]
-    expected: FAIL
-
-  [DocumentFrgment.append() with null as an argument, on a parent having a child.]
-    expected: FAIL
-
-  [DocumentFrgment.append() with one element and text as argument, on a parent having a child.]
-    expected: FAIL
-
deleted file mode 100644
--- a/testing/web-platform/meta/dom/nodes/ParentNode-prepend.html.ini
+++ /dev/null
@@ -1,44 +0,0 @@
-[ParentNode-prepend.html]
-  type: testharness
-  [Element.prepend() without any argument, on a parent having no child.]
-    expected: FAIL
-
-  [Element.prepend() with null as an argument, on a parent having no child.]
-    expected: FAIL
-
-  [Element.prepend() with undefined as an argument, on a parent having no child.]
-    expected: FAIL
-
-  [Element.prepend() with only text as an argument, on a parent having no child.]
-    expected: FAIL
-
-  [Element.prepend() with only one element as an argument, on a parent having no child.]
-    expected: FAIL
-
-  [Element.prepend() with null as an argument, on a parent having a child.]
-    expected: FAIL
-
-  [Element.prepend() with one element and text as argument, on a parent having a child.]
-    expected: FAIL
-
-  [DocumentFrgment.prepend() without any argument, on a parent having no child.]
-    expected: FAIL
-
-  [DocumentFrgment.prepend() with null as an argument, on a parent having no child.]
-    expected: FAIL
-
-  [DocumentFrgment.prepend() with undefined as an argument, on a parent having no child.]
-    expected: FAIL
-
-  [DocumentFrgment.prepend() with only text as an argument, on a parent having no child.]
-    expected: FAIL
-
-  [DocumentFrgment.prepend() with only one element as an argument, on a parent having no child.]
-    expected: FAIL
-
-  [DocumentFrgment.prepend() with null as an argument, on a parent having a child.]
-    expected: FAIL
-
-  [DocumentFrgment.prepend() with one element and text as argument, on a parent having a child.]
-    expected: FAIL
-
deleted file mode 100644
--- a/testing/web-platform/meta/dom/nodes/append-on-Document.html.ini
+++ /dev/null
@@ -1,17 +0,0 @@
-[append-on-Document.html]
-  type: testharness
-  [Document.append() without any argument, on a Document having no child.]
-    expected: FAIL
-
-  [Document.append() with only one element as an argument, on a Document having no child.]
-    expected: FAIL
-
-  [Document.append() with only one element as an argument, on a Document having one child.]
-    expected: FAIL
-
-  [Document.append() with text as an argument, on a Document having no child.]
-    expected: FAIL
-
-  [Document.append() with two elements as the argument, on a Document having no child.]
-    expected: FAIL
-
deleted file mode 100644
--- a/testing/web-platform/meta/dom/nodes/prepend-on-Document.html.ini
+++ /dev/null
@@ -1,17 +0,0 @@
-[prepend-on-Document.html]
-  type: testharness
-  [Document.prepend() without any argument, on a Document having no child.]
-    expected: FAIL
-
-  [Document.prepend() with only one element as an argument, on a Document having no child.]
-    expected: FAIL
-
-  [Document.append() with only one element as an argument, on a Document having one child.]
-    expected: FAIL
-
-  [Document.prepend() with text as an argument, on a Document having no child.]
-    expected: FAIL
-
-  [Document.prepend() with two elements as the argument, on a Document having no child.]
-    expected: FAIL
-
--- a/testing/web-platform/meta/html/dom/interfaces.html.ini
+++ b/testing/web-platform/meta/html/dom/interfaces.html.ini
@@ -149,28 +149,16 @@
     expected: FAIL
 
   [Document interface: iframe.contentDocument must inherit property "commands" with the proper type (69)]
     expected: FAIL
 
   [Document interface: iframe.contentDocument must inherit property "all" with the proper type (81)]
     expected: FAIL
 
-  [Document interface: iframe.contentDocument must inherit property "prepend" with the proper type (87)]
-    expected: FAIL
-
-  [Document interface: calling prepend([object Object\],[object Object\]) on iframe.contentDocument with too few arguments must throw TypeError]
-    expected: FAIL
-
-  [Document interface: iframe.contentDocument must inherit property "append" with the proper type (88)]
-    expected: FAIL
-
-  [Document interface: calling append([object Object\],[object Object\]) on iframe.contentDocument with too few arguments must throw TypeError]
-    expected: FAIL
-
   [Document interface: iframe.contentDocument must inherit property "query" with the proper type (89)]
     expected: FAIL
 
   [Document interface: calling query(DOMString) on iframe.contentDocument with too few arguments must throw TypeError]
     expected: FAIL
 
   [Document interface: iframe.contentDocument must inherit property "queryAll" with the proper type (90)]
     expected: FAIL
@@ -350,28 +338,16 @@
     expected: FAIL
 
   [Document interface: document.implementation.createDocument(null, "", null) must inherit property "releaseEvents" with the proper type (80)]
     expected: FAIL
 
   [Document interface: document.implementation.createDocument(null, "", null) must inherit property "all" with the proper type (81)]
     expected: FAIL
 
-  [Document interface: document.implementation.createDocument(null, "", null) must inherit property "prepend" with the proper type (87)]
-    expected: FAIL
-
-  [Document interface: calling prepend([object Object\],[object Object\]) on document.implementation.createDocument(null, "", null) with too few arguments must throw TypeError]
-    expected: FAIL
-
-  [Document interface: document.implementation.createDocument(null, "", null) must inherit property "append" with the proper type (88)]
-    expected: FAIL
-
-  [Document interface: calling append([object Object\],[object Object\]) on document.implementation.createDocument(null, "", null) with too few arguments must throw TypeError]
-    expected: FAIL
-
   [Document interface: document.implementation.createDocument(null, "", null) must inherit property "query" with the proper type (89)]
     expected: FAIL
 
   [Document interface: calling query(DOMString) on document.implementation.createDocument(null, "", null) with too few arguments must throw TypeError]
     expected: FAIL
 
   [Document interface: document.implementation.createDocument(null, "", null) must inherit property "queryAll" with the proper type (90)]
     expected: FAIL
@@ -629,58 +605,28 @@
     expected: FAIL
 
   [HTMLElement interface: document.createElement("noscript") must inherit property "onmousewheel" with the proper type (74)]
     expected: FAIL
 
   [HTMLElement interface: document.createElement("noscript") must inherit property "onsort" with the proper type (87)]
     expected: FAIL
 
-  [Element interface: document.createElement("noscript") must inherit property "prepend" with the proper type (31)]
-    expected: FAIL
-
-  [Element interface: calling prepend([object Object\],[object Object\]) on document.createElement("noscript") with too few arguments must throw TypeError]
-    expected: FAIL
-
-  [Element interface: document.createElement("noscript") must inherit property "append" with the proper type (32)]
-    expected: FAIL
-
-  [Element interface: calling append([object Object\],[object Object\]) on document.createElement("noscript") with too few arguments must throw TypeError]
-    expected: FAIL
-
   [Element interface: document.createElement("noscript") must inherit property "query" with the proper type (33)]
     expected: FAIL
 
   [Element interface: calling query(DOMString) on document.createElement("noscript") with too few arguments must throw TypeError]
     expected: FAIL
 
   [Element interface: document.createElement("noscript") must inherit property "queryAll" with the proper type (34)]
     expected: FAIL
 
   [Element interface: calling queryAll(DOMString) on document.createElement("noscript") with too few arguments must throw TypeError]
     expected: FAIL
 
-  [Element interface: document.createElement("noscript") must inherit property "before" with the proper type (39)]
-    expected: FAIL
-
-  [Element interface: calling before([object Object\],[object Object\]) on document.createElement("noscript") with too few arguments must throw TypeError]
-    expected: FAIL
-
-  [Element interface: document.createElement("noscript") must inherit property "after" with the proper type (40)]
-    expected: FAIL
-
-  [Element interface: calling after([object Object\],[object Object\]) on document.createElement("noscript") with too few arguments must throw TypeError]
-    expected: FAIL
-
-  [Element interface: document.createElement("noscript") must inherit property "replaceWith" with the proper type (41)]
-    expected: FAIL
-
-  [Element interface: calling replaceWith([object Object\],[object Object\]) on document.createElement("noscript") with too few arguments must throw TypeError]
-    expected: FAIL
-
   [HTMLElement must be primary interface of document.createElement("bdi")]
     expected: FAIL
 
   [Stringification of document.createElement("bdi")]
     expected: FAIL
 
   [HTMLUnknownElement must be primary interface of document.createElement("rb")]
     expected: FAIL
@@ -2432,22 +2378,16 @@
     expected: FAIL
 
   [Document interface: iframe.contentDocument must inherit property "commands" with the proper type (70)]
     expected: FAIL
 
   [Document interface: iframe.contentDocument must inherit property "all" with the proper type (82)]
     expected: FAIL
 
-  [Document interface: iframe.contentDocument must inherit property "prepend" with the proper type (88)]
-    expected: FAIL
-
-  [Document interface: iframe.contentDocument must inherit property "append" with the proper type (89)]
-    expected: FAIL
-
   [Document interface: iframe.contentDocument must inherit property "query" with the proper type (90)]
     expected: FAIL
 
   [Document interface: iframe.contentDocument must inherit property "queryAll" with the proper type (91)]
     expected: FAIL
 
   [Document interface: iframe.contentDocument must inherit property "onautocomplete" with the proper type (95)]
     expected: FAIL
@@ -2579,22 +2519,16 @@
     expected: FAIL
 
   [Document interface: document.implementation.createDocument(null, "", null) must inherit property "releaseEvents" with the proper type (81)]
     expected: FAIL
 
   [Document interface: document.implementation.createDocument(null, "", null) must inherit property "all" with the proper type (82)]
     expected: FAIL
 
-  [Document interface: document.implementation.createDocument(null, "", null) must inherit property "prepend" with the proper type (88)]
-    expected: FAIL
-
-  [Document interface: document.implementation.createDocument(null, "", null) must inherit property "append" with the proper type (89)]
-    expected: FAIL
-
   [Document interface: document.implementation.createDocument(null, "", null) must inherit property "query" with the proper type (90)]
     expected: FAIL
 
   [Document interface: document.implementation.createDocument(null, "", null) must inherit property "queryAll" with the proper type (91)]
     expected: FAIL
 
   [Document interface: document.implementation.createDocument(null, "", null) must inherit property "onautocomplete" with the proper type (95)]
     expected: FAIL
@@ -2729,37 +2663,22 @@
     expected: FAIL
 
   [HTMLAllCollection interface: document.all must inherit property "namedItem" with the proper type (3)]
     expected: FAIL
 
   [BarProp interface: attribute visible]
     expected: FAIL
 
-  [Element interface: document.createElement("noscript") must inherit property "prepend" with the proper type (32)]
-    expected: FAIL
-
-  [Element interface: document.createElement("noscript") must inherit property "append" with the proper type (33)]
-    expected: FAIL
-
   [Element interface: document.createElement("noscript") must inherit property "query" with the proper type (34)]
     expected: FAIL
 
   [Element interface: document.createElement("noscript") must inherit property "queryAll" with the proper type (35)]
     expected: FAIL
 
-  [Element interface: document.createElement("noscript") must inherit property "before" with the proper type (40)]
-    expected: FAIL
-
-  [Element interface: document.createElement("noscript") must inherit property "after" with the proper type (41)]
-    expected: FAIL
-
-  [Element interface: document.createElement("noscript") must inherit property "replaceWith" with the proper type (42)]
-    expected: FAIL
-
   [Document interface: new Document() must inherit property "origin" with the proper type (3)]
     expected: FAIL
 
   [Document interface: new Document() must inherit property "styleSheetSets" with the proper type (32)]
     expected: FAIL
 
   [Document interface: new Document() must inherit property "domain" with the proper type (35)]
     expected: FAIL
@@ -2903,28 +2822,16 @@
     expected: FAIL
 
   [Document interface: new Document() must inherit property "releaseEvents" with the proper type (81)]
     expected: FAIL
 
   [Document interface: new Document() must inherit property "all" with the proper type (82)]
     expected: FAIL
 
-  [Document interface: new Document() must inherit property "prepend" with the proper type (88)]
-    expected: FAIL
-
-  [Document interface: calling prepend([object Object\],[object Object\]) on new Document() with too few arguments must throw TypeError]
-    expected: FAIL
-
-  [Document interface: new Document() must inherit property "append" with the proper type (89)]
-    expected: FAIL
-
-  [Document interface: calling append([object Object\],[object Object\]) on new Document() with too few arguments must throw TypeError]
-    expected: FAIL
-
   [Document interface: new Document() must inherit property "query" with the proper type (90)]
     expected: FAIL
 
   [Document interface: calling query(DOMString) on new Document() with too few arguments must throw TypeError]
     expected: FAIL
 
   [Document interface: new Document() must inherit property "queryAll" with the proper type (91)]
     expected: FAIL