Index: Source/core/css/CSSPrimitiveValue.cpp |
diff --git a/Source/core/css/CSSPrimitiveValue.cpp b/Source/core/css/CSSPrimitiveValue.cpp |
index fd40ac79468f8935f59f8ccc83407c0ffec23529..9299d43012029c77eeef69572dd97b1ff7af3e10 100644 |
--- a/Source/core/css/CSSPrimitiveValue.cpp |
+++ b/Source/core/css/CSSPrimitiveValue.cpp |
@@ -152,6 +152,11 @@ StringToUnitTable& unitTable() |
} // namespace |
+float CSSPrimitiveValue::clampToCSSLengthRange(double value) |
+{ |
+ return clampTo<float>(value, minValueForCssLength, maxValueForCssLength); |
+} |
+ |
void CSSPrimitiveValue::initUnitTable() |
{ |
// Make sure we initialize this during blink initialization |
@@ -586,7 +591,7 @@ template<> unsigned CSSPrimitiveValue::computeLength(const CSSToLengthConversion |
template<> Length CSSPrimitiveValue::computeLength(const CSSToLengthConversionData& conversionData) |
{ |
- return Length(clampTo<float>(computeLengthDouble(conversionData), minValueForCssLength, maxValueForCssLength), Fixed); |
+ return Length(clampToCSSLengthRange(computeLengthDouble(conversionData)), Fixed); |
} |
template<> short CSSPrimitiveValue::computeLength(const CSSToLengthConversionData& conversionData) |