diff options
author | Martin Robinson <mrobinson@igalia.com> | 2020-05-21 18:16:03 +0200 |
---|---|---|
committer | Martin Robinson <mrobinson@igalia.com> | 2020-05-21 19:56:29 +0200 |
commit | 218beb9218e901090436adcfef396401b4f44147 (patch) | |
tree | 4450545f5d16540710c4dee69f818d1ebc94f2bd /components/script/animations.rs | |
parent | 14464e49beb98de7aaa764d84c2e2175aaf48bbb (diff) | |
download | servo-218beb9218e901090436adcfef396401b4f44147.tar.gz servo-218beb9218e901090436adcfef396401b4f44147.zip |
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.
Diffstat (limited to 'components/script/animations.rs')
-rw-r--r-- | components/script/animations.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/components/script/animations.rs b/components/script/animations.rs index 0c3f1c68206..d8b80338851 100644 --- a/components/script/animations.rs +++ b/components/script/animations.rs @@ -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); } |