Chromium Code Reviews| Index: Source/core/html/parser/HTMLParserIdioms.cpp |
| diff --git a/Source/core/html/parser/HTMLParserIdioms.cpp b/Source/core/html/parser/HTMLParserIdioms.cpp |
| index e3b143aaf2181cc7646c1968f6c36a489a533fee..8bd193a9c525839999dbffcafc5e3d197fb6969f 100644 |
| --- a/Source/core/html/parser/HTMLParserIdioms.cpp |
| +++ b/Source/core/html/parser/HTMLParserIdioms.cpp |
| @@ -109,8 +109,8 @@ Decimal parseToDecimalForNumberType(const String& string, const Decimal& fallbac |
| // Numbers are considered finite IEEE 754 single-precision floating point values. |
| // See HTML5 2.5.4.3 `Real numbers.' |
| // FIXME: We should use numeric_limits<double>::max for number input type. |
|
Inactive
2014/02/19 14:23:18
Please remove FIXME comment.
Habib Virji
2014/02/19 15:19:45
Done.
|
| - const Decimal floatMax = Decimal::fromDouble(std::numeric_limits<float>::max()); |
| - if (value < -floatMax || value > floatMax) |
| + const Decimal doubleMax = Decimal::fromDouble(std::numeric_limits<double>::max()); |
| + if (value < -doubleMax || value > doubleMax) |
| return fallbackValue; |
| // We return +0 for -0 case. |
| @@ -137,7 +137,7 @@ double parseToDoubleForNumberType(const String& string, double fallbackValue) |
| // Numbers are considered finite IEEE 754 single-precision floating point values. |
| // See HTML5 2.5.4.3 `Real numbers.' |
| - if (-std::numeric_limits<float>::max() > value || value > std::numeric_limits<float>::max()) |
| + if (-std::numeric_limits<double>::max() > value || value > std::numeric_limits<double>::max()) |
| return fallbackValue; |
| // The following expression converts -0 to +0. |