From d8cba2959f2fcf4b205e3863de5cae85c56dd05f Mon Sep 17 00:00:00 2001 From: Bobby Holley Date: Tue, 18 Jul 2017 18:04:34 -0700 Subject: [PATCH] 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 --- components/style/gecko/wrapper.rs | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/components/style/gecko/wrapper.rs b/components/style/gecko/wrapper.rs index 7c31ed29e31..bb079321bf5 100644 --- a/components/style/gecko/wrapper.rs +++ b/components/style/gecko/wrapper.rs @@ -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.