Index: Source/core/animation/Animation.h |
diff --git a/Source/core/animation/Animation.h b/Source/core/animation/Animation.h |
index 58a0dc4ceccf5aefe6d58b95303f2548a59b025d..aa677ce0d2af5da7406d7202f5a00ab670ba7a22 100644 |
--- a/Source/core/animation/Animation.h |
+++ b/Source/core/animation/Animation.h |
@@ -51,16 +51,15 @@ class Element; |
class ExceptionState; |
class WebCompositorAnimationPlayer; |
-class CORE_EXPORT Animation final |
- : public EventTargetWithInlineData |
- , public RefCountedWillBeNoBase<Animation> |
- , public ActiveDOMObject |
- , public WebCompositorAnimationDelegate |
- , public WebCompositorAnimationPlayerClient { |
+class CORE_EXPORT Animation final : public RefCountedGarbageCollectedEventTargetWithInlineData<Animation>, public ActiveDOMObject, public WebCompositorAnimationDelegate, public WebCompositorAnimationPlayerClient { |
DEFINE_WRAPPERTYPEINFO(); |
- REFCOUNTED_EVENT_TARGET(Animation); |
+ REFCOUNTED_GARBAGE_COLLECTED_EVENT_TARGET(Animation); |
WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(Animation); |
- WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(Animation); |
+#if ENABLE(LAZY_SWEEPING) |
+ EAGERLY_FINALIZE(); |
+#else |
+ USING_PRE_FINALIZER(Animation, disposeAnimation); |
+#endif |
public: |
enum AnimationPlayState { |
Idle, |
@@ -71,7 +70,8 @@ public: |
}; |
~Animation(); |
- static PassRefPtrWillBeRawPtr<Animation> create(AnimationEffect*, AnimationTimeline*); |
+ void disposeAnimation(); |
+ static Animation* create(AnimationEffect*, AnimationTimeline*); |
// Returns whether the animation is finished. |
bool update(TimingUpdateReason); |
@@ -138,8 +138,8 @@ public: |
void setStartClip(double t) { setStartClipInternal(t / 1000); } |
void setEndClip(double t) { setEndClipInternal(t / 1000); } |
- const AnimationEffect* effect() const { return m_content.get(); } |
- AnimationEffect* effect() { return m_content.get(); } |
+ const AnimationEffect* effect() const { return m_content; } |
+ AnimationEffect* effect() { return m_content; } |
void setEffect(AnimationEffect*); |
// Pausing via this method is not reflected in the value returned by |
@@ -230,12 +230,12 @@ private: |
unsigned m_sequenceNumber; |
- typedef ScriptPromiseProperty<RawPtrWillBeMember<Animation>, RawPtrWillBeMember<Animation>, Member<DOMException>> AnimationPromise; |
- PersistentWillBeMember<AnimationPromise> m_finishedPromise; |
- PersistentWillBeMember<AnimationPromise> m_readyPromise; |
+ typedef ScriptPromiseProperty<Member<Animation>, Member<Animation>, Member<DOMException>> AnimationPromise; |
+ Member<AnimationPromise> m_finishedPromise; |
+ Member<AnimationPromise> m_readyPromise; |
- RefPtrWillBeMember<AnimationEffect> m_content; |
- RawPtrWillBeMember<AnimationTimeline> m_timeline; |
+ Member<AnimationEffect> m_content; |
+ Member<AnimationTimeline> m_timeline; |
// Reflects all pausing, including via pauseForTesting(). |
bool m_paused; |
bool m_held; |
@@ -289,7 +289,7 @@ private: |
PlayStateUpdateScope(Animation&, TimingUpdateReason, CompositorPendingChange = SetCompositorPending); |
~PlayStateUpdateScope(); |
private: |
- RawPtrWillBeMember<Animation> m_animation; |
+ Member<Animation> m_animation; |
AnimationPlayState m_initialPlayState; |
CompositorPendingChange m_compositorPendingChange; |
}; |