Index: third_party/WebKit/Source/core/animation/CSSColorInterpolationType.cpp |
diff --git a/third_party/WebKit/Source/core/animation/CSSColorInterpolationType.cpp b/third_party/WebKit/Source/core/animation/CSSColorInterpolationType.cpp |
index 018a6821534df630fc239fa04035b19310b75991..0ee2b2096d383150c22d11b6852a44489e3ab6bf 100644 |
--- a/third_party/WebKit/Source/core/animation/CSSColorInterpolationType.cpp |
+++ b/third_party/WebKit/Source/core/animation/CSSColorInterpolationType.cpp |
@@ -6,6 +6,7 @@ |
#include "core/animation/ColorPropertyFunctions.h" |
#include "core/css/CSSColorValue.h" |
+#include "core/css/CSSIdentifierValue.h" |
#include "core/css/resolver/StyleResolverState.h" |
#include "core/layout/LayoutTheme.h" |
#include "wtf/PtrUtil.h" |
@@ -78,14 +79,12 @@ std::unique_ptr<InterpolableValue> CSSColorInterpolationType::maybeCreateInterpo |
{ |
if (value.isColorValue()) |
return createInterpolableColor(toCSSColorValue(value).value()); |
- if (!value.isPrimitiveValue()) |
+ if (!value.isIdentifierValue()) |
return nullptr; |
- const CSSPrimitiveValue& primitive = toCSSPrimitiveValue(value); |
- if (!primitive.isValueID()) |
+ const CSSIdentifierValue& identifierValue = toCSSIdentifierValue(value); |
+ if (!StyleColor::isColorKeyword(identifierValue.getValueID())) |
return nullptr; |
- if (!StyleColor::isColorKeyword(primitive.getValueID())) |
- return nullptr; |
- return createInterpolableColor(primitive.getValueID()); |
+ return createInterpolableColor(identifierValue.getValueID()); |
} |
static void addPremultipliedColor(double& red, double& green, double& blue, double& alpha, double fraction, const Color& color) |
@@ -186,7 +185,7 @@ enum InterpolableColorPairIndex : unsigned { |
InterpolationValue CSSColorInterpolationType::maybeConvertValue(const CSSValue& value, const StyleResolverState& state, ConversionCheckers& conversionCheckers) const |
{ |
- if (cssProperty() == CSSPropertyColor && value.isPrimitiveValue() && toCSSPrimitiveValue(value).getValueID() == CSSValueCurrentcolor) |
+ if (cssProperty() == CSSPropertyColor && value.isIdentifierValue() && toCSSIdentifierValue(value).getValueID() == CSSValueCurrentcolor) |
return maybeConvertInherit(state, conversionCheckers); |
std::unique_ptr<InterpolableValue> interpolableColor = maybeCreateInterpolableColor(value); |