Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(504)

Unified Diff: third_party/WebKit/Source/core/animation/AnimationEffect.cpp

Issue 1888983003: Fix crash in keyframe-effect/getComputedTiming tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/animation/AnimationEffect.cpp
diff --git a/third_party/WebKit/Source/core/animation/AnimationEffect.cpp b/third_party/WebKit/Source/core/animation/AnimationEffect.cpp
index 6d30f7753e341f8866eaee79525aa89bef7ec55c..6d2f567287a18b4d0e53490ef8d2a6001b801050 100644
--- a/third_party/WebKit/Source/core/animation/AnimationEffect.cpp
+++ b/third_party/WebKit/Source/core/animation/AnimationEffect.cpp
@@ -158,7 +158,11 @@ void AnimationEffect::updateInheritedTime(double inheritedTime, TimingUpdateReas
const double iterationTime = calculateIterationTime(iterationDuration, repeatedDuration(), scaledActiveTime, startOffset, m_timing);
currentIteration = calculateCurrentIteration(iterationDuration, iterationTime, scaledActiveTime, m_timing);
- timeFraction = calculateTransformedTime(currentIteration, iterationDuration, iterationTime, m_timing) / iterationDuration;
+ const double transformedTime = calculateTransformedTime(currentIteration, iterationDuration, iterationTime, m_timing);
+ if (!std::isfinite(iterationDuration))
alancutter (OOO until 2018) 2016/04/15 01:01:59 Is there a spec bug we can link to given that this
+ timeFraction = fmod(m_timing.iterationStart, 1.0);
+ else
+ timeFraction = transformedTime / iterationDuration;
if (!isNull(iterationTime)) {
timeToNextIteration = (iterationDuration - iterationTime) / std::abs(m_timing.playbackRate);
« no previous file with comments | « third_party/WebKit/LayoutTests/imported/web-platform-tests/web-animations/keyframe-effect/getComputedTiming-progress-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698