Commit 802cb96d authored by Emilio Cobos Álvarez's avatar Emilio Cobos Álvarez
Browse files

Bug 1596391 - Remove nsIContent::IsActiveChildrenElement. r=smaug

Always returns false.

Depends on D52991

Differential Revision: https://phabricator.services.mozilla.com/D52992

--HG--
extra : moz-landing-system : lando
parent 2a9602f6
Loading
Loading
Loading
Loading
+0 −26
Original line number Diff line number Diff line
@@ -49,7 +49,6 @@ nsIContent* ExplicitChildIterator::GetNextChild() {
  } else if (mDefaultChild) {
    // If we're already in default content, check if there are more nodes there
    MOZ_ASSERT(mChild);
    MOZ_ASSERT(mChild->IsActiveChildrenElement());

    mDefaultChild = mDefaultChild->GetNextSibling();
    if (mDefaultChild) {
@@ -77,18 +76,6 @@ nsIContent* ExplicitChildIterator::GetNextChild() {
    mChild = mChild->GetNextSibling();
  }

  // Iterate until we find a non-insertion point, or an insertion point with
  // content.
  while (mChild) {
    if (mChild->IsActiveChildrenElement()) {
      MOZ_ASSERT_UNREACHABLE("This needs to be revisited");
    } else {
      // mChild is not an insertion point, thus it is the next node to
      // return from this iterator.
      break;
    }
  }

  return mChild;
}

@@ -121,7 +108,6 @@ bool ExplicitChildIterator::Seek(const nsIContent* aChildToFind) {
    mIndexInInserted = 0;
    mDefaultChild = nullptr;
    mIsFirst = false;
    MOZ_ASSERT(!mChild->IsActiveChildrenElement());
    return true;
  }

@@ -194,18 +180,6 @@ nsIContent* ExplicitChildIterator::GetPreviousChild() {
    mChild = mParent->GetLastChild();
  }

  // Iterate until we find a non-insertion point, or an insertion point with
  // content.
  while (mChild) {
    if (mChild->IsActiveChildrenElement()) {
      MOZ_ASSERT_UNREACHABLE("This needs to be revisited");
    } else {
      // mChild is not an insertion point, thus it is the next node to
      // return from this iterator.
      break;
    }
  }

  if (!mChild) {
    mIsFirst = true;
  }
+0 −2
Original line number Diff line number Diff line
@@ -271,8 +271,6 @@ class nsIContent : public nsINode {
    return IsMathMLElement() && IsNodeInternal(aFirst, aArgs...);
  }

  inline bool IsActiveChildrenElement() const;

  bool IsGeneratedContentContainerForBefore() const {
    return IsRootOfNativeAnonymousSubtree() &&
           mNodeInfo->NameAtom() == nsGkAtoms::mozgeneratedcontentbefore;
+0 −18
Original line number Diff line number Diff line
@@ -117,9 +117,6 @@ static inline nsINode* GetFlattenedTreeParentNode(const nsINode* aNode) {
    }
  }

  MOZ_ASSERT(!parentAsContent->IsActiveChildrenElement(),
             "<xbl:children> isn't in the flattened tree");

  // Common case.
  return parent;
}
@@ -167,21 +164,6 @@ inline bool nsINode::IsEditable() const {
  return doc && doc->HasFlag(NODE_IS_EDITABLE);
}

inline bool nsIContent::IsActiveChildrenElement() const {
  if (!mNodeInfo->Equals(nsGkAtoms::children, kNameSpaceID_XBL)) {
    return false;
  }

  nsIContent* bindingParent = GetBindingParent();
  if (!bindingParent) {
    return false;
  }

  // We reuse the binding parent machinery for Shadow DOM too, so prevent that
  // from getting us confused in this case.
  return !bindingParent->GetShadowRoot();
}

inline bool nsIContent::IsInAnonymousSubtree() const {
  NS_ASSERTION(
      !IsInNativeAnonymousSubtree() || GetBindingParent() ||
+0 −1
Original line number Diff line number Diff line
@@ -3151,7 +3151,6 @@ static void VerifyFlatTree(const nsIContent& aContent) {
  for (auto* content = iter.GetNextChild(); content;
       content = iter.GetNextChild()) {
    MOZ_ASSERT(content->GetFlattenedTreeParentNodeForStyle() == &aContent);
    MOZ_ASSERT(!content->IsActiveChildrenElement());
    VerifyFlatTree(*content);
  }
}