Index: Source/core/css/parser/CSSParserValues.h |
diff --git a/Source/core/css/parser/CSSParserValues.h b/Source/core/css/parser/CSSParserValues.h |
index 9bcb86c47527544275c8ce70cc9a3671c5ec18e5..b3fab29917349bc243c187b4cbc3c8a104f0d92f 100644 |
--- a/Source/core/css/parser/CSSParserValues.h |
+++ b/Source/core/css/parser/CSSParserValues.h |
@@ -268,11 +268,8 @@ inline void CSSParserValue::setFromNumber(double value, int unit) |
{ |
id = CSSValueInvalid; |
isInt = false; |
- if (std::isfinite(value)) |
- fValue = value; |
- else |
- fValue = 0; |
- this->unit = unit; |
+ fValue = value; |
+ this->unit = std::isfinite(value) ? unit : CSSPrimitiveValue::CSS_UNKNOWN; |
} |
inline void CSSParserValue::setFromOperator(UChar c) |