Index: third_party/WebKit/Source/core/animation/CSSLengthInterpolationType.cpp |
diff --git a/third_party/WebKit/Source/core/animation/CSSLengthInterpolationType.cpp b/third_party/WebKit/Source/core/animation/CSSLengthInterpolationType.cpp |
index cdaadc631d0c8a00a7fc42f82ddb8e796a54ccfe..704dff160f1a06e12fbd78a2f05b3fee571c5f13 100644 |
--- a/third_party/WebKit/Source/core/animation/CSSLengthInterpolationType.cpp |
+++ b/third_party/WebKit/Source/core/animation/CSSLengthInterpolationType.cpp |
@@ -227,8 +227,9 @@ static double clampToRange(double x, ValueRange range) |
static Length createLength(double pixels, double percentage, bool hasPercentage, ValueRange range) |
{ |
- ASSERT(hasPercentage || percentage == 0); |
- if (pixels && hasPercentage) |
+ if (percentage != 0) |
+ hasPercentage = true; |
+ if (pixels != 0 && hasPercentage) |
return Length(CalculationValue::create(PixelsAndPercent(pixels, percentage), range)); |
if (hasPercentage) |
return Length(clampToRange(percentage, range), Percent); |