mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Add comment to explain callback ordering
This commit is contained in:
parent
dfaf28d5cd
commit
de81d88324
1 changed files with 4 additions and 0 deletions
|
@ -1208,6 +1208,10 @@ impl Document {
|
|||
callback(*timing);
|
||||
}
|
||||
|
||||
// Only send the animation change state message after running any callbacks.
|
||||
// This means that if the animation callback adds a new callback for
|
||||
// the next frame (which is the common case), we won't send a NoAnimationCallbacksPresent
|
||||
// message quickly followed by an AnimationCallbacksPresent message.
|
||||
if self.animation_frame_list.borrow().is_empty() {
|
||||
let ConstellationChan(ref chan) = self.window.constellation_chan();
|
||||
let event = ConstellationMsg::ChangeRunningAnimationsState(self.window.pipeline(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue