Bug 1472900 - Rename mTimeStamp in AnimationEventInfo to mScheduledEventTimeStamp. r=birtles

It matches the name in the spec.
https://drafts.csswg.org/web-animations/#scheduled-event-time

MozReview-Commit-ID: EKoUNRfTVMJ

--HG--
extra : rebase_source : 83a5ee36d5df98273e26789733df69800d115b34
This commit is contained in:
Hiroyuki Ikezoe 2018-07-05 06:13:18 +09:00
Родитель fb20213f55
Коммит 067150dbd6
3 изменённых файлов: 18 добавлений и 16 удалений

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

@ -26,7 +26,7 @@ struct AnimationEventInfo
{
RefPtr<dom::EventTarget> mTarget;
RefPtr<dom::Animation> mAnimation;
TimeStamp mTimeStamp;
TimeStamp mScheduledEventTimeStamp;
typedef Variant<InternalTransitionEvent,
InternalAnimationEvent,
@ -38,11 +38,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(InternalAnimationEvent(true, aMessage)))
{
InternalAnimationEvent& event = mEvent.as<InternalAnimationEvent>();
@ -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<InternalTransitionEvent>();
@ -79,11 +79,11 @@ struct AnimationEventInfo
// For web animation events
AnimationEventInfo(const nsAString& aName,
RefPtr<dom::AnimationPlaybackEvent>&& 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;
}
}

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

@ -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));
};

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

@ -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));
};