зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1415780 - Make AnimationEventDispatcher::SortEvents() private. r=birtles
Now we sort pending events only when dispatching the events, i.e. only inside DispatchEvent(). MozReview-Commit-ID: IRqH56BEnKb --HG-- extra : rebase_source : dd2b8528fdc36d1371815feaf07ead0b258fe453
This commit is contained in:
Родитель
99f98b1bd6
Коммит
9e4cc95a63
|
@ -116,22 +116,6 @@ public:
|
|||
mIsSorted = false;
|
||||
}
|
||||
|
||||
// Sort all pending CSS animation/transition events by scheduled event time
|
||||
// and composite order.
|
||||
// https://drafts.csswg.org/web-animations/#update-animations-and-send-events
|
||||
void SortEvents()
|
||||
{
|
||||
if (mIsSorted) {
|
||||
return;
|
||||
}
|
||||
|
||||
// FIXME: Replace with mPendingEvents.StableSort when bug 1147091 is
|
||||
// fixed.
|
||||
std::stable_sort(mPendingEvents.begin(), mPendingEvents.end(),
|
||||
AnimationEventInfoLessThan());
|
||||
mIsSorted = true;
|
||||
}
|
||||
|
||||
// This will call SortEvents automatically if it has not already been
|
||||
// called.
|
||||
void DispatchEvents()
|
||||
|
@ -191,6 +175,22 @@ private:
|
|||
}
|
||||
};
|
||||
|
||||
// Sort all pending CSS animation/transition events by scheduled event time
|
||||
// and composite order.
|
||||
// https://drafts.csswg.org/web-animations/#update-animations-and-send-events
|
||||
void SortEvents()
|
||||
{
|
||||
if (mIsSorted) {
|
||||
return;
|
||||
}
|
||||
|
||||
// FIXME: Replace with mPendingEvents.StableSort when bug 1147091 is
|
||||
// fixed.
|
||||
std::stable_sort(mPendingEvents.begin(), mPendingEvents.end(),
|
||||
AnimationEventInfoLessThan());
|
||||
mIsSorted = true;
|
||||
}
|
||||
|
||||
nsPresContext* mPresContext;
|
||||
typedef nsTArray<AnimationEventInfo> EventArray;
|
||||
EventArray mPendingEvents;
|
||||
|
|
Загрузка…
Ссылка в новой задаче