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

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

Issue 1690543002: Add additive animation support for CSS properties perspective-origin and object-position (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@_backgroundPositionAnimation
Patch Set: Rebased Created 4 years, 10 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/CSSLengthInterpolationType.cpp
diff --git a/third_party/WebKit/Source/core/animation/CSSLengthInterpolationType.cpp b/third_party/WebKit/Source/core/animation/CSSLengthInterpolationType.cpp
index 46b17a8c73c549cb68dee2155347710594bf2d1c..7478f60e66e8b6d5d6b0f101b97b06f4b1f7c009 100644
--- a/third_party/WebKit/Source/core/animation/CSSLengthInterpolationType.cpp
+++ b/third_party/WebKit/Source/core/animation/CSSLengthInterpolationType.cpp
@@ -59,6 +59,13 @@ PassOwnPtr<InterpolableValue> CSSLengthInterpolationType::createInterpolablePixe
return interpolableList.release();
}
+InterpolationValue CSSLengthInterpolationType::createInterpolablePercent(double percent)
+{
+ OwnPtr<InterpolableList> interpolableList = createNeutralInterpolableValue();
+ interpolableList->set(CSSPrimitiveValue::UnitTypePercentage, InterpolableNumber::create(percent));
+ return InterpolationValue(interpolableList.release(), CSSLengthNonInterpolableValue::create(true));
+}
+
InterpolationValue CSSLengthInterpolationType::maybeConvertLength(const Length& length, float zoom)
{
if (!length.isSpecified())

Powered by Google App Engine
This is Rietveld 408576698