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

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

Issue 1219463003: Dissect and clean up instances of color parsing in CSSPropertyParser (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update handling of 'grey' in fast-path color parser. 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
« no previous file with comments | « Source/core/css/parser/CSSParserFastPaths.cpp ('k') | Source/core/css/parser/CSSPropertyParser.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/parser/CSSPropertyParser.h
diff --git a/Source/core/css/parser/CSSPropertyParser.h b/Source/core/css/parser/CSSPropertyParser.h
index c7b5775968e452e28660760aa2a5ba77a98b2cc6..0c9d917b5e2d55159fbdd13f9acdd9f90de9991a 100644
--- a/Source/core/css/parser/CSSPropertyParser.h
+++ b/Source/core/css/parser/CSSPropertyParser.h
@@ -74,7 +74,8 @@ public:
CSSParserValueList*, const CSSParserContext&,
WillBeHeapVector<CSSProperty, 256>&, StyleRule::Type);
- static bool isSystemColor(int id);
+ static bool isSystemColor(CSSValueID);
+ static bool isColorKeyword(CSSValueID);
private:
CSSPropertyParser(CSSParserValueList*, const CSSParserContext&,
@@ -104,8 +105,6 @@ private:
PassRefPtrWillBeRawPtr<CSSValue> parseAttr(CSSParserValueList* args);
- PassRefPtrWillBeRawPtr<CSSValue> parseBackgroundColor();
-
bool parseFillImage(CSSParserValueList*, RefPtrWillBeRawPtr<CSSValue>&);
enum FillPositionFlag { InvalidFillPosition = 0, AmbiguousFillPosition = 1, XFillPosition = 2, YFillPosition = 4 };
@@ -189,10 +188,17 @@ private:
PassRefPtrWillBeRawPtr<CSSValue> parseCounter(int defaultValue);
PassRefPtrWillBeRawPtr<CSSValue> parseCounterContent(CSSParserValueList* args, bool counters);
- bool parseColorParameters(CSSParserValue*, int* colorValues, bool parseAlpha);
- bool parseHSLParameters(CSSParserValue*, double* colorValues, bool parseAlpha);
- PassRefPtrWillBeRawPtr<CSSPrimitiveValue> parseColor(CSSParserValue* = 0, bool acceptQuirkyColors = false);
- bool parseColorFromValue(CSSParserValue*, RGBA32&, bool acceptQuirkyColors = false);
+ bool parseColorParameters(const CSSParserValue*, int* colorValues, bool parseAlpha);
+ bool parseHSLParameters(const CSSParserValue*, double* colorValues, bool parseAlpha);
+ PassRefPtrWillBeRawPtr<CSSPrimitiveValue> parseColor(const CSSParserValue*, bool acceptQuirkyColors = false);
+ bool parseColorFromValue(const CSSParserValue*, RGBA32&, bool acceptQuirkyColors = false);
+
+ bool acceptQuirkyColors(CSSPropertyID) const;
+ PassRefPtrWillBeRawPtr<CSSPrimitiveValue> parseBackgroundColor(const CSSParserValue*);
+ PassRefPtrWillBeRawPtr<CSSPrimitiveValue> parseTapHighlightColor(const CSSParserValue*);
+ PassRefPtrWillBeRawPtr<CSSPrimitiveValue> parseGradientStopColor(const CSSParserValue*);
+ PassRefPtrWillBeRawPtr<CSSPrimitiveValue> parseDeprecatedGradientStopColor(const CSSParserValue*);
+ PassRefPtrWillBeRawPtr<CSSPrimitiveValue> parseSVGColor(const CSSParserValue*);
PassRefPtrWillBeRawPtr<CSSPrimitiveValue> parseLineHeight();
bool parseFontSize(bool important);
« no previous file with comments | « Source/core/css/parser/CSSParserFastPaths.cpp ('k') | Source/core/css/parser/CSSPropertyParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698