Rearrange dirty noting to operate on the element rather than the parent.

This will allow us to scope restyle roots more tightly.

MozReview-Commit-ID: 2t2lp5sKBHH
This commit is contained in:
Bobby Holley 2017-07-18 18:04:34 -07:00
parent 24a52b7990
commit d8cba2959f

View file

@ -691,15 +691,10 @@ impl<'le> GeckoElement<'le> {
}
// Propagate the bit up the chain.
if let Some(p) = self.traversal_parent() {
if animation_only {
bindings::Gecko_NoteAnimationOnlyDirtyDescendants(p.0);
} else {
bindings::Gecko_NoteDirtyDescendants(p.0);
}
if animation_only {
bindings::Gecko_NoteAnimationOnlyDirtyElement(self.0);
} else {
// If there's no parent, we still need to trigger the style flush.
bindings::Gecko_SetOwnerDocumentNeedsStyleFlush(self.0);
bindings::Gecko_NoteDirtyElement(self.0);
}
// Ensure and return the RestyleData.