Only clear the descendants bit for which we're traversing.

Doing anything else is non-sensical, since we're not guaranteed to reach all of
the bits from traversal Y when doing traversal X.

MozReview-Commit-ID: FQliRxBan70
This commit is contained in:
Bobby Holley 2017-08-10 11:23:45 -07:00
parent 805beb3a40
commit 18ad382f00

View file

@ -606,6 +606,12 @@ where
data.clear_restyle_flags_and_damage();
}
// Optionally clear the descendants bit for the traversal type we're in.
if flags.for_animation_only() {
if flags.contains(traversal_flags::ClearAnimationOnlyDirtyDescendants) {
unsafe { element.unset_animation_only_dirty_descendants(); }
}
} else {
// There are two cases when we want to clear the dity descendants bit here
// after styling this element. The first case is when we were explicitly
// asked to clear the bit by the caller.
@ -623,10 +629,6 @@ where
data.styles.is_display_none() {
unsafe { element.unset_dirty_descendants(); }
}
// Similarly, check if we're supposed to clear the animation bit.
if flags.contains(traversal_flags::ClearAnimationOnlyDirtyDescendants) {
unsafe { element.unset_animation_only_dirty_descendants(); }
}
context.thread_local.end_element(element);