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

Unified Diff: third_party/WebKit/Source/core/css/parser/CSSParserToken.cpp

Issue 2056593005: Move more helper methods out of CSSPropertyParser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: V2 Created 4 years, 6 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
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

Powered by Google App Engine
This is Rietveld 408576698