Index: Source/core/css/CSSValuePool.cpp |
diff --git a/Source/core/css/CSSValuePool.cpp b/Source/core/css/CSSValuePool.cpp |
index 5fc50c765164cacb1fed3421897898b9fc425958..dbfcdf50e724010888baf80532d7400fe7960f23 100644 |
--- a/Source/core/css/CSSValuePool.cpp |
+++ b/Source/core/css/CSSValuePool.cpp |
@@ -97,6 +97,9 @@ PassRefPtrWillBeRawPtr<CSSPrimitiveValue> CSSValuePool::createColorValue(unsigne |
PassRefPtrWillBeRawPtr<CSSPrimitiveValue> CSSValuePool::createValue(double value, CSSPrimitiveValue::UnitTypes type) |
{ |
+ if (std::isinf(value)) |
+ value = 0; |
+ |
if (value < 0 || value > maximumCacheableIntegerValue) |
return CSSPrimitiveValue::create(value, type); |