Bug 1038032 part 1 - Add temporary workaround to avoid overflow when calculating the active end of an animation; r=dholbert
authorBrian Birtles <birtles@gmail.com>
Fri, 18 Jul 2014 10:31:17 +0900
changeset 216719 39de47827a38c006650672c8a08d57a1a8482316
parent 216718 c6886d31a30be5c3da61c6d213aea17295ec213c
child 216720 14c7a4ee44fcd6b34aee4a4f442e41d6ad4aabb0
push id515
push userraliiev@mozilla.com
push dateMon, 06 Oct 2014 12:51:51 +0000
treeherdermozilla-release@267c7a481bef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert
bugs1038032
milestone33.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 1038032 part 1 - Add temporary workaround to avoid overflow when calculating the active end of an animation; r=dholbert
layout/style/AnimationCommon.cpp
--- a/layout/style/AnimationCommon.cpp
+++ b/layout/style/AnimationCommon.cpp
@@ -516,17 +516,21 @@ ElementAnimation::GetComputedTimingAt(co
 
   // When we finish exactly at the end of an iteration we need to report
   // the end of the final iteration and not the start of the next iteration
   // so we set up a flag for that case.
   bool isEndOfFinalIteration = false;
 
   // Get the normalized time within the active interval.
   TimeDuration activeTime;
-  if (localTime >= aTiming.mDelay + result.mActiveDuration) {
+  // FIXME: The following check that the active duration is not equal to Forever
+  // is a temporary workaround to avoid overflow and should be removed once
+  // bug 1039924 is fixed.
+  if (result.mActiveDuration != TimeDuration::Forever() &&
+      localTime >= aTiming.mDelay + result.mActiveDuration) {
     result.mPhase = ComputedTiming::AnimationPhase_After;
     if (!aTiming.FillsForwards()) {
       // The animation isn't active or filling at this time.
       result.mTimeFraction = ComputedTiming::kNullTimeFraction;
       return result;
     }
     activeTime = result.mActiveDuration;
     // Note that infinity == floor(infinity) so this will also be true when we