diff options
Diffstat (limited to 'Source/WebCore/html/parser/HTMLParserIdioms.cpp')
-rw-r--r-- | Source/WebCore/html/parser/HTMLParserIdioms.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/WebCore/html/parser/HTMLParserIdioms.cpp b/Source/WebCore/html/parser/HTMLParserIdioms.cpp index 91ff8d3..2be6af9 100644 --- a/Source/WebCore/html/parser/HTMLParserIdioms.cpp +++ b/Source/WebCore/html/parser/HTMLParserIdioms.cpp @@ -25,6 +25,7 @@ #include "config.h" #include "HTMLParserIdioms.h" +#include <limits> #include <wtf/MathExtras.h> #include <wtf/dtoa.h> #include <wtf/text/AtomicString.h> @@ -85,7 +86,7 @@ bool parseToDoubleForNumberType(const String& string, double* result) // Numbers are considered finite IEEE 754 single-precision floating point values. // See HTML5 2.4.4.3 `Real numbers.' - if (-FLT_MAX > value || value > FLT_MAX) + if (-std::numeric_limits<float>::max() > value || value > std::numeric_limits<float>::max()) return false; if (result) { |