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

Unified Diff: Source/core/css/parser/CSSParserFastPaths.h

Issue 1169983004: Move fast-path color parsing from CSSPropertyParser to CSSParserFastPaths (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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: Source/core/css/parser/CSSParserFastPaths.h
diff --git a/Source/core/css/parser/CSSParserFastPaths.h b/Source/core/css/parser/CSSParserFastPaths.h
index 1b3a31b3a721d4436364a00e9f0d10dc83d7cc3c..78acc935be2246bc8762c27f2354bfa1fea1e6ef 100644
--- a/Source/core/css/parser/CSSParserFastPaths.h
+++ b/Source/core/css/parser/CSSParserFastPaths.h
@@ -7,6 +7,7 @@
#include "core/CSSPropertyNames.h"
#include "core/CSSValueKeywords.h"
+#include "platform/graphics/Color.h"
#include "platform/heap/Handle.h"
#include "wtf/Forward.h"
@@ -23,6 +24,10 @@ public:
// Properties handled here shouldn't be explicitly handled in CSSPropertyParser
static bool isKeywordPropertyID(CSSPropertyID);
static bool isValidKeywordPropertyAndValue(CSSPropertyID, CSSValueID);
+
+ // Keywords like 'green' will be resolved here, unlike during regular
+ // property parsing where we'd leave it as a keyword.
+ static bool parseColorAsRGBA32(RGBA32&, const String&, bool quirksMode);
alancutter (OOO until 2018) 2015/06/10 00:31:20 Comment could be simpler. // Resolves keywords lik
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698