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

Unified Diff: Source/core/animation/Interpolation.cpp

Issue 194673002: Web Animations: Refactor KeyframeEffectModel to work via an InterpolationEffect. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@interpolationWrap
Patch Set: Created 6 years, 9 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: Source/core/animation/Interpolation.cpp
diff --git a/Source/core/animation/Interpolation.cpp b/Source/core/animation/Interpolation.cpp
index b552e0fdedfe07883820c0e0f03eb2dac9a15585..192fd2493e1b87f5e1ae19e2a12cdae140986ee2 100644
--- a/Source/core/animation/Interpolation.cpp
+++ b/Source/core/animation/Interpolation.cpp
@@ -5,6 +5,9 @@
#include "config.h"
#include "core/animation/Interpolation.h"
+#include "core/css/resolver/AnimatedStyleBuilder.h"
+#include "core/css/resolver/StyleResolverState.h"
+
namespace WebCore {
namespace {
@@ -15,6 +18,8 @@ bool typesMatch(const InterpolableValue* start, const InterpolableValue* end)
return end->isNumber();
if (start->isBool())
return end->isBool();
+ if (start->isAnimatableValue())
+ return end->isAnimatableValue();
if (!(start->isList() && end->isList()))
return false;
const InterpolableList* startList = toInterpolableList(start);
@@ -49,4 +54,10 @@ void Interpolation::interpolate(int iteration, double fraction) const
}
}
+void LegacyStyleInterpolation::apply(StyleResolverState& state) const
+{
+ AnimatableValue* value = currentValue();
+ AnimatedStyleBuilder::applyProperty(m_id, state, value);
+}
+
}

Powered by Google App Engine
This is Rietveld 408576698