зеркало из 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::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));
|
||||
};
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче