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

Unified Diff: Source/core/animation/KeyframeEffect.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 | « Source/core/animation/InertEffect.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/KeyframeEffect.cpp
diff --git a/Source/core/animation/KeyframeEffect.cpp b/Source/core/animation/KeyframeEffect.cpp
index d6789dc2bdb2d7c0410d0bf5ba252968f150c078..6e546d9381ed0a0fe2aee19b1d1e5b8214320a7f 100644
--- a/Source/core/animation/KeyframeEffect.cpp
+++ b/Source/core/animation/KeyframeEffect.cpp
@@ -177,8 +177,7 @@ void KeyframeEffect::applyEffects()
double iteration = currentIteration();
ASSERT(iteration >= 0);
OwnPtr<Vector<RefPtr<Interpolation>>> interpolations = m_sampledEffect ? m_sampledEffect->mutableInterpolations() : nullptr;
- // FIXME: Handle iteration values which overflow int.
- bool changed = m_model->sample(static_cast<int>(iteration), timeFraction(), iterationDuration(), interpolations);
+ bool changed = m_model->sample(clampTo<int>(iteration, 0), timeFraction(), iterationDuration(), interpolations);
if (m_sampledEffect) {
m_sampledEffect->setInterpolations(interpolations.release());
} else if (interpolations && !interpolations->isEmpty()) {
« no previous file with comments | « Source/core/animation/InertEffect.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698