mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
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:
parent
805beb3a40
commit
18ad382f00
1 changed files with 23 additions and 21 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue