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

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

Issue 215883005: Web Animations: Introduce String based KeyframeEffectModel (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
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.h
diff --git a/Source/core/animation/Interpolation.h b/Source/core/animation/Interpolation.h
index e565da02192101eeae4bd8b366533dd1b98c70d1..2870340bdc19f27b32b6fc0935c032edc9fa9bc6 100644
--- a/Source/core/animation/Interpolation.h
+++ b/Source/core/animation/Interpolation.h
@@ -45,7 +45,6 @@ private:
friend class AnimationInterpolableValueTest;
friend class AnimationInterpolationEffectTest;
-
};
class StyleInterpolation : public Interpolation {
@@ -59,6 +58,18 @@ public:
virtual void apply(StyleResolverState&) const = 0;
virtual bool isStyleInterpolation() const OVERRIDE FINAL { return true; }
+ // FIXME: This method exists for two reasons:
+ // * tests use it to extract values without applying them
+ // * interrupted compositor transitions use it to generate a new set of
+ // keyframes representing the retargeted transition.
+ // Once KeyframeEffectModel objects can be generated from
+ // InterpolationEffect objects, we can use this approach in both cases,
+ // and remove this method.
+ virtual PassRefPtr<AnimatableValue> currentValue() const
+ {
+ ASSERT_NOT_REACHED();
+ return nullptr;
+ }
alancutter (OOO until 2018) 2014/04/01 03:12:48 Adding currentValue() to StyleInterpolation is lik
shans 2014/04/01 04:01:27 Done.
CSSPropertyID id() const { return m_id; }
@@ -84,7 +95,7 @@ public:
virtual void apply(StyleResolverState&) const;
virtual bool isLegacyStyleInterpolation() const OVERRIDE FINAL { return true; }
- AnimatableValue* currentValue() const
+ PassRefPtr<AnimatableValue> currentValue() const
{
InterpolableAnimatableValue* value = static_cast<InterpolableAnimatableValue*>(m_cachedValue.get());
return value->value();

Powered by Google App Engine
This is Rietveld 408576698