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

Unified Diff: Source/core/animation/InertEffect.cpp

Issue 1345163007: Web Animations: Handle iteration values which overflow int. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 3 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
« no previous file with comments | « no previous file | Source/core/animation/KeyframeEffect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/InertEffect.cpp
diff --git a/Source/core/animation/InertEffect.cpp b/Source/core/animation/InertEffect.cpp
index f48c8de1d3aa2b511c1faf357ff4fc8316450608..d3f65c3469355431aa0837c7df43ecf59505c072 100644
--- a/Source/core/animation/InertEffect.cpp
+++ b/Source/core/animation/InertEffect.cpp
@@ -58,8 +58,7 @@ void InertEffect::sample(OwnPtr<Vector<RefPtr<Interpolation>>>& result)
double iteration = currentIteration();
ASSERT(iteration >= 0);
- // FIXME: Handle iteration values which overflow int.
- m_model->sample(static_cast<int>(iteration), timeFraction(), iterationDuration(), result);
+ m_model->sample(clampTo<int>(iteration, 0), timeFraction(), iterationDuration(), result);
}
double InertEffect::calculateTimeToEffectChange(bool, double, double) const
« no previous file with comments | « no previous file | Source/core/animation/KeyframeEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698