mirror of
https://github.com/servo/servo.git
synced 2025-06-08 00:23:30 +00:00
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.
This commit is contained in:
parent
0540c4a284
commit
d386d6d1f1
11 changed files with 105 additions and 93 deletions
|
@ -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,
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue