diff --git a/components/layout/animation.rs b/components/layout/animation.rs index fecc4762d67..7f0eaf140f9 100644 --- a/components/layout/animation.rs +++ b/components/layout/animation.rs @@ -139,7 +139,6 @@ pub fn recalc_style_for_animations(context: &SharedLayoutContext, animation, &mut fragment.style, Some(&mut damage)); - animation.increment_keyframe_if_applicable(); } } } diff --git a/components/style/animation.rs b/components/style/animation.rs index 342f211d167..1ad50cbc939 100644 --- a/components/style/animation.rs +++ b/components/style/animation.rs @@ -66,9 +66,11 @@ impl KeyframesAnimationState { /// /// Returns true if the animation should keep running. pub fn tick(&mut self) -> bool { + debug!("KeyframesAnimationState::tick"); let still_running = match self.iteration_state { KeyframesIterationState::Finite(ref mut current, ref max) => { *current += 1; + debug!("KeyframesAnimationState::tick: current={}, max={}", current, max); *current < *max } KeyframesIterationState::Infinite => true, @@ -120,14 +122,6 @@ impl Animation { Animation::Keyframes(_, _, ref state) => state.paused, } } - - pub fn increment_keyframe_if_applicable(&mut self) { - if let Animation::Keyframes(_, _, ref mut state) = *self { - if let KeyframesIterationState::Finite(ref mut iterations, _) = state.iteration_state { - *iterations += 1; - } - } - } }