style: WTF I was thinking about when I wrote that?

This commit is contained in:
Emilio Cobos Álvarez 2016-06-23 00:46:29 +02:00
parent 33f581883b
commit 2b2e58a868
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
2 changed files with 2 additions and 9 deletions

View file

@ -139,7 +139,6 @@ pub fn recalc_style_for_animations(context: &SharedLayoutContext,
animation,
&mut fragment.style,
Some(&mut damage));
animation.increment_keyframe_if_applicable();
}
}
}

View file

@ -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;
}
}
}
}