Bug 1428164: Restyle owned anon boxes after processing children. r=bz

MozReview-Commit-ID: 4QcJPY9hkSm
This commit is contained in:
Emilio Cobos Álvarez 2018-01-05 11:48:00 +01:00
Родитель 27fbef8dfc
Коммит 9cd802936b
1 изменённых файлов: 4 добавлений и 1 удалений

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

@ -909,7 +909,6 @@ ServoRestyleManager::ProcessPostTraversal(
if (styleFrame) { if (styleFrame) {
UpdateAdditionalStyleContexts(styleFrame, aRestyleState); UpdateAdditionalStyleContexts(styleFrame, aRestyleState);
styleFrame->UpdateStyleOfOwnedAnonBoxes(childrenRestyleState);
} }
if (!aElement->GetParent()) { if (!aElement->GetParent()) {
@ -973,6 +972,10 @@ ServoRestyleManager::ProcessPostTraversal(
childrenRestyleState.ProcessWrapperRestyles(styleFrame); childrenRestyleState.ProcessWrapperRestyles(styleFrame);
if (wasRestyled) { if (wasRestyled) {
// Make sure to update anon boxes and pseudo bits after updating text,
// otherwise we could clobber first-letter styles from
// ProcessPostTraversalForText, for example.
styleFrame->UpdateStyleOfOwnedAnonBoxes(childrenRestyleState);
UpdateFramePseudoElementStyles(styleFrame, childrenRestyleState); UpdateFramePseudoElementStyles(styleFrame, childrenRestyleState);
} else if (traverseElementChildren && } else if (traverseElementChildren &&
styleFrame->IsFrameOfType(nsIFrame::eBlockFrame)) { styleFrame->IsFrameOfType(nsIFrame::eBlockFrame)) {