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:
Bobby Holley 2017-07-26 13:13:00 -07:00
parent 32790be78d
commit f4ccbf3687
6 changed files with 63 additions and 103 deletions

View file

@ -260,10 +260,9 @@ pub extern "C" fn Servo_TraverseSubtree(root: RawGeckoElementBorrowed,
let element = GeckoElement(root);
debug!("Servo_TraverseSubtree (flags={:?})", traversal_flags);
// It makes no sense to do an animation restyle when we're restyling
// It makes no sense to do an animation restyle when we're styling
// newly-inserted content.
if !traversal_flags.contains(traversal_flags::UnstyledChildrenOnly) {
if !traversal_flags.contains(traversal_flags::UnstyledOnly) {
let needs_animation_only_restyle =
element.has_animation_only_dirty_descendants() ||
element.has_animation_restyle_hints();