diff --git a/dom/animation/AnimationEventDispatcher.h b/dom/animation/AnimationEventDispatcher.h index d59350b6fd4e..c42b4f756e1c 100644 --- a/dom/animation/AnimationEventDispatcher.h +++ b/dom/animation/AnimationEventDispatcher.h @@ -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 EventArray; EventArray mPendingEvents;