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
This commit is contained in:
Emilio Cobos Álvarez 2019-11-14 12:55:25 +00:00
Родитель 2a9602f682
Коммит 802cb96d68
4 изменённых файлов: 0 добавлений и 47 удалений

Просмотреть файл

@ -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;
}

Просмотреть файл

@ -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;

Просмотреть файл

@ -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() ||

Просмотреть файл

@ -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);
}
}