Index: third_party/WebKit/Source/core/css/parser/CSSParserToken.cpp |
diff --git a/third_party/WebKit/Source/core/css/parser/CSSParserToken.cpp b/third_party/WebKit/Source/core/css/parser/CSSParserToken.cpp |
index 308dc302f4b17af5da5328068c42f990a5fbe28f..a4e2728c30fd119d85354cdb1a4f3e20396cacbc 100644 |
--- a/third_party/WebKit/Source/core/css/parser/CSSParserToken.cpp |
+++ b/third_party/WebKit/Source/core/css/parser/CSSParserToken.cpp |
@@ -294,4 +294,15 @@ void CSSParserToken::serialize(StringBuilder& builder) const |
} |
} |
+bool CSSParserToken::isValidNumericValue(double value) |
+{ |
+ return value >= -std::numeric_limits<float>::max() |
+ && value <= std::numeric_limits<float>::max(); |
+} |
+ |
+bool CSSParserToken::isValidNumericValue() const |
+{ |
+ return isValidNumericValue(numericValue()); |
+} |
+ |
} // namespace blink |