mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Clear animation-only dirty descendants bit on display:none descendants
When an element has a display:none ancestor we don't traverse it during restyle. However, at the end of restyling we expect the tree to be free of dirty bits. We currently take special care to clear the regular (non-animation) dirty bit on nodes in display:none subtrees in order to preserve this invariant. This patch applies the same handling to the animation-only dirty descendants bit.
This commit is contained in:
parent
5daf92dd5a
commit
0d0c2701ff
1 changed files with 8 additions and 2 deletions
|
@ -537,7 +537,10 @@ pub fn resolve_style<E, F, G, H>(context: &mut StyleContext<E>, element: E,
|
|||
if !in_doc || display_none_root.is_some() {
|
||||
let mut curr = element;
|
||||
loop {
|
||||
unsafe { curr.unset_dirty_descendants(); }
|
||||
unsafe {
|
||||
curr.unset_dirty_descendants();
|
||||
curr.unset_animation_only_dirty_descendants();
|
||||
}
|
||||
if in_doc && curr == display_none_root.unwrap() {
|
||||
break;
|
||||
}
|
||||
|
@ -789,5 +792,8 @@ pub fn clear_descendant_data<E: TElement, F: Fn(E)>(el: E, clear_data: &F) {
|
|||
}
|
||||
}
|
||||
|
||||
unsafe { el.unset_dirty_descendants(); }
|
||||
unsafe {
|
||||
el.unset_dirty_descendants();
|
||||
el.unset_animation_only_dirty_descendants();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue