Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(393)

Unified Diff: third_party/WebKit/Source/core/animation/ColorInterpolationType.cpp

Issue 1376573004: Split out Color from CSSPrimitiveValue (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@split_property
Patch Set: Rebase and review feedback Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/animation/ColorInterpolationType.cpp
diff --git a/third_party/WebKit/Source/core/animation/ColorInterpolationType.cpp b/third_party/WebKit/Source/core/animation/ColorInterpolationType.cpp
index 250f02bc53b0ad53d839d87eafd49bbd09b6e273..3dbe6412abcf0cc640fcc855d7836fcd81d146d0 100644
--- a/third_party/WebKit/Source/core/animation/ColorInterpolationType.cpp
+++ b/third_party/WebKit/Source/core/animation/ColorInterpolationType.cpp
@@ -75,11 +75,11 @@ PassOwnPtr<InterpolableValue> ColorInterpolationType::createInterpolableColor(co
PassOwnPtr<InterpolableValue> ColorInterpolationType::maybeCreateInterpolableColor(const CSSValue& value)
{
+ if (value.isColorValue())
+ return createInterpolableColor(toCSSColorValue(value).value());
if (!value.isPrimitiveValue())
return nullptr;
const CSSPrimitiveValue& primitive = toCSSPrimitiveValue(value);
- if (primitive.isRGBColor())
- return createInterpolableColor(primitive.getRGBA32Value());
if (!primitive.isValueID())
return nullptr;
if (!CSSPropertyParser::isColorKeyword(primitive.getValueID()))

Powered by Google App Engine
This is Rietveld 408576698