diff --git a/dom/animation/AnimationEventDispatcher.h b/dom/animation/AnimationEventDispatcher.h index 968529d752d8..a14373d1a000 100644 --- a/dom/animation/AnimationEventDispatcher.h +++ b/dom/animation/AnimationEventDispatcher.h @@ -26,7 +26,7 @@ struct AnimationEventInfo { RefPtr mTarget; RefPtr mAnimation; - TimeStamp mTimeStamp; + TimeStamp mScheduledEventTimeStamp; typedef Variant(); @@ -59,11 +59,11 @@ struct AnimationEventInfo const NonOwningAnimationTarget& aTarget, EventMessage aMessage, double aElapsedTime, - const TimeStamp& aTimeStamp, + const TimeStamp& aScheduledEventTimeStamp, dom::Animation* aAnimation) : mTarget(aTarget.mElement) , mAnimation(aAnimation) - , mTimeStamp(aTimeStamp) + , mScheduledEventTimeStamp(aScheduledEventTimeStamp) , mEvent(EventVariant(InternalTransitionEvent(true, aMessage))) { InternalTransitionEvent& event = mEvent.as(); @@ -79,11 +79,11 @@ struct AnimationEventInfo // For web animation events AnimationEventInfo(const nsAString& aName, RefPtr&& aEvent, - TimeStamp&& aTimeStamp, + TimeStamp&& aScheduledEventTimeStamp, dom::Animation* aAnimation) : mTarget(aAnimation) , mAnimation(aAnimation) - , mTimeStamp(std::move(aTimeStamp)) + , mScheduledEventTimeStamp(std::move(aScheduledEventTimeStamp)) , mEvent(std::move(aEvent)) { } @@ -215,14 +215,16 @@ private: class AnimationEventInfoLessThan { public: - bool operator()(const AnimationEventInfo& a, const AnimationEventInfo& b) const + bool operator()(const AnimationEventInfo& a, + const AnimationEventInfo& b) const { - if (a.mTimeStamp != b.mTimeStamp) { + if (a.mScheduledEventTimeStamp != b.mScheduledEventTimeStamp) { // Null timestamps sort first - if (a.mTimeStamp.IsNull() || b.mTimeStamp.IsNull()) { - return a.mTimeStamp.IsNull(); + if (a.mScheduledEventTimeStamp.IsNull() || + b.mScheduledEventTimeStamp.IsNull()) { + return a.mScheduledEventTimeStamp.IsNull(); } else { - return a.mTimeStamp < b.mTimeStamp; + return a.mScheduledEventTimeStamp < b.mScheduledEventTimeStamp; } } diff --git a/layout/style/nsAnimationManager.cpp b/layout/style/nsAnimationManager.cpp index ab669583dae1..d065a484406e 100755 --- a/layout/style/nsAnimationManager.cpp +++ b/layout/style/nsAnimationManager.cpp @@ -232,7 +232,7 @@ CSSAnimation::QueueEvents(const StickyTimeDuration& aActiveTime) auto appendAnimationEvent = [&](EventMessage aMessage, const StickyTimeDuration& aElapsedTime, - const TimeStamp& aTimeStamp) { + const TimeStamp& aScheduledEventTimeStamp) { double elapsedTime = aElapsedTime.ToSeconds(); if (aMessage == eAnimationCancel) { // 0 is an inappropriate value for this callsite. What we need to do is @@ -246,7 +246,7 @@ CSSAnimation::QueueEvents(const StickyTimeDuration& aActiveTime) mOwningElement.Target(), aMessage, elapsedTime, - aTimeStamp, + aScheduledEventTimeStamp, this)); }; diff --git a/layout/style/nsTransitionManager.cpp b/layout/style/nsTransitionManager.cpp index fbd80603b438..c9dd76f5d449 100755 --- a/layout/style/nsTransitionManager.cpp +++ b/layout/style/nsTransitionManager.cpp @@ -233,7 +233,7 @@ CSSTransition::QueueEvents(const StickyTimeDuration& aActiveTime) auto appendTransitionEvent = [&](EventMessage aMessage, const StickyTimeDuration& aElapsedTime, - const TimeStamp& aTimeStamp) { + const TimeStamp& aScheduledEventTimeStamp) { double elapsedTime = aElapsedTime.ToSeconds(); if (aMessage == eTransitionCancel) { // 0 is an inappropriate value for this callsite. What we need to do is @@ -247,7 +247,7 @@ CSSTransition::QueueEvents(const StickyTimeDuration& aActiveTime) mOwningElement.Target(), aMessage, elapsedTime, - aTimeStamp, + aScheduledEventTimeStamp, this)); };