Bug 1109390 part 9 - Call Trigger* on pause-pending players; r=jwatt
authorBrian Birtles <birtles@gmail.com>
Fri, 27 Mar 2015 15:56:45 +0900
changeset 266395 de1b1fbecf37fac6e4682bd00c2a424f8538d832
parent 266394 38f3018ddf8576c93f0ae3f972a42bf3583c9f45
child 266396 e443000da039963b2e566b63db74a99f34ebe691
push id830
push userraliiev@mozilla.com
push dateFri, 19 Jun 2015 19:24:37 +0000
treeherdermozilla-release@932614382a68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjwatt
bugs1109390
milestone39.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1109390 part 9 - Call Trigger* on pause-pending players; r=jwatt This won't actually do anything yet because: (a) We don't yet add pause-pending players to the PendingPlayerTracker (b) We never mark pausing players as pending so AnimationPlayer::TriggerOnNextTick will just ignore them.
dom/animation/PendingPlayerTracker.cpp
--- a/dom/animation/PendingPlayerTracker.cpp
+++ b/dom/animation/PendingPlayerTracker.cpp
@@ -71,30 +71,34 @@ TriggerPlayerAtTime(nsRefPtrHashKey<dom:
 }
 
 void
 PendingPlayerTracker::TriggerPendingPlayersOnNextTick(const TimeStamp&
                                                         aReadyTime)
 {
   mPlayPendingSet.EnumerateEntries(TriggerPlayerAtTime,
                                    const_cast<TimeStamp*>(&aReadyTime));
+  mPausePendingSet.EnumerateEntries(TriggerPlayerAtTime,
+                                    const_cast<TimeStamp*>(&aReadyTime));
 }
 
 PLDHashOperator
 TriggerPlayerNow(nsRefPtrHashKey<dom::AnimationPlayer>* aKey, void*)
 {
   aKey->GetKey()->TriggerNow();
   return PL_DHASH_NEXT;
 }
 
 void
 PendingPlayerTracker::TriggerPendingPlayersNow()
 {
   mPlayPendingSet.EnumerateEntries(TriggerPlayerNow, nullptr);
   mPlayPendingSet.Clear();
+  mPausePendingSet.EnumerateEntries(TriggerPlayerNow, nullptr);
+  mPausePendingSet.Clear();
 }
 
 void
 PendingPlayerTracker::EnsurePaintIsScheduled()
 {
   if (!mDocument) {
     return;
   }