Bug 1640605 - Remove IsInAnonymousSubtree / IsRootOfAnonymousSubtree. r=edgar

In favor of the NativeAnonymous versions which they forward to.

Done automatically with:

  rg -l 'IsInAnonymousSubtree' | xargs sed -i 's/IsInAnonymousSubtree/IsInNativeAnonymousSubtree/g'

And removing the function definitions afterwards.

Differential Revision: https://phabricator.services.mozilla.com/D76681
This commit is contained in:
Emilio Cobos Álvarez
2020-05-25 11:43:51 +00:00
parent 30a5ba2c6a
commit b1fc84a629
27 changed files with 48 additions and 68 deletions

View File

@@ -5176,7 +5176,7 @@ static bool ShouldSuppressFrameInSelect(const nsIContent* aParent,
// Options with labels have their label text added in ::before by forms.css.
// Suppress frames for their child text.
if (aParent->IsHTMLElement(nsGkAtoms::option) &&
!aChild.IsRootOfAnonymousSubtree()) {
!aChild.IsRootOfNativeAnonymousSubtree()) {
return aParent->AsElement()->HasNonEmptyAttr(nsGkAtoms::label);
}
@@ -5200,7 +5200,7 @@ static bool ShouldSuppressFrameInSelect(const nsIContent* aParent,
}
// Allow native anonymous content no matter what.
if (aChild.IsRootOfAnonymousSubtree()) {
if (aChild.IsRootOfNativeAnonymousSubtree()) {
return false;
}
@@ -5224,7 +5224,7 @@ static bool ShouldSuppressFrameInNonOpenDetails(
}
// Don't suppress NAC, unless it's a ::before, inside ::marker, or ::after.
if (aChild.IsRootOfAnonymousSubtree() &&
if (aChild.IsRootOfNativeAnonymousSubtree() &&
!(aChild.IsGeneratedContentContainerForMarker() &&
aComputedStyle->StyleList()->mListStylePosition ==
NS_STYLE_LIST_STYLE_POSITION_INSIDE) &&
@@ -6209,8 +6209,8 @@ nsIFrame* nsCSSFrameConstructor::GetInsertionPrevSibling(
// XBL insertion point is involved, we'll need to use _that_ to find
// the preceding frame.
FlattenedChildIterator iter(aInsertion->mContainer);
if (iter.ShadowDOMInvolved() || !aChild->IsRootOfAnonymousSubtree()) {
// The check for IsRootOfAnonymousSubtree() is because editor is
if (iter.ShadowDOMInvolved() || !aChild->IsRootOfNativeAnonymousSubtree()) {
// The check for IsRootOfNativeAnonymousSubtree() is because editor is
// severely broken and calls us directly for native anonymous
// nodes that it creates.
if (aStartSkipChild) {
@@ -7136,7 +7136,7 @@ void nsCSSFrameConstructor::ContentRangeInserted(nsIContent* aStartChild,
if (isSingleInsert) {
AddFrameConstructionItems(state, aStartChild,
aStartChild->IsRootOfAnonymousSubtree(),
aStartChild->IsRootOfNativeAnonymousSubtree(),
insertion, items);
} else {
for (nsIContent* child = aStartChild; child != aEndChild;
@@ -7301,7 +7301,7 @@ bool nsCSSFrameConstructor::ContentRemoved(nsIContent* aChild,
nsIContent* aOldNextSibling,
RemoveFlags aFlags) {
MOZ_ASSERT(aChild);
MOZ_ASSERT(!aChild->IsRootOfAnonymousSubtree() || !aOldNextSibling,
MOZ_ASSERT(!aChild->IsRootOfNativeAnonymousSubtree() || !aOldNextSibling,
"Anonymous roots don't have siblings");
AUTO_PROFILER_LABEL("nsCSSFrameConstructor::ContentRemoved",
LAYOUT_FrameConstruction);
@@ -8557,7 +8557,7 @@ void nsCSSFrameConstructor::RecreateFramesForContent(
MOZ_ASSERT(aContent->GetParentNode());
// Remove the frames associated with the content object.
nsIContent* nextSibling = aContent->IsRootOfAnonymousSubtree()
nsIContent* nextSibling = aContent->IsRootOfNativeAnonymousSubtree()
? nullptr
: aContent->GetNextSibling();
bool didReconstruct =
@@ -8587,7 +8587,7 @@ void nsCSSFrameConstructor::RecreateFramesForContent(
bool nsCSSFrameConstructor::DestroyFramesFor(Element* aElement) {
MOZ_ASSERT(aElement && aElement->GetParentNode());
nsIContent* nextSibling = aElement->IsRootOfAnonymousSubtree()
nsIContent* nextSibling = aElement->IsRootOfNativeAnonymousSubtree()
? nullptr
: aElement->GetNextSibling();
@@ -9531,7 +9531,7 @@ void nsCSSFrameConstructor::ProcessChildren(
GetAnonymousContent(aContent, aPossiblyLeafFrame, anonymousItems);
#ifdef DEBUG
for (uint32_t i = 0; i < anonymousItems.Length(); ++i) {
MOZ_ASSERT(anonymousItems[i].mContent->IsRootOfAnonymousSubtree(),
MOZ_ASSERT(anonymousItems[i].mContent->IsRootOfNativeAnonymousSubtree(),
"Content should know it's an anonymous subtree");
}
#endif