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

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

Issue 1170913002: Clamp animated lengths to CSS length range to match CSSPrimitiveValue (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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 | « LayoutTests/animations/css-length-range-crash.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/LengthStyleInterpolation.cpp
diff --git a/Source/core/animation/LengthStyleInterpolation.cpp b/Source/core/animation/LengthStyleInterpolation.cpp
index c4a1fff45ec77ada63f937f95d614497d8ea3b0d..643581c3f97c149af72cefc85a9c71d3565e5e3b 100644
--- a/Source/core/animation/LengthStyleInterpolation.cpp
+++ b/Source/core/animation/LengthStyleInterpolation.cpp
@@ -269,7 +269,7 @@ static Length lengthFromInterpolableValue(const InterpolableValue& value, Interp
if (hasPixels && hasPercent)
return Length(CalculationValue::create(pixelsAndPercent, range));
if (hasPixels)
- return Length(clampToRange(pixelsAndPercent.pixels, range), Fixed);
+ return Length(CSSPrimitiveValue::clampToCSSLengthRange(clampToRange(pixelsAndPercent.pixels, range)), Fixed);
if (hasPercent)
return Length(clampToRange(pixelsAndPercent.percent, range), Percent);
ASSERT_NOT_REACHED();
« no previous file with comments | « LayoutTests/animations/css-length-range-crash.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698