Bug 1443423 - Drop Animation::PauseNoUpdate(). r=birtles
authorHiroyuki Ikezoe <hikezoe@mozilla.com>
Wed, 07 Mar 2018 11:48:35 +0900
changeset 462191 c4b5d2b85228620b60da1404431bb19ab761c06c
parent 462190 ccc9d9b8901575420db2b703d46f1ccc613621eb
child 462192 71ecd11c2bf69c14ad4cca195cd576f65fc998e6
push id1683
push usersfraser@mozilla.com
push dateThu, 26 Apr 2018 16:43:40 +0000
treeherdermozilla-release@5af6cb21869d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbirtles
bugs1443423
milestone60.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1443423 - Drop Animation::PauseNoUpdate(). r=birtles CSSTransition still uses PlayNoUpdate(). MozReview-Commit-ID: 5RHSXwaKYV2
dom/animation/Animation.cpp
dom/animation/Animation.h
--- a/dom/animation/Animation.cpp
+++ b/dom/animation/Animation.cpp
@@ -597,23 +597,16 @@ Animation::Finish(ErrorResult& aRv)
 
 void
 Animation::Play(ErrorResult& aRv, LimitBehavior aLimitBehavior)
 {
   PlayNoUpdate(aRv, aLimitBehavior);
   PostUpdate();
 }
 
-void
-Animation::Pause(ErrorResult& aRv)
-{
-  PauseNoUpdate(aRv);
-  PostUpdate();
-}
-
 // https://drafts.csswg.org/web-animations/#reverse-an-animation
 void
 Animation::Reverse(ErrorResult& aRv)
 {
   if (!mTimeline || mTimeline->GetCurrentTime().IsNull()) {
     aRv.Throw(NS_ERROR_DOM_INVALID_STATE_ERR);
     return;
   }
@@ -1219,17 +1212,17 @@ Animation::PlayNoUpdate(ErrorResult& aRv
   UpdateTiming(SeekFlag::NoSeek, SyncNotifyFlag::Async);
   if (IsRelevant()) {
     nsNodeUtils::AnimationChanged(this);
   }
 }
 
 // https://drafts.csswg.org/web-animations/#pause-an-animation
 void
-Animation::PauseNoUpdate(ErrorResult& aRv)
+Animation::Pause(ErrorResult& aRv)
 {
   if (IsPausedOrPausing()) {
     return;
   }
 
   AutoMutationBatchForAnimation mb(*this);
 
   // If we are transitioning from idle, fill in the current time
@@ -1266,16 +1259,18 @@ Animation::PauseNoUpdate(ErrorResult& aR
   } else {
     TriggerOnNextTick(Nullable<TimeDuration>());
   }
 
   UpdateTiming(SeekFlag::NoSeek, SyncNotifyFlag::Async);
   if (IsRelevant()) {
     nsNodeUtils::AnimationChanged(this);
   }
+
+  PostUpdate();
 }
 
 // https://drafts.csswg.org/web-animations/#play-an-animation
 void
 Animation::ResumeAt(const TimeDuration& aReadyTime)
 {
   // This method is only expected to be called for an animation that is
   // waiting to play. We can easily adapt it to handle other states
--- a/dom/animation/Animation.h
+++ b/dom/animation/Animation.h
@@ -401,17 +401,16 @@ public:
    * exist when we would normally go to queue events on the next tick.
    */
   virtual void MaybeQueueCancelEvent(const StickyTimeDuration& aActiveTime) {};
 
 protected:
   void SilentlySetCurrentTime(const TimeDuration& aNewCurrentTime);
   void CancelNoUpdate();
   void PlayNoUpdate(ErrorResult& aRv, LimitBehavior aLimitBehavior);
-  void PauseNoUpdate(ErrorResult& aRv);
   void ResumeAt(const TimeDuration& aReadyTime);
   void PauseAt(const TimeDuration& aReadyTime);
   void FinishPendingAt(const TimeDuration& aReadyTime)
   {
     if (mPendingState == PendingState::PlayPending) {
       ResumeAt(aReadyTime);
     } else if (mPendingState == PendingState::PausePending) {
       PauseAt(aReadyTime);