From e534ec9e47a5c4b1b53085925266529b5989da8d Mon Sep 17 00:00:00 2001 From: Bobby Holley Date: Fri, 14 Jul 2017 11:01:29 -0700 Subject: [PATCH] Move clearing of dirty descendants bit closer to the last place it's needed. In the next patch, we'll move logic to identify the children for traversal into preprocess_children (which will be renamed), and the set_dirty_descendants logic will move along with it. So left as-is, the code here will clobber the flags. MozReview-Commit-ID: 7ZskKWD4QC3 --- components/style/traversal.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/components/style/traversal.rs b/components/style/traversal.rs index a5c624eb374..7a24ccd8178 100644 --- a/components/style/traversal.rs +++ b/components/style/traversal.rs @@ -666,6 +666,9 @@ where } else { element.has_dirty_descendants() }; + if context.shared.traversal_flags.for_animation_only() { + unsafe { element.unset_animation_only_dirty_descendants(); } + } // Preprocess children, propagating restyle hints and handling sibling // relationships. @@ -695,10 +698,6 @@ where data.clear_restyle_state(); } - if context.shared.traversal_flags.for_animation_only() { - unsafe { element.unset_animation_only_dirty_descendants(); } - } - // There are two cases when we want to clear the dity descendants bit here // after styling this element. //