mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Improve ending of transitions
For legacy reasons, transitions were marked as finished after updating the style. According to the spec, they should be marked as finished when animations are updated and before restyle. This change does that as well as preventing replacement of finished transitions. Having finished transitions survive a full restyle cycle and allowing the replacement of finished transition, could lead to issues were removed from the global list of animating transitions too soon: 1. A transitions finishes 2. Restyle 3. Transitions is marked as finished and events are queued 4. Restyle cancels finished transition and replaces it instead of clearing finished transition 5. Events are sent for the incorrectly canceled transition removing it completely from the list of running transitions due to the extra event.
This commit is contained in:
parent
14464e49be
commit
218beb9218
6 changed files with 296 additions and 3 deletions
|
@ -55,6 +55,8 @@ impl Animations {
|
|||
);
|
||||
}
|
||||
}
|
||||
|
||||
Self::finish_running_animations(set, now, &mut update);
|
||||
}
|
||||
update
|
||||
}
|
||||
|
@ -71,7 +73,6 @@ impl Animations {
|
|||
|
||||
for set in sets.values_mut() {
|
||||
Self::handle_canceled_animations(set, now, &mut update);
|
||||
Self::finish_running_animations(set, now, &mut update);
|
||||
Self::handle_new_animations(set, &mut update);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue