Bug 1488279 - Reorder the member variables of Animation, r=hiro

--HG--
extra : rebase_source : efe0da082de85c58edb68e030837bceae7faf7d5
This commit is contained in:
Olli Pettay 2018-09-04 00:58:15 +03:00
Родитель 096a9c36b0
Коммит a6fa8c7c32
1 изменённых файлов: 17 добавлений и 11 удалений

Просмотреть файл

@ -60,8 +60,8 @@ public:
explicit Animation(nsIGlobalObject* aGlobal)
: DOMEventTargetHelper(aGlobal)
, mPlaybackRate(1.0)
, mPendingState(PendingState::NotPending)
, mAnimationIndex(sNextAnimationIndex++)
, mPendingState(PendingState::NotPending)
, mFinishedAtLastComposeStyle(false)
, mIsRelevant(false)
, mFinishedIsResolved(false)
@ -568,15 +568,6 @@ protected:
// See http://drafts.csswg.org/web-animations/#current-finished-promise
RefPtr<Promise> mFinished;
// Indicates if the animation 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 animation is tracked by a PendingAnimationTracker because
// the animation will continue to be pending even after it has been removed
// from the PendingAnimationTracker while it is waiting for the next tick
// (see TriggerOnNextTick for details).
enum class PendingState { NotPending, PlayPending, PausePending };
PendingState mPendingState;
static uint64_t sNextAnimationIndex;
// The relative position of this animation within the global animation list.
@ -588,12 +579,25 @@ protected:
// possible for two different objects to have the same index.
uint64_t mAnimationIndex;
// Indicates if the animation 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 animation is tracked by a PendingAnimationTracker because
// the animation will continue to be pending even after it has been removed
// from the PendingAnimationTracker while it is waiting for the next tick
// (see TriggerOnNextTick for details).
enum class PendingState : uint8_t
{
NotPending,
PlayPending,
PausePending
};
PendingState mPendingState;
bool mFinishedAtLastComposeStyle;
// Indicates that the animation should be exposed in an element's
// getAnimations() list.
bool mIsRelevant;
RefPtr<MicroTaskRunnable> mFinishNotificationTask;
// True if mFinished is resolved or would be resolved if mFinished has
// yet to be created. This is not set when mFinished is rejected since
// in that case mFinished is immediately reset to represent a new current
@ -605,6 +609,8 @@ protected:
// the main thread.
bool mSyncWithGeometricAnimations;
RefPtr<MicroTaskRunnable> mFinishNotificationTask;
nsString mId;
};