Bug 1596209 - Remove nsIContent::GetBindingParent. r=smaug
authorEmilio Cobos Álvarez <emilio@crisal.io>
Fri, 15 Nov 2019 18:19:37 +0000
changeset 502318 dd4a4052989c04446a8fdd9bed66ab8937150d57
parent 502317 74841f58fb9f9d8b667b3c246e8405e6d4765adb
child 502319 d2909d965c7ac6fa2973c756c4fef7fd2865fc3b
push id114172
push userdluca@mozilla.com
push dateTue, 19 Nov 2019 11:31:10 +0000
treeherdermozilla-inbound@b5c5ba07d3db [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1596209
milestone72.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1596209 - Remove nsIContent::GetBindingParent. r=smaug It's unused after all the previous patches. Differential Revision: https://phabricator.services.mozilla.com/D53217
dom/base/BindContext.h
dom/base/CharacterData.cpp
dom/base/Element.cpp
dom/base/FragmentOrElement.cpp
dom/base/ShadowRoot.cpp
dom/base/nsIContent.h
dom/base/nsINode.cpp
dom/base/nsINode.h
--- a/dom/base/BindContext.h
+++ b/dom/base/BindContext.h
@@ -42,56 +42,46 @@ struct MOZ_STACK_CLASS BindContext final
 
   Document* GetUncomposedDoc() const {
     return mInUncomposedDoc ? &mDoc : nullptr;
   }
 
   // Whether our subtree root is changing as a result of this operation.
   bool SubtreeRootChanges() const { return mSubtreeRootChanges; }
 
-  // Returns the binding parent of the subtree to be inserted.
-  //
-  // This can be null.
-  Element* GetBindingParent() const { return mBindingParent; }
-
   // This constructor should be used for regular appends to content.
   explicit BindContext(nsINode& aParent)
       : mDoc(*aParent.OwnerDoc()),
-        mBindingParent(aParent.IsContent()
-                           ? aParent.AsContent()->GetBindingParent()
-                           : nullptr),
         mInComposedDoc(aParent.IsInComposedDoc()),
         mInUncomposedDoc(aParent.IsInUncomposedDoc()),
         mSubtreeRootChanges(true),
         mCollectingDisplayedNodeDataDuringLoad(
             ShouldCollectDisplayedNodeDataDuringLoad(mInComposedDoc, mDoc,
                                                      aParent)) {}
 
   // When re-binding a shadow host into a tree, we re-bind all the shadow tree
   // from the root. In that case, the shadow tree contents remain within the
   // same subtree root.  So children should avoid doing silly things like adding
   // themselves to the ShadowRoot's id table twice or what not.
   //
   // This constructor is only meant to be used in that situation.
   explicit BindContext(ShadowRoot& aShadowRoot)
       : mDoc(*aShadowRoot.OwnerDoc()),
-        mBindingParent(aShadowRoot.Host()),
         mInComposedDoc(aShadowRoot.IsInComposedDoc()),
         mInUncomposedDoc(false),
         mSubtreeRootChanges(false),
         mCollectingDisplayedNodeDataDuringLoad(
             ShouldCollectDisplayedNodeDataDuringLoad(mInComposedDoc, mDoc,
                                                      aShadowRoot)) {}
 
   // This constructor is meant to be used when inserting native-anonymous
   // children into a subtree.
   enum ForNativeAnonymous { ForNativeAnonymous };
   BindContext(Element& aParentElement, enum ForNativeAnonymous)
       : mDoc(*aParentElement.OwnerDoc()),
-        mBindingParent(&aParentElement),
         mInComposedDoc(aParentElement.IsInComposedDoc()),
         mInUncomposedDoc(aParentElement.IsInUncomposedDoc()),
         mSubtreeRootChanges(true),
         mCollectingDisplayedNodeDataDuringLoad(
             ShouldCollectDisplayedNodeDataDuringLoad(mInComposedDoc, mDoc,
                                                      aParentElement)) {
     MOZ_ASSERT(mInComposedDoc, "Binding NAC in a disconnected subtree?");
   }
@@ -109,18 +99,16 @@ struct MOZ_STACK_CLASS BindContext final
                                                        Document& aDoc,
                                                        nsINode& aParent) {
     return aDoc.GetReadyStateEnum() == Document::READYSTATE_LOADING &&
            aConnected && !IsLikelyUndisplayed(aParent);
   }
 
   Document& mDoc;
 
-  Element* const mBindingParent;
-
   const bool mInComposedDoc;
   const bool mInUncomposedDoc;
 
   // Whether the bind operation will change the subtree root of the content
   // we're binding.
   const bool mSubtreeRootChanges;
 
   // Whether it's likely that we're in an undisplayed part of the DOM.
--- a/dom/base/CharacterData.cpp
+++ b/dom/base/CharacterData.cpp
@@ -397,44 +397,19 @@ nsresult CharacterData::BindToTree(BindC
              "Must have the same owner document");
   MOZ_ASSERT(OwnerDoc() == &aContext.OwnerDoc(), "These should match too");
   MOZ_ASSERT(!IsInUncomposedDoc(), "Already have a document.  Unbind first!");
   MOZ_ASSERT(!IsInComposedDoc(), "Already have a document.  Unbind first!");
   // Note that as we recurse into the kids, they'll have a non-null parent.  So
   // only assert if our parent is _changing_ while we have a parent.
   MOZ_ASSERT(!GetParentNode() || &aParent == GetParentNode(),
              "Already have a parent.  Unbind first!");
-  MOZ_ASSERT(
-      !GetBindingParent() ||
-          aContext.GetBindingParent() == GetBindingParent() ||
-          (!aContext.GetBindingParent() && aParent.IsContent() &&
-           aParent.AsContent()->GetBindingParent() == GetBindingParent()),
-      "Already have a binding parent.  Unbind first!");
-  MOZ_ASSERT(!IsRootOfNativeAnonymousSubtree() ||
-                 aContext.GetBindingParent() == &aParent,
-             "Native anonymous content must have its parent as its "
-             "own binding parent");
-  MOZ_ASSERT(aContext.GetBindingParent() || !aParent.IsContent() ||
-                 aContext.GetBindingParent() ==
-                     aParent.AsContent()->GetBindingParent(),
-             "We should be passed the right binding parent");
-
-  // First set the binding parent
-  if (Element* bindingParent = aContext.GetBindingParent()) {
-    ExtendedContentSlots()->mBindingParent = bindingParent;
-  }
 
   const bool hadParent = !!GetParentNode();
 
-  NS_ASSERTION(!aContext.GetBindingParent() ||
-                   IsRootOfNativeAnonymousSubtree() ||
-                   !HasFlag(NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE) ||
-                   aParent.IsInNativeAnonymousSubtree(),
-               "Trying to re-bind content from native anonymous subtree to "
-               "non-native anonymous parent!");
   if (aParent.IsInNativeAnonymousSubtree()) {
     SetFlags(NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE);
   }
   if (aParent.HasFlag(NODE_HAS_BEEN_IN_UA_WIDGET)) {
     SetFlags(NODE_HAS_BEEN_IN_UA_WIDGET);
   }
   if (HasFlag(NODE_IS_ANONYMOUS_ROOT)) {
     aParent.SetMayHaveAnonymousChildren();
@@ -492,18 +467,16 @@ nsresult CharacterData::BindToTree(BindC
   if (aContext.SubtreeRootChanges()) {
     HandleShadowDOMRelatedInsertionSteps(hadParent);
   }
 
   MOZ_ASSERT(OwnerDoc() == aParent.OwnerDoc(), "Bound to wrong document");
   MOZ_ASSERT(IsInComposedDoc() == aContext.InComposedDoc());
   MOZ_ASSERT(IsInUncomposedDoc() == aContext.InUncomposedDoc());
   MOZ_ASSERT(&aParent == GetParentNode(), "Bound to wrong parent node");
-  MOZ_ASSERT(aContext.GetBindingParent() == GetBindingParent(),
-             "Bound to wrong binding parent");
   MOZ_ASSERT(aParent.IsInUncomposedDoc() == IsInUncomposedDoc());
   MOZ_ASSERT(aParent.IsInComposedDoc() == IsInComposedDoc());
   MOZ_ASSERT(aParent.IsInShadowTree() == IsInShadowTree());
   MOZ_ASSERT(aParent.SubtreeRoot() == SubtreeRoot());
   return NS_OK;
 }
 
 void CharacterData::UnbindFromTree(bool aNullParent) {
@@ -528,19 +501,17 @@ void CharacterData::UnbindFromTree(bool 
 
   if (aNullParent || !mParent->IsInShadowTree()) {
     UnsetFlags(NODE_IS_IN_SHADOW_TREE);
 
     // Begin keeping track of our subtree root.
     SetSubtreeRootPointer(aNullParent ? this : mParent->SubtreeRoot());
   }
 
-  nsExtendedContentSlots* slots = GetExistingExtendedContentSlots();
-  if (slots) {
-    slots->mBindingParent = nullptr;
+  if (nsExtendedContentSlots* slots = GetExistingExtendedContentSlots()) {
     if (aNullParent || !mParent->IsInShadowTree()) {
       slots->mContainingShadow = nullptr;
     }
   }
 
   MutationObservers::NotifyParentChainChanged(this);
 
 #if defined(ACCESSIBILITY) && defined(DEBUG)
--- a/dom/base/Element.cpp
+++ b/dom/base/Element.cpp
@@ -1455,46 +1455,19 @@ nsresult Element::BindToTree(BindContext
              "Must have the same owner document");
   MOZ_ASSERT(OwnerDoc() == &aContext.OwnerDoc(), "These should match too");
   MOZ_ASSERT(!IsInUncomposedDoc(), "Already have a document.  Unbind first!");
   MOZ_ASSERT(!IsInComposedDoc(), "Already have a document.  Unbind first!");
   // Note that as we recurse into the kids, they'll have a non-null parent.  So
   // only assert if our parent is _changing_ while we have a parent.
   MOZ_ASSERT(!GetParentNode() || &aParent == GetParentNode(),
              "Already have a parent.  Unbind first!");
-  MOZ_ASSERT(
-      !GetBindingParent() ||
-          aContext.GetBindingParent() == GetBindingParent() ||
-          (!aContext.GetBindingParent() && aParent.IsContent() &&
-           aParent.AsContent()->GetBindingParent() == GetBindingParent()),
-      "Already have a binding parent.  Unbind first!");
-  MOZ_ASSERT(aContext.GetBindingParent() != this,
-             "Content must not be its own binding parent");
-  MOZ_ASSERT(!IsRootOfNativeAnonymousSubtree() ||
-                 aContext.GetBindingParent() == &aParent,
-             "Native anonymous content must have its parent as its "
-             "own binding parent");
-  MOZ_ASSERT(aContext.GetBindingParent() || !aParent.IsContent() ||
-                 aContext.GetBindingParent() ==
-                     aParent.AsContent()->GetBindingParent(),
-             "We should be passed the right binding parent");
-
-  // First set the binding parent
-  if (Element* bindingParent = aContext.GetBindingParent()) {
-    ExtendedDOMSlots()->mBindingParent = bindingParent;
-  }
 
   const bool hadParent = !!GetParentNode();
 
-  NS_ASSERTION(!aContext.GetBindingParent() ||
-                   IsRootOfNativeAnonymousSubtree() ||
-                   !HasFlag(NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE) ||
-                   aParent.IsInNativeAnonymousSubtree(),
-               "Trying to re-bind content from native anonymous subtree to "
-               "non-native anonymous parent!");
   if (aParent.IsInNativeAnonymousSubtree()) {
     SetFlags(NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE);
   }
   if (aParent.HasFlag(NODE_HAS_BEEN_IN_UA_WIDGET)) {
     SetFlags(NODE_HAS_BEEN_IN_UA_WIDGET);
   }
   if (HasFlag(NODE_IS_ANONYMOUS_ROOT)) {
     aParent.SetMayHaveAnonymousChildren();
@@ -1622,18 +1595,16 @@ nsresult Element::BindToTree(BindContext
 
   // XXXbz script execution during binding can trigger some of these
   // postcondition asserts....  But we do want that, since things will
   // generally be quite broken when that happens.
   MOZ_ASSERT(OwnerDoc() == aParent.OwnerDoc(), "Bound to wrong document");
   MOZ_ASSERT(IsInComposedDoc() == aContext.InComposedDoc());
   MOZ_ASSERT(IsInUncomposedDoc() == aContext.InUncomposedDoc());
   MOZ_ASSERT(&aParent == GetParentNode(), "Bound to wrong parent node");
-  MOZ_ASSERT(aContext.GetBindingParent() == GetBindingParent(),
-             "Bound to wrong binding parent");
   MOZ_ASSERT(aParent.IsInUncomposedDoc() == IsInUncomposedDoc());
   MOZ_ASSERT(aParent.IsInComposedDoc() == IsInComposedDoc());
   MOZ_ASSERT(aParent.IsInShadowTree() == IsInShadowTree());
   MOZ_ASSERT(aParent.SubtreeRoot() == SubtreeRoot());
   return NS_OK;
 }
 
 bool WillDetachFromShadowOnUnbind(const Element& aElement, bool aNullParent) {
@@ -1760,17 +1731,16 @@ void Element::UnbindFromTree(bool aNullP
   if (aNullParent || !mParent->IsInShadowTree()) {
     UnsetFlags(NODE_IS_IN_SHADOW_TREE);
 
     // Begin keeping track of our subtree root.
     SetSubtreeRootPointer(aNullParent ? this : mParent->SubtreeRoot());
   }
 
   if (nsExtendedDOMSlots* slots = GetExistingExtendedDOMSlots()) {
-    slots->mBindingParent = nullptr;
     if (aNullParent || !mParent->IsInShadowTree()) {
       slots->mContainingShadow = nullptr;
     }
   }
 
   if (document) {
     // Disconnected must be enqueued whenever a connected custom element becomes
     // disconnected.
--- a/dom/base/FragmentOrElement.cpp
+++ b/dom/base/FragmentOrElement.cpp
@@ -525,26 +525,22 @@ static const size_t MaxDOMSlotSizeAllowe
 #endif
 
 static_assert(sizeof(nsINode::nsSlots) <= MaxDOMSlotSizeAllowed,
               "DOM slots cannot be grown without consideration");
 static_assert(sizeof(FragmentOrElement::nsDOMSlots) <= MaxDOMSlotSizeAllowed,
               "DOM slots cannot be grown without consideration");
 
 void nsIContent::nsExtendedContentSlots::UnlinkExtendedSlots() {
-  mBindingParent = nullptr;
   mContainingShadow = nullptr;
   mAssignedSlot = nullptr;
 }
 
 void nsIContent::nsExtendedContentSlots::TraverseExtendedSlots(
     nsCycleCollectionTraversalCallback& aCb) {
-  NS_CYCLE_COLLECTION_NOTE_EDGE_NAME(aCb, "mExtendedSlots->mBindingParent");
-  aCb.NoteXPCOMChild(NS_ISUPPORTS_CAST(nsIContent*, mBindingParent));
-
   NS_CYCLE_COLLECTION_NOTE_EDGE_NAME(aCb, "mExtendedSlots->mContainingShadow");
   aCb.NoteXPCOMChild(NS_ISUPPORTS_CAST(nsIContent*, mContainingShadow));
 
   NS_CYCLE_COLLECTION_NOTE_EDGE_NAME(aCb, "mExtendedSlots->mAssignedSlot");
   aCb.NoteXPCOMChild(NS_ISUPPORTS_CAST(nsIContent*, mAssignedSlot.get()));
 }
 
 nsIContent::nsExtendedContentSlots::nsExtendedContentSlots() {}
@@ -628,17 +624,16 @@ size_t FragmentOrElement::nsDOMSlots::Si
   // worthwhile:
   // - Superclass members (nsINode::nsSlots)
   // - mStyle
   // - mDataSet
   // - mClassList
 
   // The following member are not measured:
   // - mControllers: because it is non-owning
-  // - mBindingParent: because it is some ancestor element.
   return n;
 }
 
 FragmentOrElement::nsExtendedDOMSlots::nsExtendedDOMSlots() = default;
 
 FragmentOrElement::nsExtendedDOMSlots::~nsExtendedDOMSlots() {}
 
 void FragmentOrElement::nsExtendedDOMSlots::UnlinkExtendedSlots() {
@@ -1056,38 +1051,16 @@ bool FragmentOrElement::IsLink(nsIURI** 
   return false;
 }
 
 void nsIContent::SetAssignedSlot(HTMLSlotElement* aSlot) {
   MOZ_ASSERT(aSlot || GetExistingExtendedContentSlots());
   ExtendedContentSlots()->mAssignedSlot = aSlot;
 }
 
-#ifdef DEBUG
-void nsIContent::AssertAnonymousSubtreeRelatedInvariants() const {
-  MOZ_ASSERT(!IsRootOfNativeAnonymousSubtree() ||
-                 (GetParent() && GetBindingParent() == GetParent()),
-             "root of native anonymous subtree must have parent equal "
-             "to binding parent");
-  MOZ_ASSERT(!GetParent() || !IsInComposedDoc() ||
-                 ((GetBindingParent() == GetParent()) ==
-                  HasFlag(NODE_IS_ANONYMOUS_ROOT)) ||
-                 // Unfortunately default content for XBL insertion points
-                 // is anonymous content that is bound with the parent of
-                 // the insertion point as the parent but the bound element
-                 // for the binding as the binding parent.  So we have to
-                 // complicate the assert a bit here.
-                 (GetBindingParent() &&
-                  (GetBindingParent() == GetParent()->GetBindingParent()) ==
-                      HasFlag(NODE_IS_ANONYMOUS_ROOT)),
-             "For connected nodes, flag and GetBindingParent() check "
-             "should match");
-}
-#endif
-
 void FragmentOrElement::GetTextContentInternal(nsAString& aTextContent,
                                                OOMReporter& aError) {
   if (!nsContentUtils::GetNodeTextContent(this, true, aTextContent, fallible)) {
     aError.ReportOOM();
   }
 }
 
 void FragmentOrElement::SetTextContentInternal(const nsAString& aTextContent,
--- a/dom/base/ShadowRoot.cpp
+++ b/dom/base/ShadowRoot.cpp
@@ -57,17 +57,16 @@ ShadowRoot::ShadowRoot(Element* aElement
   // Nodes in a shadow tree should never store a value
   // in the subtree root pointer, nodes in the shadow tree
   // track the subtree root using GetContainingShadow().
   ClearSubtreeRootPointer();
 
   SetFlags(NODE_IS_IN_SHADOW_TREE);
   Bind();
 
-  ExtendedDOMSlots()->mBindingParent = aElement;
   ExtendedDOMSlots()->mContainingShadow = this;
 }
 
 ShadowRoot::~ShadowRoot() {
   if (IsInComposedDoc()) {
     OwnerDoc()->RemoveComposedDocShadowRoot(*this);
   }
 
--- a/dom/base/nsIContent.h
+++ b/dom/base/nsIContent.h
@@ -180,28 +180,21 @@ class nsIContent : public nsINode {
   }
 
   /**
    * Returns |this| if it is not chrome-only/native anonymous, otherwise
    * first non chrome-only/native anonymous ancestor.
    */
   nsIContent* FindFirstNonChromeOnlyAccessContent() const;
 
-#ifdef DEBUG
-  void AssertAnonymousSubtreeRelatedInvariants() const;
-#endif
-
   /**
    * Returns true if and only if this node has a parent, but is not in
    * its parent's child list.
    */
   bool IsRootOfAnonymousSubtree() const {
-#ifdef DEBUG
-    AssertAnonymousSubtreeRelatedInvariants();
-#endif
     return HasFlag(NODE_IS_ANONYMOUS_ROOT);
   }
 
   /**
    * Return true iff this node is in an HTML document (in the HTML5 sense of
    * the term, i.e. not in an XHTML/XML document).
    */
   inline bool IsInHTMLDocument() const;
@@ -367,31 +360,16 @@ class nsIContent : public nsINode {
    *         PLUGIN should be returned only when plug-in has focus.  When a
    *         plug-in is focused content, we should send native events directly.
    *         Because we don't process some native events, but they may be needed
    *         by the plug-in.
    */
   virtual IMEState GetDesiredIMEState();
 
   /**
-   * Gets content node with the binding (or native code, possibly on the
-   * frame) responsible for our construction (and existence).  Used by
-   * native-anonymous content and shadow DOM.
-   *
-   * null for all explicit content (i.e., content reachable from the top
-   * of its GetParent() chain via child lists).
-   *
-   * @return the binding parent
-   */
-  mozilla::dom::Element* GetBindingParent() const {
-    const nsExtendedContentSlots* slots = GetExistingExtendedContentSlots();
-    return slots ? slots->mBindingParent.get() : nullptr;
-  }
-
-  /**
    * Gets the ShadowRoot binding for this element.
    *
    * @return The ShadowRoot currently bound to this element.
    */
   inline mozilla::dom::ShadowRoot* GetShadowRoot() const;
 
   /**
    * Gets the root of the node tree for this content if it is in a shadow tree.
@@ -714,23 +692,16 @@ class nsIContent : public nsINode {
 
     virtual void TraverseExtendedSlots(nsCycleCollectionTraversalCallback&);
     virtual void UnlinkExtendedSlots();
 
     virtual size_t SizeOfExcludingThis(
         mozilla::MallocSizeOf aMallocSizeOf) const;
 
     /**
-     * The nearest enclosing content node with a binding that created us.
-     *
-     * @see nsIContent::GetBindingParent
-     */
-    RefPtr<mozilla::dom::Element> mBindingParent;
-
-    /**
      * @see nsIContent::GetContainingShadow
      */
     RefPtr<mozilla::dom::ShadowRoot> mContainingShadow;
 
     /**
      * @see nsIContent::GetAssignedSlot
      */
     RefPtr<mozilla::dom::HTMLSlotElement> mAssignedSlot;
--- a/dom/base/nsINode.cpp
+++ b/dom/base/nsINode.cpp
@@ -531,30 +531,16 @@ void nsINode::LastRelease() {
   }
 
 
   ReleaseWrapper(this);
 
   FragmentOrElement::RemoveBlackMarkedNode(this);
 }
 
-#ifdef DEBUG
-void nsINode::CheckNotNativeAnonymous() const {
-  if (!IsContent()) return;
-  nsIContent* content =
-      static_cast<const nsIContent*>(this)->GetBindingParent();
-  while (content) {
-    if (content->IsRootOfNativeAnonymousSubtree()) {
-      NS_ERROR("Element not marked to be in native anonymous subtree!");
-      break;
-    }
-    content = content->GetBindingParent();
-  }
-}
-#endif
 
 std::ostream& operator<<(std::ostream& aStream, const nsINode& aNode) {
   nsAutoString elemDesc;
   const nsINode* curr = &aNode;
   while (curr) {
     const nsString& localName = curr->LocalName();
     nsString id;
     if (curr->IsElement()) {
--- a/dom/base/nsINode.h
+++ b/dom/base/nsINode.h
@@ -1237,25 +1237,17 @@ class nsINode : public mozilla::dom::Eve
   }
 
   inline bool IsEditable() const;
 
   /**
    * Returns true if |this| or any of its ancestors is native anonymous.
    */
   bool IsInNativeAnonymousSubtree() const {
-#ifdef DEBUG
-    if (HasFlag(NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE)) {
-      return true;
-    }
-    CheckNotNativeAnonymous();
-    return false;
-#else
     return HasFlag(NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE);
-#endif
   }
 
   /**
    * Returns true if there is NOT a path through child lists
    * from the top of this node's parent chain back to this node or
    * if the node is in native anonymous subtree without a parent.
    *
    * TODO(emilio):: Remove this function, and use just
@@ -2036,22 +2028,16 @@ class nsINode : public mozilla::dom::Eve
   void InvalidateChildNodes();
 
   virtual void GetTextContentInternal(nsAString& aTextContent,
                                       mozilla::OOMReporter& aError);
   virtual void SetTextContentInternal(const nsAString& aTextContent,
                                       nsIPrincipal* aSubjectPrincipal,
                                       mozilla::ErrorResult& aError) {}
 
-#ifdef DEBUG
-  // Note: virtual so that IsInNativeAnonymousSubtree can be called accross
-  // module boundaries.
-  virtual void CheckNotNativeAnonymous() const;
-#endif
-
   void EnsurePreInsertionValidity1(mozilla::ErrorResult& aError);
   void EnsurePreInsertionValidity2(bool aReplace, nsINode& aNewChild,
                                    nsINode* aRefChild,
                                    mozilla::ErrorResult& aError);
   nsINode* ReplaceOrInsertBefore(bool aReplace, nsINode* aNewChild,
                                  nsINode* aRefChild,
                                  mozilla::ErrorResult& aError);