Bug 1368240: Manually expand later sibling hints. r=heycam

This will help keeping RestyleData small, and the amount of complexity we need
to handle during the traversal down.

MozReview-Commit-ID: 2a0FF40tr66
This commit is contained in:
Emilio Cobos Álvarez 2017-06-09 07:19:11 +02:00
parent 846c31b3ee
commit 8d140efc44

View File

@ -63,7 +63,20 @@ ServoRestyleManager::PostRestyleEvent(Element* aElement,
mHaveNonAnimationRestyles = true;
}
Servo_NoteExplicitHints(aElement, aRestyleHint, aMinChangeHint);
if (aRestyleHint & eRestyle_LaterSiblings) {
aRestyleHint &= ~eRestyle_LaterSiblings;
nsRestyleHint siblingHint = eRestyle_Subtree;
Element* current = aElement->GetNextElementSibling();
while (current) {
Servo_NoteExplicitHints(current, siblingHint, nsChangeHint(0));
current = current->GetNextElementSibling();
}
}
if (aRestyleHint || aMinChangeHint) {
Servo_NoteExplicitHints(aElement, aRestyleHint, aMinChangeHint);
}
}
void