зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
fb20213f55
Коммит
067150dbd6
|
@ -26,7 +26,7 @@ struct AnimationEventInfo
|
||||||
{
|
{
|
||||||
RefPtr<dom::EventTarget> mTarget;
|
RefPtr<dom::EventTarget> mTarget;
|
||||||
RefPtr<dom::Animation> mAnimation;
|
RefPtr<dom::Animation> mAnimation;
|
||||||
TimeStamp mTimeStamp;
|
TimeStamp mScheduledEventTimeStamp;
|
||||||
|
|
||||||
typedef Variant<InternalTransitionEvent,
|
typedef Variant<InternalTransitionEvent,
|
||||||
InternalAnimationEvent,
|
InternalAnimationEvent,
|
||||||
|
@ -38,11 +38,11 @@ struct AnimationEventInfo
|
||||||
const NonOwningAnimationTarget& aTarget,
|
const NonOwningAnimationTarget& aTarget,
|
||||||
EventMessage aMessage,
|
EventMessage aMessage,
|
||||||
double aElapsedTime,
|
double aElapsedTime,
|
||||||
const TimeStamp& aTimeStamp,
|
const TimeStamp& aScheduledEventTimeStamp,
|
||||||
dom::Animation* aAnimation)
|
dom::Animation* aAnimation)
|
||||||
: mTarget(aTarget.mElement)
|
: mTarget(aTarget.mElement)
|
||||||
, mAnimation(aAnimation)
|
, mAnimation(aAnimation)
|
||||||
, mTimeStamp(aTimeStamp)
|
, mScheduledEventTimeStamp(aScheduledEventTimeStamp)
|
||||||
, mEvent(EventVariant(InternalAnimationEvent(true, aMessage)))
|
, mEvent(EventVariant(InternalAnimationEvent(true, aMessage)))
|
||||||
{
|
{
|
||||||
InternalAnimationEvent& event = mEvent.as<InternalAnimationEvent>();
|
InternalAnimationEvent& event = mEvent.as<InternalAnimationEvent>();
|
||||||
|
@ -59,11 +59,11 @@ struct AnimationEventInfo
|
||||||
const NonOwningAnimationTarget& aTarget,
|
const NonOwningAnimationTarget& aTarget,
|
||||||
EventMessage aMessage,
|
EventMessage aMessage,
|
||||||
double aElapsedTime,
|
double aElapsedTime,
|
||||||
const TimeStamp& aTimeStamp,
|
const TimeStamp& aScheduledEventTimeStamp,
|
||||||
dom::Animation* aAnimation)
|
dom::Animation* aAnimation)
|
||||||
: mTarget(aTarget.mElement)
|
: mTarget(aTarget.mElement)
|
||||||
, mAnimation(aAnimation)
|
, mAnimation(aAnimation)
|
||||||
, mTimeStamp(aTimeStamp)
|
, mScheduledEventTimeStamp(aScheduledEventTimeStamp)
|
||||||
, mEvent(EventVariant(InternalTransitionEvent(true, aMessage)))
|
, mEvent(EventVariant(InternalTransitionEvent(true, aMessage)))
|
||||||
{
|
{
|
||||||
InternalTransitionEvent& event = mEvent.as<InternalTransitionEvent>();
|
InternalTransitionEvent& event = mEvent.as<InternalTransitionEvent>();
|
||||||
|
@ -79,11 +79,11 @@ struct AnimationEventInfo
|
||||||
// For web animation events
|
// For web animation events
|
||||||
AnimationEventInfo(const nsAString& aName,
|
AnimationEventInfo(const nsAString& aName,
|
||||||
RefPtr<dom::AnimationPlaybackEvent>&& aEvent,
|
RefPtr<dom::AnimationPlaybackEvent>&& aEvent,
|
||||||
TimeStamp&& aTimeStamp,
|
TimeStamp&& aScheduledEventTimeStamp,
|
||||||
dom::Animation* aAnimation)
|
dom::Animation* aAnimation)
|
||||||
: mTarget(aAnimation)
|
: mTarget(aAnimation)
|
||||||
, mAnimation(aAnimation)
|
, mAnimation(aAnimation)
|
||||||
, mTimeStamp(std::move(aTimeStamp))
|
, mScheduledEventTimeStamp(std::move(aScheduledEventTimeStamp))
|
||||||
, mEvent(std::move(aEvent))
|
, mEvent(std::move(aEvent))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -215,14 +215,16 @@ private:
|
||||||
class AnimationEventInfoLessThan
|
class AnimationEventInfoLessThan
|
||||||
{
|
{
|
||||||
public:
|
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
|
// Null timestamps sort first
|
||||||
if (a.mTimeStamp.IsNull() || b.mTimeStamp.IsNull()) {
|
if (a.mScheduledEventTimeStamp.IsNull() ||
|
||||||
return a.mTimeStamp.IsNull();
|
b.mScheduledEventTimeStamp.IsNull()) {
|
||||||
|
return a.mScheduledEventTimeStamp.IsNull();
|
||||||
} else {
|
} else {
|
||||||
return a.mTimeStamp < b.mTimeStamp;
|
return a.mScheduledEventTimeStamp < b.mScheduledEventTimeStamp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -232,7 +232,7 @@ CSSAnimation::QueueEvents(const StickyTimeDuration& aActiveTime)
|
||||||
|
|
||||||
auto appendAnimationEvent = [&](EventMessage aMessage,
|
auto appendAnimationEvent = [&](EventMessage aMessage,
|
||||||
const StickyTimeDuration& aElapsedTime,
|
const StickyTimeDuration& aElapsedTime,
|
||||||
const TimeStamp& aTimeStamp) {
|
const TimeStamp& aScheduledEventTimeStamp) {
|
||||||
double elapsedTime = aElapsedTime.ToSeconds();
|
double elapsedTime = aElapsedTime.ToSeconds();
|
||||||
if (aMessage == eAnimationCancel) {
|
if (aMessage == eAnimationCancel) {
|
||||||
// 0 is an inappropriate value for this callsite. What we need to do is
|
// 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(),
|
mOwningElement.Target(),
|
||||||
aMessage,
|
aMessage,
|
||||||
elapsedTime,
|
elapsedTime,
|
||||||
aTimeStamp,
|
aScheduledEventTimeStamp,
|
||||||
this));
|
this));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -233,7 +233,7 @@ CSSTransition::QueueEvents(const StickyTimeDuration& aActiveTime)
|
||||||
|
|
||||||
auto appendTransitionEvent = [&](EventMessage aMessage,
|
auto appendTransitionEvent = [&](EventMessage aMessage,
|
||||||
const StickyTimeDuration& aElapsedTime,
|
const StickyTimeDuration& aElapsedTime,
|
||||||
const TimeStamp& aTimeStamp) {
|
const TimeStamp& aScheduledEventTimeStamp) {
|
||||||
double elapsedTime = aElapsedTime.ToSeconds();
|
double elapsedTime = aElapsedTime.ToSeconds();
|
||||||
if (aMessage == eTransitionCancel) {
|
if (aMessage == eTransitionCancel) {
|
||||||
// 0 is an inappropriate value for this callsite. What we need to do is
|
// 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(),
|
mOwningElement.Target(),
|
||||||
aMessage,
|
aMessage,
|
||||||
elapsedTime,
|
elapsedTime,
|
||||||
aTimeStamp,
|
aScheduledEventTimeStamp,
|
||||||
this));
|
this));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче