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

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

Issue 142523005: Web Animations: Define easing for each keyframe (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: Rebase Created 6 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: Source/core/animation/KeyframeEffectModel.h
diff --git a/Source/core/animation/KeyframeEffectModel.h b/Source/core/animation/KeyframeEffectModel.h
index 7859aa476bbf6f710603459a2ecc5b1719cb96ab..d793dc1a426d0eef0ee93be23aabad0045f2788c 100644
--- a/Source/core/animation/KeyframeEffectModel.h
+++ b/Source/core/animation/KeyframeEffectModel.h
@@ -33,6 +33,7 @@
#include "core/animation/AnimatableValue.h"
#include "core/animation/AnimationEffect.h"
+#include "platform/animation/TimingFunction.h"
#include "wtf/HashMap.h"
#include "wtf/HashSet.h"
#include "wtf/PassOwnPtr.h"
@@ -61,6 +62,8 @@ public:
double offset() const { return m_offset; }
void setComposite(AnimationEffect::CompositeOperation composite) { m_composite = composite; }
AnimationEffect::CompositeOperation composite() const { return m_composite; }
+ void setEasing(PassRefPtr<TimingFunction> easing) { m_easing = easing; }
+ PassRefPtr<TimingFunction> easing() const { return m_easing; }
Timothy Loh 2014/02/07 04:49:09 I would return a TimingFunction* here.
Eric Willigers 2014/02/07 05:19:27 Done.
void setPropertyValue(CSSPropertyID, const AnimatableValue*);
void clearPropertyValue(CSSPropertyID);
const AnimatableValue* propertyValue(CSSPropertyID) const;
@@ -72,6 +75,7 @@ private:
Keyframe(const Keyframe&);
double m_offset;
AnimationEffect::CompositeOperation m_composite;
+ RefPtr<TimingFunction> m_easing;
typedef HashMap<CSSPropertyID, RefPtr<AnimatableValue> > PropertyValueMap;
PropertyValueMap m_propertyValues;
};
@@ -105,14 +109,16 @@ public:
class PropertySpecificKeyframe {
public:
- PropertySpecificKeyframe(double offset, const AnimatableValue*, CompositeOperation);
+ PropertySpecificKeyframe(double offset, PassRefPtr<TimingFunction> easing, const AnimatableValue*, CompositeOperation);
double offset() const { return m_offset; }
+ const TimingFunction* easing() const { return m_easing.get(); }
const CompositableValue* value() const { return m_value.get(); }
PassOwnPtr<PropertySpecificKeyframe> cloneWithOffset(double offset) const;
private:
// Used by cloneWithOffset().
- PropertySpecificKeyframe(double offset, PassRefPtr<CompositableValue>);
+ PropertySpecificKeyframe(double offset, PassRefPtr<TimingFunction> easing, PassRefPtr<CompositableValue>);
double m_offset;
+ RefPtr<TimingFunction> m_easing;
RefPtr<CompositableValue> m_value;
};

Powered by Google App Engine
This is Rietveld 408576698