mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Hoist StyleNew{Children,Subtree} into their own paths.
The buggy animation handling isn't a regression, since currently we pass UnstyledChildrenOnly in those cases, which blocks the animation traversal in Servo_TraverseSubtree. In general I really wanted to handle these two paths together. But there's enough broken with the NewChildren path that I wanted to scope the buginess as tightly as possible. And I really need to separate the handling here from StyleDocument() to make the restyle root stuff work. MozReview-Commit-ID: 9F0mcQl7AAX
This commit is contained in:
parent
32790be78d
commit
f4ccbf3687
6 changed files with 63 additions and 103 deletions
|
@ -34,7 +34,7 @@ use std::hash::Hash;
|
|||
use std::ops::Deref;
|
||||
use stylist::Stylist;
|
||||
use thread_state;
|
||||
use traversal_flags::TraversalFlags;
|
||||
use traversal_flags::{TraversalFlags, self};
|
||||
|
||||
pub use style_traits::UnsafeNode;
|
||||
|
||||
|
@ -489,6 +489,11 @@ pub trait TElement : Eq + PartialEq + Debug + Hash + Sized + Copy + Clone +
|
|||
!data.restyle.hint.has_animation_hint_or_recascade();
|
||||
}
|
||||
|
||||
if traversal_flags.contains(traversal_flags::UnstyledOnly) {
|
||||
// We don't process invalidations in UnstyledOnly mode.
|
||||
return data.has_styles();
|
||||
}
|
||||
|
||||
if self.has_snapshot() && !self.handled_snapshot() {
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue