Bug 1109390 part 3 - Clear the start time when playing a player; r=jwatt
authorBrian Birtles <birtles@gmail.com>
Tue, 24 Mar 2015 09:21:08 +0900
changeset 264034 cb71bf27300ce899920a2c6b89d66c61211c7547
parent 264033 35b6ee1472e9adcf3c4da0a4a7558ca619f4aba6
child 264035 c12acbaf33d8bd32491b7161800831cb8ab6f40f
push id4718
push userraliiev@mozilla.com
push dateMon, 11 May 2015 18:39:53 +0000
treeherdermozilla-beta@c20c4ef55f08 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjwatt
bugs1109390
milestone39.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 1109390 part 3 - Clear the start time when playing a player; r=jwatt This brings us into line with the algorithm in: https://w3c.github.io/web-animations/#play-an-animation which makes the other patches in this series easier to compare with the specification.
dom/animation/AnimationPlayer.cpp
--- a/dom/animation/AnimationPlayer.cpp
+++ b/dom/animation/AnimationPlayer.cpp
@@ -437,16 +437,19 @@ AnimationPlayer::DoPlay()
 
   if (mHoldTime.IsNull()) {
     return;
   }
 
   // Clear ready promise. We'll create a new one lazily.
   mReady = nullptr;
 
+  // Clear the start time until we resolve a new one
+  mStartTime.SetNull();
+
   mIsPending = true;
 
   nsIDocument* doc = GetRenderedDocument();
   if (!doc) {
     StartOnNextTick(Nullable<TimeDuration>());
     return;
   }