Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1171)

Unified Diff: Source/core/html/parser/HTMLParserIdioms.cpp

Issue 172223003: Input type Number maximum value increase (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Review comments fix Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/html/forms/NumberInputType.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..3977e0598b3807d75ac94e0e7bf027680c2fdf1b 100644
--- a/Source/core/html/parser/HTMLParserIdioms.cpp
+++ b/Source/core/html/parser/HTMLParserIdioms.cpp
@@ -108,9 +108,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.'
yosin_UTC9 2014/02/25 02:20:31 Please update this comment. Now we refer "2.4.4.3
Habib Virji 2014/02/25 10:09:27 Done.
- // FIXME: We should use numeric_limits<double>::max for number input type.
- 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 +136,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.
« no previous file with comments | « Source/core/html/forms/NumberInputType.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698