diff options
Diffstat (limited to 'components/script/dom')
-rw-r--r-- | components/script/dom/document.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs index 9edc7bb9c35..b5672319837 100644 --- a/components/script/dom/document.rs +++ b/components/script/dom/document.rs @@ -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(), |