From 543bbb7b9c1708d914617f7667d80b11c15d49fe Mon Sep 17 00:00:00 2001 From: Bobby Holley Date: Wed, 26 Jul 2017 10:00:28 -0700 Subject: [PATCH] Clean up ForThrottledAnimationFlush stuff. MozReview-Commit-ID: I6xeHv65nH2 --- components/style/traversal_flags.rs | 3 --- ports/geckolib/glue.rs | 13 +++---------- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/components/style/traversal_flags.rs b/components/style/traversal_flags.rs index 3ec2486583e..a7e23bd6daf 100644 --- a/components/style/traversal_flags.rs +++ b/components/style/traversal_flags.rs @@ -22,8 +22,6 @@ bitflags! { const ForReconstruct = 1 << 3, /// FIXME(bholley): This will go away. const ForNewlyBoundElement = 1 << 4, - /// FIXME(bholley): This will go away. - const ForThrottledAnimationFlush = 1 << 5, } } @@ -52,7 +50,6 @@ pub fn assert_traversal_flags_match() { ServoTraversalFlags_UnstyledChildrenOnly => UnstyledChildrenOnly, ServoTraversalFlags_ForReconstruct => ForReconstruct, ServoTraversalFlags_ForNewlyBoundElement => ForNewlyBoundElement, - ServoTraversalFlags_ForThrottledAnimationFlush => ForThrottledAnimationFlush, } } diff --git a/ports/geckolib/glue.rs b/ports/geckolib/glue.rs index 2f6f23d5f58..2bcb8b68394 100644 --- a/ports/geckolib/glue.rs +++ b/ports/geckolib/glue.rs @@ -281,7 +281,7 @@ pub extern "C" fn Servo_TraverseSubtree(root: RawGeckoElementBorrowed, } } - if traversal_flags.contains(traversal_flags::ForThrottledAnimationFlush) { + if traversal_flags.for_animation_only() { return element.has_animation_only_dirty_descendants() || element.borrow_data().unwrap().restyle.is_restyle(); } @@ -2763,7 +2763,7 @@ pub extern "C" fn Servo_TakeChangeHint(element: RawGeckoElementBorrowed, *was_restyled = data.restyle.is_restyle(); let damage = data.restyle.damage; - if flags.contains(traversal_flags::ForThrottledAnimationFlush) { + if flags.for_animation_only() { if !*was_restyled { // Don't touch elements if the element was not restyled // in throttled animation flush. @@ -2811,14 +2811,7 @@ pub extern "C" fn Servo_ResolveStyle(element: RawGeckoElementBorrowed, assert!(data.has_styles(), "Resolving style on unstyled element"); // In the case where we process for throttled animation, there remaings // restyle hints other than animation hints. - // - // FIXME(bholley): Unify these flags. - let assert_flags = if flags.contains(traversal_flags::ForThrottledAnimationFlush) { - traversal_flags::AnimationOnly - } else { - TraversalFlags::empty() - }; - debug_assert!(element.has_current_styles_for_traversal(&*data, assert_flags), + debug_assert!(element.has_current_styles_for_traversal(&*data, flags), "Resolving style on {:?} without current styles: {:?}", element, data); data.styles.primary().clone().into() }