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
This commit is contained in:
Bobby Holley 2017-07-14 11:01:29 -07:00
parent 2a58c0768b
commit e534ec9e47

View file

@ -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.
//