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

Unified Diff: Source/core/page/animation/KeyframeAnimation.cpp

Issue 23451031: Fix AnimationBase::fractionalTime() to handle a scale of infinity (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Added a comment Created 7 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/page/animation/AnimationBase.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/animation/KeyframeAnimation.cpp
diff --git a/Source/core/page/animation/KeyframeAnimation.cpp b/Source/core/page/animation/KeyframeAnimation.cpp
index ad1422c7bc79f70ac95f0138afaa8e272164d9b2..5d951422f0c714292f726dc01d5d2d467f43975d 100644
--- a/Source/core/page/animation/KeyframeAnimation.cpp
+++ b/Source/core/page/animation/KeyframeAnimation.cpp
@@ -158,6 +158,8 @@ void KeyframeAnimation::fetchIntervalEndpointsForProperty(CSSPropertyID property
offset = prevKeyframe.key();
scale = 1.0 / (nextKeyframe.key() - prevKeyframe.key());
+ // A scale of infinity is handled in AnimationBase::fractionalTime().
+ ASSERT(scale >= 0 && (!std::isinf(scale) || prevIndex == nextIndex));
const TimingFunction* timingFunction = 0;
if (const CSSAnimationData* matchedAnimation = getAnimationFromStyleByName(fromStyle, name()))
« no previous file with comments | « Source/core/page/animation/AnimationBase.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698