Bug 1154615 part 2 - Rename PendingPlayerTracker to PendingAnimationTracker; r=jwatt
authorBrian Birtles <birtles@gmail.com>
Tue, 21 Apr 2015 10:22:09 +0900
changeset 240075 12c02905de559b1b7bbeee20ceecdf2f7527469d
parent 240074 d7428dd3f9488be4be939d09d27658326a18c573
child 240076 7d4113af5140aa63060a630f4e3a6f722cd9f575
push id28621
push usercbook@mozilla.com
push dateTue, 21 Apr 2015 09:59:54 +0000
treeherdermozilla-central@ef3c6dd09234 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjwatt
bugs1154615
milestone40.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 1154615 part 2 - Rename PendingPlayerTracker to PendingAnimationTracker; r=jwatt This patch also updates the method names on PendingAnimationTracker but leaves a number of local variables which will be fixed in a subsequent patch.
dom/animation/Animation.cpp
dom/animation/Animation.h
dom/animation/PendingAnimationTracker.cpp
dom/animation/PendingAnimationTracker.h
dom/animation/PendingPlayerTracker.cpp
dom/animation/PendingPlayerTracker.h
dom/animation/moz.build
dom/base/nsDOMWindowUtils.cpp
dom/base/nsDocument.cpp
dom/base/nsDocument.h
dom/base/nsIDocument.h
layout/base/nsDisplayList.cpp
layout/base/nsRefreshDriver.cpp
layout/style/nsTransitionManager.cpp
--- a/dom/animation/Animation.cpp
+++ b/dom/animation/Animation.cpp
@@ -7,17 +7,17 @@
 #include "AnimationUtils.h"
 #include "mozilla/dom/AnimationBinding.h"
 #include "mozilla/AutoRestore.h"
 #include "AnimationCommon.h" // For AnimationPlayerCollection,
                              // CommonAnimationManager
 #include "nsIDocument.h" // For nsIDocument
 #include "nsIPresShell.h" // For nsIPresShell
 #include "nsLayoutUtils.h" // For PostRestyleEvent (remove after bug 1073336)
-#include "PendingPlayerTracker.h" // For PendingPlayerTracker
+#include "PendingAnimationTracker.h" // For PendingAnimationTracker
 
 namespace mozilla {
 namespace dom {
 
 NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(Animation, mTimeline,
                                       mEffect, mReady, mFinished)
 NS_IMPL_CYCLE_COLLECTING_ADDREF(Animation)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(Animation)
@@ -543,17 +543,17 @@ Animation::DoPlay(LimitBehavior aLimitBe
   mPendingState = PendingState::PlayPending;
 
   nsIDocument* doc = GetRenderedDocument();
   if (!doc) {
     TriggerOnNextTick(Nullable<TimeDuration>());
     return;
   }
 
-  PendingPlayerTracker* tracker = doc->GetOrCreatePendingPlayerTracker();
+  PendingAnimationTracker* tracker = doc->GetOrCreatePendingAnimationTracker();
   tracker->AddPlayPending(*this);
 
   // We may have updated the current time when we set the hold time above.
   UpdateTiming();
 }
 
 void
 Animation::DoPause()
@@ -581,17 +581,17 @@ Animation::DoPause()
   mPendingState = PendingState::PausePending;
 
   nsIDocument* doc = GetRenderedDocument();
   if (!doc) {
     TriggerOnNextTick(Nullable<TimeDuration>());
     return;
   }
 
-  PendingPlayerTracker* tracker = doc->GetOrCreatePendingPlayerTracker();
+  PendingAnimationTracker* tracker = doc->GetOrCreatePendingAnimationTracker();
   tracker->AddPausePending(*this);
 
   UpdateFinishedState();
 }
 
 void
 Animation::ResumeAt(const TimeDuration& aReadyTime)
 {
@@ -738,17 +738,17 @@ void
 Animation::CancelPendingTasks()
 {
   if (mPendingState == PendingState::NotPending) {
     return;
   }
 
   nsIDocument* doc = GetRenderedDocument();
   if (doc) {
-    PendingPlayerTracker* tracker = doc->GetPendingPlayerTracker();
+    PendingAnimationTracker* tracker = doc->GetPendingAnimationTracker();
     if (tracker) {
       if (mPendingState == PendingState::PlayPending) {
         tracker->RemovePlayPending(*this);
       } else {
         tracker->RemovePausePending(*this);
       }
     }
   }
@@ -780,17 +780,17 @@ Animation::IsPossiblyOrphanedPendingPlay
   //
   // * We started playing but our effect's target element was orphaned
   //   or bound to a different document.
   //   (note that for the case of our effect changing we should handle
   //   that in SetEffect)
   // * We started playing but our timeline became inactive.
   //   In this case the pending player tracker will drop us from its hashmap
   //   when we have been painted.
-  // * When we started playing we couldn't find a PendingPlayerTracker to
+  // * When we started playing we couldn't find a PendingAnimationTracker to
   //   register with (perhaps the effect had no document) so we simply
   //   set mPendingState in DoPlay and relied on this method to catch us on the
   //   next tick.
 
   // If we're not pending we're ok.
   if (mPendingState == PendingState::NotPending) {
     return false;
   }
@@ -803,27 +803,27 @@ Animation::IsPossiblyOrphanedPendingPlay
 
   // If we don't have an active timeline then we shouldn't start until
   // we do.
   if (!mTimeline || mTimeline->GetCurrentTime().IsNull()) {
     return false;
   }
 
   // If we have no rendered document, or we're not in our rendered document's
-  // PendingPlayerTracker then there's a good chance no one is tracking us.
+  // PendingAnimationTracker then there's a good chance no one is tracking us.
   //
   // If we're wrong and another document is tracking us then, at worst, we'll
   // simply start/pause the animation one tick too soon. That's better than
   // never starting/pausing the animation and is unlikely.
   nsIDocument* doc = GetRenderedDocument();
   if (!doc) {
     return false;
   }
 
-  PendingPlayerTracker* tracker = doc->GetPendingPlayerTracker();
+  PendingAnimationTracker* tracker = doc->GetPendingAnimationTracker();
   return !tracker ||
          (!tracker->IsWaitingToPlay(*this) &&
           !tracker->IsWaitingToPause(*this));
 }
 
 StickyTimeDuration
 Animation::EffectEnd() const
 {
--- a/dom/animation/Animation.h
+++ b/dom/animation/Animation.h
@@ -161,27 +161,27 @@ public:
    * For pausing, we apply the same asynchronous approach. This is so that we
    * synchronize with animations that are running on the compositor. Otherwise
    * if the main thread lags behind the compositor there will be a noticeable
    * jump backwards when the main thread takes over. Even though main thread
    * animations could be paused immediately, we do it asynchronously for
    * consistency and so that animations paused together end up in step.
    *
    * Note that the caller of this method is responsible for removing the player
-   * from any PendingPlayerTracker it may have been added to.
+   * from any PendingAnimationTracker it may have been added to.
    */
   void TriggerOnNextTick(const Nullable<TimeDuration>& aReadyTime);
 
   // Testing only: Start or pause a pending player using the current timeline
   // time. This is used to support existing tests that expect animations to
   // begin immediately. Ideally we would rewrite the those tests and get rid of
   // this method, but there are a lot of them.
   //
   // As with TriggerOnNextTick, the caller of this method is responsible for
-  // removing the player from any PendingPlayerTracker it may have been added
+  // removing the player from any PendingAnimationTracker it may have been added
   // to.
   void TriggerNow();
 
   /**
    * When StartOnNextTick is called, we store the ready time but we don't apply
    * it until the next tick. In the meantime, GetStartTime() will return null.
    *
    * However, if we build layer animations again before the next tick, we
@@ -322,19 +322,19 @@ protected:
   // 0 when playing backwards. The Promise is replaced if the animation is
   // finished but then a state change makes it not finished.
   // This object is lazily created by GetFinished.
   // See http://w3c.github.io/web-animations/#current-finished-promise
   nsRefPtr<Promise> mFinished;
 
   // Indicates if the player is in the pending state (and what state it is
   // waiting to enter when it finished pending). We use this rather than
-  // checking if this player is tracked by a PendingPlayerTracker because the
+  // checking if this player is tracked by a PendingAnimationTracker because the
   // player will continue to be pending even after it has been removed from the
-  // PendingPlayerTracker while it is waiting for the next tick
+  // PendingAnimationTracker while it is waiting for the next tick
   // (see TriggerOnNextTick for details).
   enum class PendingState { NotPending, PlayPending, PausePending };
   PendingState mPendingState;
 
   bool mIsRunningOnCompositor;
   // Indicates whether we were in the finished state during our
   // most recent unthrottled sample (our last ComposeStyle call).
   bool mIsPreviousStateFinished; // Spec calls this "previous finished state"
rename from dom/animation/PendingPlayerTracker.cpp
rename to dom/animation/PendingAnimationTracker.cpp
--- a/dom/animation/PendingPlayerTracker.cpp
+++ b/dom/animation/PendingAnimationTracker.cpp
@@ -1,108 +1,108 @@
 /* vim: set shiftwidth=2 tabstop=8 autoindent cindent expandtab: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#include "PendingPlayerTracker.h"
+#include "PendingAnimationTracker.h"
 
 #include "mozilla/dom/DocumentTimeline.h"
 #include "nsIFrame.h"
 #include "nsIPresShell.h"
 
 using namespace mozilla;
 
 namespace mozilla {
 
-NS_IMPL_CYCLE_COLLECTION(PendingPlayerTracker,
+NS_IMPL_CYCLE_COLLECTION(PendingAnimationTracker,
                          mPlayPendingSet,
                          mPausePendingSet,
                          mDocument)
 
-NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(PendingPlayerTracker, AddRef)
-NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(PendingPlayerTracker, Release)
+NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(PendingAnimationTracker, AddRef)
+NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(PendingAnimationTracker, Release)
 
 void
-PendingPlayerTracker::AddPending(dom::Animation& aPlayer,
+PendingAnimationTracker::AddPending(dom::Animation& aPlayer,
                                  AnimationPlayerSet& aSet)
 {
   aSet.PutEntry(&aPlayer);
 
   // Schedule a paint. Otherwise animations that don't trigger a paint by
   // themselves (e.g. CSS animations with an empty keyframes rule) won't
   // start until something else paints.
   EnsurePaintIsScheduled();
 }
 
 void
-PendingPlayerTracker::RemovePending(dom::Animation& aPlayer,
+PendingAnimationTracker::RemovePending(dom::Animation& aPlayer,
                                     AnimationPlayerSet& aSet)
 {
   aSet.RemoveEntry(&aPlayer);
 }
 
 bool
-PendingPlayerTracker::IsWaiting(const dom::Animation& aPlayer,
+PendingAnimationTracker::IsWaiting(const dom::Animation& aPlayer,
                                 const AnimationPlayerSet& aSet) const
 {
   return aSet.Contains(const_cast<dom::Animation*>(&aPlayer));
 }
 
 PLDHashOperator
 TriggerPlayerAtTime(nsRefPtrHashKey<dom::Animation>* aKey,
                     void* aReadyTime)
 {
   dom::Animation* player = aKey->GetKey();
   dom::DocumentTimeline* timeline = player->Timeline();
 
   // When the timeline's refresh driver is under test control, its values
   // have no correspondance to wallclock times so we shouldn't try to convert
   // aReadyTime (which is a wallclock time) to a timeline value. Instead, the
   // animation player will be started/paused when the refresh driver is next
-  // advanced since this will trigger a call to TriggerPendingPlayersNow.
+  // advanced since this will trigger a call to TriggerPendingAnimationsNow.
   if (timeline->IsUnderTestControl()) {
     return PL_DHASH_NEXT;
   }
 
   Nullable<TimeDuration> readyTime =
     timeline->ToTimelineTime(*static_cast<const TimeStamp*>(aReadyTime));
   player->TriggerOnNextTick(readyTime);
 
   return PL_DHASH_REMOVE;
 }
 
 void
-PendingPlayerTracker::TriggerPendingPlayersOnNextTick(const TimeStamp&
+PendingAnimationTracker::TriggerPendingAnimationsOnNextTick(const TimeStamp&
                                                         aReadyTime)
 {
   mPlayPendingSet.EnumerateEntries(TriggerPlayerAtTime,
                                    const_cast<TimeStamp*>(&aReadyTime));
   mPausePendingSet.EnumerateEntries(TriggerPlayerAtTime,
                                     const_cast<TimeStamp*>(&aReadyTime));
 }
 
 PLDHashOperator
 TriggerPlayerNow(nsRefPtrHashKey<dom::Animation>* aKey, void*)
 {
   aKey->GetKey()->TriggerNow();
   return PL_DHASH_NEXT;
 }
 
 void
-PendingPlayerTracker::TriggerPendingPlayersNow()
+PendingAnimationTracker::TriggerPendingAnimationsNow()
 {
   mPlayPendingSet.EnumerateEntries(TriggerPlayerNow, nullptr);
   mPlayPendingSet.Clear();
   mPausePendingSet.EnumerateEntries(TriggerPlayerNow, nullptr);
   mPausePendingSet.Clear();
 }
 
 void
-PendingPlayerTracker::EnsurePaintIsScheduled()
+PendingAnimationTracker::EnsurePaintIsScheduled()
 {
   if (!mDocument) {
     return;
   }
 
   nsIPresShell* presShell = mDocument->GetShell();
   if (!presShell) {
     return;
rename from dom/animation/PendingPlayerTracker.h
rename to dom/animation/PendingAnimationTracker.h
--- a/dom/animation/PendingPlayerTracker.h
+++ b/dom/animation/PendingAnimationTracker.h
@@ -1,34 +1,34 @@
 /* vim: set shiftwidth=2 tabstop=8 autoindent cindent expandtab: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#ifndef mozilla_dom_PendingPlayerTracker_h
-#define mozilla_dom_PendingPlayerTracker_h
+#ifndef mozilla_dom_PendingAnimationTracker_h
+#define mozilla_dom_PendingAnimationTracker_h
 
 #include "mozilla/dom/Animation.h"
 #include "nsCycleCollectionParticipant.h"
 #include "nsIDocument.h"
 #include "nsTHashtable.h"
 
 class nsIFrame;
 
 namespace mozilla {
 
-class PendingPlayerTracker final
+class PendingAnimationTracker final
 {
 public:
-  explicit PendingPlayerTracker(nsIDocument* aDocument)
+  explicit PendingAnimationTracker(nsIDocument* aDocument)
     : mDocument(aDocument)
   { }
 
-  NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(PendingPlayerTracker)
-  NS_DECL_CYCLE_COLLECTION_NATIVE_CLASS(PendingPlayerTracker)
+  NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(PendingAnimationTracker)
+  NS_DECL_CYCLE_COLLECTION_NATIVE_CLASS(PendingAnimationTracker)
 
   void AddPlayPending(dom::Animation& aPlayer)
   {
     MOZ_ASSERT(!IsWaitingToPause(aPlayer),
                "Player is already waiting to pause");
     AddPending(aPlayer, mPlayPendingSet);
   }
   void RemovePlayPending(dom::Animation& aPlayer)
@@ -50,24 +50,24 @@ public:
   {
     RemovePending(aPlayer, mPausePendingSet);
   }
   bool IsWaitingToPause(const dom::Animation& aPlayer) const
   {
     return IsWaiting(aPlayer, mPausePendingSet);
   }
 
-  void TriggerPendingPlayersOnNextTick(const TimeStamp& aReadyTime);
-  void TriggerPendingPlayersNow();
-  bool HasPendingPlayers() const {
+  void TriggerPendingAnimationsOnNextTick(const TimeStamp& aReadyTime);
+  void TriggerPendingAnimationsNow();
+  bool HasPendingAnimations() const {
     return mPlayPendingSet.Count() > 0 || mPausePendingSet.Count() > 0;
   }
 
 private:
-  ~PendingPlayerTracker() { }
+  ~PendingAnimationTracker() { }
 
   void EnsurePaintIsScheduled();
 
   typedef nsTHashtable<nsRefPtrHashKey<dom::Animation>>
     AnimationPlayerSet;
 
   void AddPending(dom::Animation& aPlayer,
                   AnimationPlayerSet& aSet);
@@ -78,9 +78,9 @@ private:
 
   AnimationPlayerSet mPlayPendingSet;
   AnimationPlayerSet mPausePendingSet;
   nsCOMPtr<nsIDocument> mDocument;
 };
 
 } // namespace mozilla
 
-#endif // mozilla_dom_PendingPlayerTracker_h
+#endif // mozilla_dom_PendingAnimationTracker_h
--- a/dom/animation/moz.build
+++ b/dom/animation/moz.build
@@ -12,23 +12,23 @@ EXPORTS.mozilla.dom += [
     'AnimationEffectReadonly.h',
     'AnimationTimeline.h',
     'DocumentTimeline.h',
     'KeyframeEffect.h',
 ]
 
 EXPORTS.mozilla += [
     'AnimationUtils.h',
-    'PendingPlayerTracker.h',
+    'PendingAnimationTracker.h',
 ]
 
 UNIFIED_SOURCES += [
     'Animation.cpp',
     'AnimationEffectReadonly.cpp',
     'AnimationTimeline.cpp',
     'DocumentTimeline.cpp',
     'KeyframeEffect.cpp',
-    'PendingPlayerTracker.cpp',
+    'PendingAnimationTracker.cpp',
 ]
 
 FAIL_ON_WARNINGS = True
 
 FINAL_LIBRARY = 'xul'
--- a/dom/base/nsDOMWindowUtils.cpp
+++ b/dom/base/nsDOMWindowUtils.cpp
@@ -14,17 +14,17 @@
 #include "nsIDOMEvent.h"
 #include "nsQueryContentEventResult.h"
 #include "nsGlobalWindow.h"
 #include "nsIDocument.h"
 #include "nsFocusManager.h"
 #include "nsFrameManager.h"
 #include "nsRefreshDriver.h"
 #include "mozilla/dom/Touch.h"
-#include "mozilla/PendingPlayerTracker.h"
+#include "mozilla/PendingAnimationTracker.h"
 #include "nsIObjectLoadingContent.h"
 #include "nsFrame.h"
 #include "mozilla/layers/ShadowLayers.h"
 #include "ClientLayerManager.h"
 #include "nsQueryObject.h"
 
 #include "nsIScrollableFrame.h"
 
@@ -2337,26 +2337,25 @@ ComputeAnimationValue(nsCSSProperty aPro
 NS_IMETHODIMP
 nsDOMWindowUtils::AdvanceTimeAndRefresh(int64_t aMilliseconds)
 {
   MOZ_RELEASE_ASSERT(nsContentUtils::IsCallerChrome());
 
   // Before we advance the time, we should trigger any animations that are
   // waiting to start. This is because there are many tests that call this
   // which expect animations to start immediately. Ideally, we should make
-  // all these tests do an asynchronous wait on the corresponding animation
-  // player's 'ready' promise before continuing. Then we could remove the
-  // special handling here and the code path followed when testing would
-  // more closely match the code path during regular operation. Filed as
-  // bug 1112957.
+  // all these tests do an asynchronous wait on the corresponding animation's
+  // 'ready' promise before continuing. Then we could remove the special
+  // handling here and the code path followed when testing would more closely
+  // match the code path during regular operation. Filed as bug 1112957.
   nsCOMPtr<nsIDocument> doc = GetDocument();
   if (doc) {
-    PendingPlayerTracker* tracker = doc->GetPendingPlayerTracker();
+    PendingAnimationTracker* tracker = doc->GetPendingAnimationTracker();
     if (tracker) {
-      tracker->TriggerPendingPlayersNow();
+      tracker->TriggerPendingAnimationsNow();
     }
   }
 
   nsRefreshDriver* driver = GetPresContext()->RefreshDriver();
   driver->AdvanceTimeAndRefresh(aMilliseconds);
 
   RefPtr<LayerTransactionChild> transaction = GetLayerTransaction();
   if (transaction && transaction->IPCOpen()) {
--- a/dom/base/nsDocument.cpp
+++ b/dom/base/nsDocument.cpp
@@ -2014,17 +2014,17 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mFirstBaseNodeWithHref)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mDOMImplementation)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mImageMaps)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mOriginalDocument)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mCachedEncoder)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mStateObjectCached)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mUndoManager)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mDocumentTimeline)
-  NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mPendingPlayerTracker)
+  NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mPendingAnimationTracker)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mTemplateContentsOwner)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mChildrenCollection)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mRegistry)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mAnonymousContents)
 
   // Traverse all our nsCOMArrays.
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mStyleSheets)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mOnDemandBuiltInUASheets)
@@ -2098,17 +2098,17 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(ns
   NS_IMPL_CYCLE_COLLECTION_UNLINK(mDisplayDocument)
   NS_IMPL_CYCLE_COLLECTION_UNLINK(mFirstBaseNodeWithHref)
   NS_IMPL_CYCLE_COLLECTION_UNLINK(mDOMImplementation)
   NS_IMPL_CYCLE_COLLECTION_UNLINK(mImageMaps)
   NS_IMPL_CYCLE_COLLECTION_UNLINK(mOriginalDocument)
   NS_IMPL_CYCLE_COLLECTION_UNLINK(mCachedEncoder)
   NS_IMPL_CYCLE_COLLECTION_UNLINK(mUndoManager)
   NS_IMPL_CYCLE_COLLECTION_UNLINK(mDocumentTimeline)
-  NS_IMPL_CYCLE_COLLECTION_UNLINK(mPendingPlayerTracker)
+  NS_IMPL_CYCLE_COLLECTION_UNLINK(mPendingAnimationTracker)
   NS_IMPL_CYCLE_COLLECTION_UNLINK(mTemplateContentsOwner)
   NS_IMPL_CYCLE_COLLECTION_UNLINK(mChildrenCollection)
   NS_IMPL_CYCLE_COLLECTION_UNLINK(mRegistry)
   NS_IMPL_CYCLE_COLLECTION_UNLINK(mMasterDocument)
   NS_IMPL_CYCLE_COLLECTION_UNLINK(mImportManager)
   NS_IMPL_CYCLE_COLLECTION_UNLINK(mSubImportLinks)
 
   tmp->mParentDocument = nullptr;
@@ -7487,24 +7487,24 @@ nsDocument::GetAnimationController()
   // because they don't get OnPageShow / OnPageHide calls).
   if (!mIsShowing && !mIsBeingUsedAsImage) {
     mAnimationController->OnPageHide();
   }
 
   return mAnimationController;
 }
 
-PendingPlayerTracker*
-nsDocument::GetOrCreatePendingPlayerTracker()
-{
-  if (!mPendingPlayerTracker) {
-    mPendingPlayerTracker = new PendingPlayerTracker(this);
-  }
-
-  return mPendingPlayerTracker;
+PendingAnimationTracker*
+nsDocument::GetOrCreatePendingAnimationTracker()
+{
+  if (!mPendingAnimationTracker) {
+    mPendingAnimationTracker = new PendingAnimationTracker(this);
+  }
+
+  return mPendingAnimationTracker;
 }
 
 /**
  * Retrieve the "direction" property of the document.
  *
  * @lina 01/09/2001
  */
 NS_IMETHODIMP
--- a/dom/base/nsDocument.h
+++ b/dom/base/nsDocument.h
@@ -54,17 +54,17 @@
 #include "nsILoadContext.h"
 #include "nsIProgressEventSink.h"
 #include "nsISecurityEventSink.h"
 #include "nsIChannelEventSink.h"
 #include "imgIRequest.h"
 #include "mozilla/EventListenerManager.h"
 #include "mozilla/EventStates.h"
 #include "mozilla/MemoryReporting.h"
-#include "mozilla/PendingPlayerTracker.h"
+#include "mozilla/PendingAnimationTracker.h"
 #include "mozilla/dom/DOMImplementation.h"
 #include "mozilla/dom/StyleSheetList.h"
 #include "nsDataHashtable.h"
 #include "mozilla/TimeStamp.h"
 #include "mozilla/Attributes.h"
 #include "nsIDOMXPathEvaluator.h"
 #include "jsfriendapi.h"
 #include "ImportManager.h"
@@ -1045,24 +1045,24 @@ public:
     EnumerateExternalResources(nsSubDocEnumFunc aCallback, void* aData) override;
 
   nsTArray<nsCString> mHostObjectURIs;
 
   // Returns our (lazily-initialized) animation controller.
   // If HasAnimationController is true, this is guaranteed to return non-null.
   nsSMILAnimationController* GetAnimationController() override;
 
-  virtual mozilla::PendingPlayerTracker*
-  GetPendingPlayerTracker() final override
+  virtual mozilla::PendingAnimationTracker*
+  GetPendingAnimationTracker() final override
   {
-    return mPendingPlayerTracker;
+    return mPendingAnimationTracker;
   }
 
-  virtual mozilla::PendingPlayerTracker*
-  GetOrCreatePendingPlayerTracker() override;
+  virtual mozilla::PendingAnimationTracker*
+  GetOrCreatePendingAnimationTracker() override;
 
   void SetImagesNeedAnimating(bool aAnimating) override;
 
   virtual void SuppressEventHandling(SuppressionType aWhat,
                                      uint32_t aIncrease) override;
 
   virtual void UnsuppressEventHandlingAndFireEvents(SuppressionType aWhat,
                                                     bool aFireEvents) override;
@@ -1535,19 +1535,19 @@ protected:
 
   nsCOMArray<nsIStyleSheet> mStyleSheets;
   nsCOMArray<nsIStyleSheet> mOnDemandBuiltInUASheets;
   nsCOMArray<nsIStyleSheet> mAdditionalSheets[SheetTypeCount];
 
   // Array of observers
   nsTObserverArray<nsIDocumentObserver*> mObservers;
 
-  // Tracker for animation players that are waiting to start.
-  // nullptr until GetOrCreatePendingPlayerTracker is called.
-  nsRefPtr<mozilla::PendingPlayerTracker> mPendingPlayerTracker;
+  // Tracker for animations that are waiting to start.
+  // nullptr until GetOrCreatePendingAnimationTracker is called.
+  nsRefPtr<mozilla::PendingAnimationTracker> mPendingAnimationTracker;
 
   // Weak reference to the scope object (aka the script global object)
   // that, unlike mScriptGlobalObject, is never unset once set. This
   // is a weak reference to avoid leaks due to circular references.
   nsWeakPtr mScopeObject;
 
   // Stack of full-screen elements. When we request full-screen we push the
   // full-screen element onto this stack, and when we cancel full-screen we
--- a/dom/base/nsIDocument.h
+++ b/dom/base/nsIDocument.h
@@ -83,17 +83,17 @@ class nsDOMCaretPosition;
 class nsViewportInfo;
 class nsIGlobalObject;
 struct nsCSSSelectorList;
 
 namespace mozilla {
 class CSSStyleSheet;
 class ErrorResult;
 class EventStates;
-class PendingPlayerTracker;
+class PendingAnimationTracker;
 class SVGAttrAnimationRuleProcessor;
 
 namespace css {
 class Loader;
 class ImageLoader;
 } // namespace css
 
 namespace gfx {
@@ -1832,26 +1832,27 @@ public:
   // will have a non-null return value.
   bool HasAnimationController()  { return !!mAnimationController; }
 
   // Getter for this document's SMIL Animation Controller. Performs lazy
   // initialization, if this document supports animation and if
   // mAnimationController isn't yet initialized.
   virtual nsSMILAnimationController* GetAnimationController() = 0;
 
-  // Gets the tracker for animation players that are waiting to start.
-  // Returns nullptr if there is no pending player tracker for this document
+  // Gets the tracker for animations that are waiting to start.
+  // Returns nullptr if there is no pending animation tracker for this document
   // which will be the case if there have never been any CSS animations or
   // transitions on elements in the document.
-  virtual mozilla::PendingPlayerTracker* GetPendingPlayerTracker() = 0;
-
-  // Gets the tracker for animation players that are waiting to start and
+  virtual mozilla::PendingAnimationTracker* GetPendingAnimationTracker() = 0;
+
+  // Gets the tracker for animations that are waiting to start and
   // creates it if it doesn't already exist. As a result, the return value
   // will never be nullptr.
-  virtual mozilla::PendingPlayerTracker* GetOrCreatePendingPlayerTracker() = 0;
+  virtual mozilla::PendingAnimationTracker*
+  GetOrCreatePendingAnimationTracker() = 0;
 
   // Makes the images on this document capable of having their animation
   // active or suspended. An Image will animate as long as at least one of its
   // owning Documents needs it to animate; otherwise it can suspend.
   virtual void SetImagesNeedAnimating(bool aAnimating) = 0;
 
   enum SuppressionType {
     eAnimationsOnly = 0x1,
--- a/layout/base/nsDisplayList.cpp
+++ b/layout/base/nsDisplayList.cpp
@@ -51,17 +51,17 @@
 #include "nsTransitionManager.h"
 #include "nsViewManager.h"
 #include "ImageLayers.h"
 #include "ImageContainer.h"
 #include "nsCanvasFrame.h"
 #include "StickyScrollContainer.h"
 #include "mozilla/EventStates.h"
 #include "mozilla/LookAndFeel.h"
-#include "mozilla/PendingPlayerTracker.h"
+#include "mozilla/PendingAnimationTracker.h"
 #include "mozilla/Preferences.h"
 #include "mozilla/UniquePtr.h"
 #include "ActiveLayerTracker.h"
 #include "nsContentUtils.h"
 #include "nsPrintfCString.h"
 #include "UnitTransforms.h"
 #include "LayersLogging.h"
 #include "FrameLayerBuilder.h"
@@ -1555,24 +1555,24 @@ nsDisplayList::ComputeVisibilityForSubli
 
   mIsOpaque = !aVisibleRegion->Intersects(aListVisibleBounds);
   return anyVisible;
 }
 
 static bool
 TriggerPendingAnimationsOnSubDocuments(nsIDocument* aDocument, void* aReadyTime)
 {
-  PendingPlayerTracker* tracker = aDocument->GetPendingPlayerTracker();
+  PendingAnimationTracker* tracker = aDocument->GetPendingAnimationTracker();
   if (tracker) {
     nsIPresShell* shell = aDocument->GetShell();
     // If paint-suppression is in effect then we haven't finished painting
     // this document yet so we shouldn't start animations
     if (!shell || !shell->IsPaintingSuppressed()) {
       const TimeStamp& readyTime = *static_cast<TimeStamp*>(aReadyTime);
-      tracker->TriggerPendingPlayersOnNextTick(readyTime);
+      tracker->TriggerPendingAnimationsOnNextTick(readyTime);
     }
   }
   aDocument->EnumerateSubDocuments(TriggerPendingAnimationsOnSubDocuments,
                                    aReadyTime);
   return true;
 }
 
 static void
--- a/layout/base/nsRefreshDriver.cpp
+++ b/layout/base/nsRefreshDriver.cpp
@@ -33,17 +33,17 @@
 #include "nsLayoutUtils.h"
 #include "nsPresContext.h"
 #include "nsComponentManagerUtils.h"
 #include "prlog.h"
 #include "nsAutoPtr.h"
 #include "nsIDocument.h"
 #include "jsapi.h"
 #include "nsContentUtils.h"
-#include "mozilla/PendingPlayerTracker.h"
+#include "mozilla/PendingAnimationTracker.h"
 #include "mozilla/Preferences.h"
 #include "nsViewManager.h"
 #include "GeckoProfiler.h"
 #include "nsNPAPIPluginInstance.h"
 #include "nsPerformance.h"
 #include "mozilla/dom/WindowBinding.h"
 #include "RestyleManager.h"
 #include "Layers.h"
@@ -1403,18 +1403,18 @@ static nsDocShell* GetDocShell(nsPresCon
 static bool
 HasPendingAnimations(nsIPresShell* aShell)
 {
   nsIDocument* doc = aShell->GetDocument();
   if (!doc) {
     return false;
   }
 
-  PendingPlayerTracker* tracker = doc->GetPendingPlayerTracker();
-  return tracker && tracker->HasPendingPlayers();
+  PendingAnimationTracker* tracker = doc->GetPendingAnimationTracker();
+  return tracker && tracker->HasPendingAnimations();
 }
 
 /**
  * Return a list of all the child docShells in a given root docShell that are
  * visible and are recording markers for the profilingTimeline
  */
 static void GetProfileTimelineSubDocShells(nsDocShell* aRootDocShell,
                                            nsTArray<nsDocShell*>& aShells)
--- a/layout/style/nsTransitionManager.cpp
+++ b/layout/style/nsTransitionManager.cpp
@@ -562,19 +562,19 @@ nsTransitionManager::ConsiderStartingTra
   segment.mFromValue = startValue;
   segment.mToValue = endValue;
   segment.mFromKey = 0;
   segment.mToKey = 1;
   segment.mTimingFunction.Init(tf);
 
   nsRefPtr<CSSTransitionPlayer> player = new CSSTransitionPlayer(timeline);
   // The order of the following two calls is important since PlayFromStyle
-  // will add the player to the PendingPlayerTracker of its effect's document.
-  // When we come to make effect writeable (bug 1049975) we should remove this
-  // dependency.
+  // will add the player to the PendingAnimationTracker of its effect's
+  // document. When we come to make effect writeable (bug 1049975) we should
+  // remove this dependency.
   player->SetEffect(pt);
   player->PlayFromStyle();
 
   if (!aElementTransitions) {
     aElementTransitions =
       GetAnimations(aElement, aNewStyleContext->GetPseudoType(), true);
     if (!aElementTransitions) {
       NS_WARNING("allocating CommonAnimationManager failed");