Commit e14391e7 authored by rob.buis@samsung.com's avatar rob.buis@samsung.com

Merge SVGCSSParser into CSSPropertyParser.cpp

Because we always compile SVG there is no need anymore to have this in a separate file. Also now we end up with only one isSystemColor.

Review URL: https://codereview.chromium.org/184693003

git-svn-id: svn://svn.chromium.org/blink/trunk@168179 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 746f80fb
...@@ -807,7 +807,6 @@ ...@@ -807,7 +807,6 @@
'css/RuntimeCSSEnabled.cpp', 'css/RuntimeCSSEnabled.cpp',
'css/RuntimeCSSEnabled.h', 'css/RuntimeCSSEnabled.h',
'css/SVGCSSComputedStyleDeclaration.cpp', 'css/SVGCSSComputedStyleDeclaration.cpp',
'css/SVGCSSParser.cpp',
'css/SelectorChecker.cpp', 'css/SelectorChecker.cpp',
'css/SelectorChecker.h', 'css/SelectorChecker.h',
'css/SelectorCheckerFastPath.cpp', 'css/SelectorCheckerFastPath.cpp',
......
...@@ -1202,12 +1202,6 @@ bool BisonCSSParser::parseColor(const String& string) ...@@ -1202,12 +1202,6 @@ bool BisonCSSParser::parseColor(const String& string)
return !m_parsedProperties.isEmpty() && m_parsedProperties.first().id() == CSSPropertyColor; return !m_parsedProperties.isEmpty() && m_parsedProperties.first().id() == CSSPropertyColor;
} }
// FIXME: This is copied from SVGCSSParser.cpp
static bool isSystemColor(int id)
{
return (id >= CSSValueActiveborder && id <= CSSValueWindowtext) || id == CSSValueMenu;
}
bool BisonCSSParser::parseSystemColor(RGBA32& color, const String& string, Document* document) bool BisonCSSParser::parseSystemColor(RGBA32& color, const String& string, Document* document)
{ {
if (!document) if (!document)
...@@ -1216,7 +1210,7 @@ bool BisonCSSParser::parseSystemColor(RGBA32& color, const String& string, Docum ...@@ -1216,7 +1210,7 @@ bool BisonCSSParser::parseSystemColor(RGBA32& color, const String& string, Docum
CSSParserString cssColor; CSSParserString cssColor;
cssColor.init(string); cssColor.init(string);
CSSValueID id = cssValueKeywordID(cssColor); CSSValueID id = cssValueKeywordID(cssColor);
if (!isSystemColor(id)) if (!CSSPropertyParser::isSystemColor(id))
return false; return false;
Color parsedColor = RenderTheme::theme().systemColor(id); Color parsedColor = RenderTheme::theme().systemColor(id);
......
...@@ -76,6 +76,8 @@ public: ...@@ -76,6 +76,8 @@ public:
bool parseValue(CSSPropertyID, bool important); bool parseValue(CSSPropertyID, bool important);
static bool isSystemColor(int id);
private: private:
bool inShorthand() const { return m_inParseShorthand; } bool inShorthand() const { return m_inParseShorthand; }
bool inQuirksMode() const { return isQuirksModeBehavior(m_context.mode()); } bool inQuirksMode() const { return isQuirksModeBehavior(m_context.mode()); }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment