mirror of
https://github.com/servo/servo.git
synced 2025-08-11 16:35:33 +01:00
style: Get rid of unstyled children only traversals.
They're useless now, provided we remove the hack to not traverse XBL-bound elements on initial styling. Bug: 1418456 Reviewed-by: heycam MozReview-Commit-ID: AvBVdyF1wb6
This commit is contained in:
parent
63bd783c55
commit
b1fecea0aa
4 changed files with 18 additions and 80 deletions
|
@ -294,21 +294,18 @@ pub extern "C" fn Servo_TraverseSubtree(
|
|||
|
||||
debug!("Servo_TraverseSubtree (flags={:?})", traversal_flags);
|
||||
debug!("{:?}", ShowSubtreeData(element.as_node()));
|
||||
// It makes no sense to do an animation restyle when we're styling
|
||||
// newly-inserted content.
|
||||
if !traversal_flags.contains(TraversalFlags::UnstyledOnly) {
|
||||
let needs_animation_only_restyle =
|
||||
element.has_animation_only_dirty_descendants() ||
|
||||
element.has_animation_restyle_hints();
|
||||
|
||||
if needs_animation_only_restyle {
|
||||
debug!("Servo_TraverseSubtree doing animation-only restyle (aodd={})",
|
||||
element.has_animation_only_dirty_descendants());
|
||||
traverse_subtree(element,
|
||||
raw_data,
|
||||
traversal_flags | TraversalFlags::AnimationOnly,
|
||||
unsafe { &*snapshots });
|
||||
}
|
||||
let needs_animation_only_restyle =
|
||||
element.has_animation_only_dirty_descendants() ||
|
||||
element.has_animation_restyle_hints();
|
||||
|
||||
if needs_animation_only_restyle {
|
||||
debug!("Servo_TraverseSubtree doing animation-only restyle (aodd={})",
|
||||
element.has_animation_only_dirty_descendants());
|
||||
traverse_subtree(element,
|
||||
raw_data,
|
||||
traversal_flags | TraversalFlags::AnimationOnly,
|
||||
unsafe { &*snapshots });
|
||||
}
|
||||
|
||||
traverse_subtree(element,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue