Index: Source/core/css/parser/CSSPropertyParser.cpp |
diff --git a/Source/core/css/parser/CSSPropertyParser.cpp b/Source/core/css/parser/CSSPropertyParser.cpp |
index ff359c5beb9a3c272b96e794bcc8b790ed8e72fb..2581a1f4f28f0a73b6e78d071e29bd84386a2798 100644 |
--- a/Source/core/css/parser/CSSPropertyParser.cpp |
+++ b/Source/core/css/parser/CSSPropertyParser.cpp |
@@ -8257,15 +8257,18 @@ bool CSSPropertyParser::parseSVGValue(CSSPropertyID propId, bool important) |
case CSSPropertyStopColor: // TODO : icccolor |
case CSSPropertyFloodColor: |
case CSSPropertyLightingColor: |
- if (isSystemColor(id)) |
- parsedValue = SVGColor::createFromColor(RenderTheme::theme().systemColor(id)); |
- else if ((id >= CSSValueAqua && id <= CSSValueTransparent) |
- || (id >= CSSValueAliceblue && id <= CSSValueYellowgreen) || id == CSSValueGrey) |
- parsedValue = SVGColor::createFromString(value->string); |
- else if (id == CSSValueCurrentcolor) |
- parsedValue = SVGColor::createCurrentColor(); |
- else // TODO : svgcolor (iccColor) |
- parsedValue = parseSVGColor(); |
+ if (isSystemColor(id)) { |
+ parsedValue = cssValuePool().createColorValue(RenderTheme::theme().systemColor(id).rgb()); |
+ } else if ((id >= CSSValueAqua && id <= CSSValueTransparent) |
+ || (id >= CSSValueAliceblue && id <= CSSValueYellowgreen) || id == CSSValueGrey) { |
+ StyleColor styleColor = SVGPaint::colorFromRGBColorString(value->string); |
+ ASSERT(!styleColor.isCurrentColor()); |
+ parsedValue = cssValuePool().createColorValue(styleColor.color().rgb()); |
+ } else if (id == CSSValueCurrentcolor) { |
+ parsedValue = cssValuePool().createIdentifierValue(id); |
+ } else { // TODO : svgcolor (iccColor) |
+ parsedValue = parseColor(); |
+ } |
if (parsedValue) |
m_valueList->next(); |
@@ -8403,14 +8406,6 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseSVGPaint() |
return SVGPaint::createColor(Color(c)); |
} |
-PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseSVGColor() |
-{ |
- RGBA32 c = Color::transparent; |
- if (!parseColorFromValue(m_valueList->current(), c)) |
- return nullptr; |
- return SVGColor::createFromColor(Color(c)); |
-} |
- |
// normal | [ fill || stroke || markers ] |
PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parsePaintOrder() const |
{ |