Bug 1331047: Require a child iterator for elements with ::before and ::after pseudos. r=bholley

MozReview-Commit-ID: e1UTlnNn3X
This commit is contained in:
Emilio Cobos Álvarez 2017-04-22 22:53:03 +02:00
Родитель e0e2e3ceb4
Коммит dbe1c3f9a9
1 изменённых файлов: 10 добавлений и 0 удалений

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

@ -512,6 +512,16 @@ StyleChildrenIterator::IsNeeded(const Element* aElement)
} }
} }
// If the node has a ::before or ::after pseudo, return true, because we want
// to visit those.
//
// TODO(emilio): Make this fast adding a bit? or, perhaps just using
// ProbePseudoElementStyle? It should be quite fast in Stylo.
if (aElement->GetProperty(nsGkAtoms::beforePseudoProperty) ||
aElement->GetProperty(nsGkAtoms::afterPseudoProperty)) {
return true;
}
// If the node has native anonymous content, return true. // If the node has native anonymous content, return true.
nsIAnonymousContentCreator* ac = do_QueryFrame(aElement->GetPrimaryFrame()); nsIAnonymousContentCreator* ac = do_QueryFrame(aElement->GetPrimaryFrame());
if (ac) { if (ac) {