Bug 1433591: Update the style of child anon box wrapper after owned anon boxes. r=bz

Since the former could inherit from the latter.

Test incoming in a followup.

MozReview-Commit-ID: LJjprcyjDyU
This commit is contained in:
Emilio Cobos Álvarez 2018-01-28 04:15:13 +01:00
Родитель c4a0cebf58
Коммит f7d932d9fe
1 изменённых файлов: 8 добавлений и 5 удалений

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

@ -970,14 +970,17 @@ ServoRestyleManager::ProcessPostTraversal(
// modify the styles of the kids, and the child traversal above would just
// clobber those modifications.
if (styleFrame) {
// Process anon box wrapper frames before ::first-line bits.
childrenRestyleState.ProcessWrapperRestyles(styleFrame);
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.
// otherwise ProcessPostTraversalForText could clobber first-letter
// styles, for example.
styleFrame->UpdateStyleOfOwnedAnonBoxes(childrenRestyleState);
}
// Process anon box wrapper frames before ::first-line bits, but _after_
// owned anon boxes, since the children wrapper anon boxes could be
// inheriting from our own owned anon boxes.
childrenRestyleState.ProcessWrapperRestyles(styleFrame);
if (wasRestyled) {
UpdateFramePseudoElementStyles(styleFrame, childrenRestyleState);
} else if (traverseElementChildren &&
styleFrame->IsFrameOfType(nsIFrame::eBlockFrame)) {