style: Remove unused expired boolean in Animation::Transition.

The last caller who used was #14418, which did fix a problem but introduced
multiple. In particular, now transitions don't get expired ever, until they
finish running of course.

That is not ok, given you can have something that the user can trigger to change
the style (hi, :hover, for example), and right now that triggers new
transitions, getting this into a really funny state.

I should give fixing this a shot, but it's non-trivial at all.
This commit is contained in:
Emilio Cobos Álvarez 2018-05-05 18:36:22 +02:00
parent d6092fae27
commit 1ba57cbaad
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
3 changed files with 13 additions and 27 deletions

View file

@ -79,7 +79,7 @@ pub fn update_animation_state<E>(
let mut animations_still_running = vec![];
for mut running_animation in running_animations.drain(..) {
let still_running = !running_animation.is_expired() && match running_animation {
Animation::Transition(_, started_at, ref frame, _expired) => {
Animation::Transition(_, started_at, ref frame) => {
now < started_at + frame.duration
},
Animation::Keyframes(_, _, _, ref mut state) => {
@ -94,13 +94,12 @@ pub fn update_animation_state<E>(
continue;
}
if let Animation::Transition(node, _, ref frame, _) = running_animation {
script_chan
.send(ConstellationControlMsg::TransitionEnd(
node.to_untrusted_node_address(),
frame.property_animation.property_name().into(),
frame.duration,
)).unwrap();
if let Animation::Transition(node, _, ref frame) = running_animation {
script_chan.send(ConstellationControlMsg::TransitionEnd(
node.to_untrusted_node_address(),
frame.property_animation.property_name().into(),
frame.duration,
)).unwrap();
}
expired_animations