Index: third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp |
diff --git a/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp b/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp |
index ca7b9c81216d1b3b55b022812adee9c63e3a635e..54eb4271b2773a941ff6464b26a2ef84366cc03e 100644 |
--- a/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp |
+++ b/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp |
@@ -154,9 +154,8 @@ void StyleBuilderFunctions::applyInheritCSSPropertyColor(StyleResolverState& sta |
void StyleBuilderFunctions::applyValueCSSPropertyColor(StyleResolverState& state, CSSValue* value) |
{ |
- CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); |
// As per the spec, 'color: currentColor' is treated as 'color: inherit' |
- if (primitiveValue->getValueID() == CSSValueCurrentcolor) { |
+ if (value->isPrimitiveValue() && toCSSPrimitiveValue(value)->getValueID() == CSSValueCurrentcolor) { |
applyInheritCSSPropertyColor(state); |
return; |
} |