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

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
« no previous file with comments | « Source/core/animation/Interpolation.h ('k') | Source/core/animation/InterpolationEffect.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/Interpolation.cpp
diff --git a/Source/core/animation/Interpolation.cpp b/Source/core/animation/Interpolation.cpp
index b552e0fdedfe07883820c0e0f03eb2dac9a15585..c9186c34114343fb59ac104f319d5591af22fc6e 100644
--- a/Source/core/animation/Interpolation.cpp
+++ b/Source/core/animation/Interpolation.cpp
@@ -5,6 +5,8 @@
#include "config.h"
#include "core/animation/Interpolation.h"
+#include "core/css/resolver/AnimatedStyleBuilder.h"
+
namespace WebCore {
namespace {
@@ -15,6 +17,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 +53,10 @@ void Interpolation::interpolate(int iteration, double fraction) const
}
}
+void LegacyStyleInterpolation::apply(StyleResolverState& state) const
+{
+ AnimatableValue* value = currentValue();
+ AnimatedStyleBuilder::applyProperty(m_id, state, value);
+}
+
}
« no previous file with comments | « Source/core/animation/Interpolation.h ('k') | Source/core/animation/InterpolationEffect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698