Index: third_party/WebKit/Source/core/animation/ColorStyleInterpolation.cpp |
diff --git a/third_party/WebKit/Source/core/animation/ColorStyleInterpolation.cpp b/third_party/WebKit/Source/core/animation/ColorStyleInterpolation.cpp |
index 19a638947bda0753c039c09e4a0c3f6ab69ae221..277a12c9cf012d38eacd00453209fb02c580ecda 100644 |
--- a/third_party/WebKit/Source/core/animation/ColorStyleInterpolation.cpp |
+++ b/third_party/WebKit/Source/core/animation/ColorStyleInterpolation.cpp |
@@ -23,26 +23,24 @@ bool ColorStyleInterpolation::canCreateFrom(const CSSValue& value) |
PassOwnPtr<InterpolableValue> ColorStyleInterpolation::colorToInterpolableValue(const CSSValue& value) |
{ |
- RGBA32 color; |
+ Color color; |
if (value.isColorValue()) { |
color = toCSSColorValue(value).value(); |
} else { |
const CSSPrimitiveValue& primitive = toCSSPrimitiveValue(value); |
if (CSSPropertyParser::isSystemColor(primitive.getValueID())) { |
- color = LayoutTheme::theme().systemColor(primitive.getValueID()).rgb(); |
+ color = LayoutTheme::theme().systemColor(primitive.getValueID()); |
} else { |
- Color colorFromID; |
- colorFromID.setNamedColor(getValueName(primitive.getValueID())); |
- color = colorFromID.rgb(); |
+ color.setNamedColor(getValueName(primitive.getValueID())); |
} |
} |
- int alpha = alphaChannel(color); |
+ int alpha = color.alpha(); |
OwnPtr<InterpolableList> list = InterpolableList::create(4); |
- list->set(0, InterpolableNumber::create(redChannel(color) * alpha)); |
- list->set(1, InterpolableNumber::create(greenChannel(color) * alpha)); |
- list->set(2, InterpolableNumber::create(blueChannel(color) * alpha)); |
+ list->set(0, InterpolableNumber::create(color.red() * alpha)); |
+ list->set(1, InterpolableNumber::create(color.green() * alpha)); |
+ list->set(2, InterpolableNumber::create(color.blue() * alpha)); |
list->set(3, InterpolableNumber::create(alpha)); |
return list->clone(); |