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

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

Issue 2564793002: Add smooth interpolation support for <color> custom properties (Closed)
Patch Set: Rebase Created 3 years, 11 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/CSSColorInterpolationType.cpp
diff --git a/third_party/WebKit/Source/core/animation/CSSColorInterpolationType.cpp b/third_party/WebKit/Source/core/animation/CSSColorInterpolationType.cpp
index 0a3d41036c797e9ec1ac16668f211972b1e625a5..ef834b9901f66bc7c9069ab54edd64237f68db44 100644
--- a/third_party/WebKit/Source/core/animation/CSSColorInterpolationType.cpp
+++ b/third_party/WebKit/Source/core/animation/CSSColorInterpolationType.cpp
@@ -265,4 +265,13 @@ void CSSColorInterpolationType::applyStandardPropertyValue(
cssProperty() == CSSPropertyTextDecorationColor));
}
+const CSSValue* CSSColorInterpolationType::createCSSValue(
+ const InterpolableValue& interpolableValue,
+ const NonInterpolableValue*,
+ const StyleResolverState& state) const {
+ const InterpolableList& colorPair = toInterpolableList(interpolableValue);
+ Color color = resolveInterpolableColor(*colorPair.get(Unvisited), state);
+ return CSSColorValue::create(color.rgb());
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698