Bug 1426536 - Remove nsContentUtils::IsContentInsertionPoint

Tag #1375
This commit is contained in:
Matt A. Tobin 2020-04-17 07:36:25 -04:00 committed by Roy Tam
commit d9112daf48
7 changed files with 27 additions and 116 deletions

View file

@ -533,33 +533,6 @@ ShadowRoot::StyleSheets()
return mStyleSheetList;
}
/**
* Returns whether the web components pool population algorithm
* on the host would contain |aContent|. This function ignores
* insertion points in the pool, thus should only be used to
* test nodes that have not yet been distributed.
*/
bool
ShadowRoot::IsPooledNode(nsIContent* aContent) const
{
if (nsContentUtils::IsContentInsertionPoint(aContent)) {
// Insertion points never end up in the pool.
return false;
}
auto* host = GetHost();
auto* container = aContent->GetParent();
if (container == host && !aContent->IsRootOfAnonymousSubtree()) {
// Children of the host will end up in the pool. We check to ensure
// that the content is in the same anonymous tree as the container
// because anonymous content may report its container as the host
// but it may not be in the host's child list.
return true;
}
return false;
}
void
ShadowRoot::AttributeChanged(nsIDocument* aDocument,
Element* aElement,