diff options
author | Martin Robinson <mrobinson@igalia.com> | 2020-04-23 17:06:24 +0200 |
---|---|---|
committer | Martin Robinson <mrobinson@igalia.com> | 2020-04-24 14:20:37 +0200 |
commit | d386d6d1f1e1dba33b49e0b44d9216128f29da1c (patch) | |
tree | fe253bdd7d28cc06a606af1e6f9cc39332848652 /components/layout_thread/lib.rs | |
parent | 0540c4a284952145773e3c86d0f57f69a83283f1 (diff) | |
download | servo-d386d6d1f1e1dba33b49e0b44d9216128f29da1c.tar.gz servo-d386d6d1f1e1dba33b49e0b44d9216128f29da1c.zip |
Add support for transitionrun events
These events are triggered as soon as a transition is added to the list
of running transitions. This will allow better test coverage while
reworking the transitions and animations processing model.
Diffstat (limited to 'components/layout_thread/lib.rs')
-rw-r--r-- | components/layout_thread/lib.rs | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/components/layout_thread/lib.rs b/components/layout_thread/lib.rs index 6272147b65e..4a346315e8a 100644 --- a/components/layout_thread/lib.rs +++ b/components/layout_thread/lib.rs @@ -1762,13 +1762,18 @@ impl LayoutThread { .map(|nodes| nodes.lock().unwrap()); let newly_transitioning_nodes = newly_transitioning_nodes.as_mut().map(|nodes| &mut **nodes); - // Kick off animations if any were triggered, expire completed ones. - animation::update_animation_states::<ServoLayoutElement>( + let mut animation_states = self.animation_states.write(); + + animation::collect_newly_transitioning_nodes( + &animation_states, + newly_transitioning_nodes, + ); + + animation::update_animation_states( &self.constellation_chan, &self.script_chan, - &mut *self.animation_states.write(), + &mut *animation_states, invalid_nodes, - newly_transitioning_nodes, self.id, &self.timer, ); |