summaryrefslogtreecommitdiff
path: root/Source/core/animation/Animation.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/core/animation/Animation.h')
-rw-r--r--Source/core/animation/Animation.h25
1 files changed, 12 insertions, 13 deletions
diff --git a/Source/core/animation/Animation.h b/Source/core/animation/Animation.h
index 887b33468..90960fc14 100644
--- a/Source/core/animation/Animation.h
+++ b/Source/core/animation/Animation.h
@@ -43,13 +43,14 @@ namespace WebCore {
class Dictionary;
class Element;
class ExceptionState;
+class SampledEffect;
class Animation FINAL : public TimedItem {
public:
enum Priority { DefaultPriority, TransitionPriority };
- static PassRefPtr<Animation> create(PassRefPtr<Element>, PassRefPtrWillBeRawPtr<AnimationEffect>, const Timing&, Priority = DefaultPriority, PassOwnPtr<EventDelegate> = nullptr);
+ static PassRefPtr<Animation> create(Element*, PassRefPtrWillBeRawPtr<AnimationEffect>, const Timing&, Priority = DefaultPriority, PassOwnPtr<EventDelegate> = nullptr);
// Web Animations API Bindings constructors.
static PassRefPtr<Animation> create(Element*, PassRefPtrWillBeRawPtr<AnimationEffect>, const Dictionary& timingInputDictionary);
static PassRefPtr<Animation> create(Element*, PassRefPtrWillBeRawPtr<AnimationEffect>, double duration);
@@ -58,19 +59,18 @@ public:
static PassRefPtr<Animation> create(Element*, const Vector<Dictionary>& keyframeDictionaryVector, double duration, ExceptionState&);
static PassRefPtr<Animation> create(Element*, const Vector<Dictionary>& keyframeDictionaryVector, ExceptionState&);
- virtual bool isAnimation() const OVERRIDE { return true; }
+ virtual ~Animation();
- const WillBeHeapVector<RefPtrWillBeMember<Interpolation> >& activeInterpolations() const
- {
- ASSERT(m_activeInterpolations);
- return *m_activeInterpolations;
- }
+ virtual bool isAnimation() const OVERRIDE { return true; }
bool affects(CSSPropertyID) const;
const AnimationEffect* effect() const { return m_effect.get(); }
AnimationEffect* effect() { return m_effect.get(); }
Priority priority() const { return m_priority; }
- Element* target() { return m_target.get(); }
+ Element* target() { return m_target; }
+
+ void notifySampledEffectRemovedFromAnimationStack();
+ void notifyElementDestroyed();
bool isCandidateForAnimationOnCompositor() const;
// Must only be called once.
@@ -81,7 +81,7 @@ public:
void pauseAnimationForTestingOnCompositor(double pauseTime);
protected:
- void applyEffects(bool previouslyInEffect);
+ void applyEffects();
void clearEffects();
virtual void updateChildrenAndEffects() const OVERRIDE;
virtual void didAttach() OVERRIDE;
@@ -90,13 +90,12 @@ protected:
virtual double calculateTimeToEffectChange(bool forwards, double inheritedTime, double timeToNextIteration) const OVERRIDE;
private:
- Animation(PassRefPtr<Element>, PassRefPtrWillBeRawPtr<AnimationEffect>, const Timing&, Priority, PassOwnPtr<EventDelegate>);
+ Animation(Element*, PassRefPtrWillBeRawPtr<AnimationEffect>, const Timing&, Priority, PassOwnPtr<EventDelegate>);
- RefPtr<Element> m_target;
+ Element* m_target;
RefPtrWillBePersistent<AnimationEffect> m_effect;
- bool m_activeInAnimationStack;
- OwnPtrWillBePersistent<WillBeHeapVector<RefPtrWillBeMember<Interpolation> > > m_activeInterpolations;
+ SampledEffect* m_sampledEffect;
Priority m_priority;