Issue #2135 - Bug 1455891/Part 1: Improve StyleChildrenIterator

This commit is contained in:
FranklinDM 2023-03-04 11:02:56 +08:00 committed by roytam1
commit 263b719ef8
2 changed files with 51 additions and 34 deletions

View file

@ -536,23 +536,5 @@ StyleChildrenIterator::IsNeeded(const Element* aElement)
return false;
}
nsIContent*
StyleChildrenIterator::GetNextChild()
{
while (nsIContent* child = AllChildrenIterator::GetNextChild()) {
if (IsNativeAnonymousImplementationOfPseudoElement(child)) {
// Skip any native-anonymous children that are used to implement pseudo-
// elements. These match pseudo-element selectors instead of being
// considered a child of their host, and thus the style system needs to
// handle them separately.
} else {
return child;
}
}
return nullptr;
}
} // namespace dom
} // namespace mozilla