# HG changeset patch # User Hiroyuki Ikezoe # Date 1517055447 -32400 # Node ID 5a4068a1cc40182a30c90ad725cc406941d680bf # Parent bea86c4424ac478ad3f510a413d98c6ba40fe4a1 Bug 1415780 - Rename DelayedEventsDispatcher to AnimationEventDispatcher. r=birtles We plan to use this class to dispatch web animation API events as well (bug 1354501). MozReview-Commit-ID: 7DMmc0aJzJ5 diff --git a/layout/style/AnimationCommon.h b/layout/style/AnimationCommon.h --- a/layout/style/AnimationCommon.h +++ b/layout/style/AnimationCommon.h @@ -22,17 +22,17 @@ #include "nsCSSPseudoElements.h" #include "nsCycleCollectionParticipant.h" class nsIFrame; class nsPresContext; namespace mozilla { enum class CSSPseudoElementType : uint8_t; -template class DelayedEventDispatcher; +template class AnimationEventDispatcher; namespace dom { class Element; } template class CommonAnimationManager { public: @@ -103,17 +103,17 @@ protected: mElementCollections.getFirst()) { head->Destroy(); // Note: this removes 'head' from mElementCollections. } } LinkedList> mElementCollections; nsPresContext *mPresContext; // weak (non-null from ctor to Disconnect) - mozilla::DelayedEventDispatcher mEventDispatcher; + mozilla::AnimationEventDispatcher mEventDispatcher; }; /** * Utility class for referencing the element that created a CSS animation or * transition. It is non-owning (i.e. it uses a raw pointer) since it is only * expected to be set by the owned animation while it actually being managed * by the owning element. * @@ -175,20 +175,20 @@ public: return nsContentUtils::GetContextForContent(mTarget.mElement); } private: NonOwningAnimationTarget mTarget; }; template -class DelayedEventDispatcher +class AnimationEventDispatcher { public: - DelayedEventDispatcher() : mIsSorted(true) { } + AnimationEventDispatcher() : mIsSorted(true) { } void QueueEvents(nsTArray&& aEvents) { mPendingEvents.AppendElements(Forward>(aEvents)); mIsSorted = false; } // This is exposed as a separate method so that when we are dispatching @@ -275,25 +275,25 @@ protected: typedef nsTArray EventArray; EventArray mPendingEvents; bool mIsSorted; }; template inline void -ImplCycleCollectionUnlink(DelayedEventDispatcher& aField) +ImplCycleCollectionUnlink(AnimationEventDispatcher& aField) { aField.Unlink(); } template inline void ImplCycleCollectionTraverse(nsCycleCollectionTraversalCallback& aCallback, - DelayedEventDispatcher& aField, + AnimationEventDispatcher& aField, const char* aName, uint32_t aFlags = 0) { aField.Traverse(&aCallback, aName); } // Return the TransitionPhase or AnimationPhase to use when the animation // doesn't have a target effect.