Index: third_party/WebKit/Source/core/css/parser/CSSParser.cpp |
diff --git a/third_party/WebKit/Source/core/css/parser/CSSParser.cpp b/third_party/WebKit/Source/core/css/parser/CSSParser.cpp |
index f3b84fa6ab4a2c1805301e41f9bcc352a29ddf64..9fc5d92d6c4668a658bd1c75510bb985145649c5 100644 |
--- a/third_party/WebKit/Source/core/css/parser/CSSParser.cpp |
+++ b/third_party/WebKit/Source/core/css/parser/CSSParser.cpp |
@@ -5,6 +5,7 @@ |
#include "config.h" |
#include "core/css/parser/CSSParser.h" |
+#include "core/css/CSSColorValue.h" |
#include "core/css/CSSKeyframeRule.h" |
#include "core/css/StyleColor.h" |
#include "core/css/StylePropertySet.h" |
@@ -126,14 +127,9 @@ bool CSSParser::parseColor(RGBA32& color, const String& string, bool strict) |
if (!value) |
value = parseSingleValue(CSSPropertyColor, string, strictCSSParserContext()); |
- if (!value || !value->isPrimitiveValue()) |
+ if (!value || !value->isColorValue()) |
return false; |
- |
- CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value.get()); |
- if (!primitiveValue->isRGBColor()) |
- return false; |
- |
- color = primitiveValue->getRGBA32Value(); |
+ color = toCSSColorValue(*value).value(); |
return true; |
} |