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/CSSPropertyParser.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
« no previous file with comments | « third_party/WebKit/Source/core/css/parser/CSSPropertyParser.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
diff --git a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
index 7d6b8a4e08fbab8a13469cda4cb150c5eb1c1b1f..16f4392197cb2aa349f275f801bf5b4a8ab59759 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
+++ b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
@@ -94,7 +94,7 @@ static bool hasInvalidNumericValues(const CSSParserTokenRange& range)
for (const CSSParserToken& token : range) {
CSSParserTokenType type = token.type();
if ((type == NumberToken || type == DimensionToken || type == PercentageToken)
- && !CSSPropertyParser::isValidNumericValue(token.numericValue()))
+ && !token.isValidNumericValue())
return true;
}
return false;
@@ -143,13 +143,6 @@ CSSValue* CSSPropertyParser::parseSingleValue(
return value;
}
-bool CSSPropertyParser::isValidNumericValue(double value)
-{
- return std::isfinite(value)
- && value >= -std::numeric_limits<float>::max()
- && value <= std::numeric_limits<float>::max();
-}
-
bool CSSPropertyParser::parseValueStart(CSSPropertyID unresolvedProperty, bool important)
{
if (consumeCSSWideKeyword(unresolvedProperty, important))
@@ -180,11 +173,6 @@ bool CSSPropertyParser::parseValueStart(CSSPropertyID unresolvedProperty, bool i
return false;
}
-bool CSSPropertyParser::isSystemColor(CSSValueID id)
-{
- return (id >= CSSValueActiveborder && id <= CSSValueWindowtext) || id == CSSValueMenu;
-}
-
template <typename CharacterType>
static CSSPropertyID unresolvedCSSPropertyID(const CharacterType* propertyName, unsigned length)
{
« no previous file with comments | « third_party/WebKit/Source/core/css/parser/CSSPropertyParser.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698