mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
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:
parent
d6092fae27
commit
1ba57cbaad
3 changed files with 13 additions and 27 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue