| Index: Source/core/animation/AnimationPlayer.h
|
| diff --git a/Source/core/animation/AnimationPlayer.h b/Source/core/animation/AnimationPlayer.h
|
| index fe3a3dc6532a66115d797e0015e0641750a99fa5..790e7d203995eb757bffaae3c25e0b438692416c 100644
|
| --- a/Source/core/animation/AnimationPlayer.h
|
| +++ b/Source/core/animation/AnimationPlayer.h
|
| @@ -40,8 +40,8 @@ namespace WebCore {
|
| class DocumentTimeline;
|
| class ExceptionState;
|
|
|
| -class AnimationPlayer FINAL : public RefCounted<AnimationPlayer>, public EventTargetWithInlineData {
|
| - REFCOUNTED_EVENT_TARGET(AnimationPlayer);
|
| +class AnimationPlayer FINAL : public RefCountedWillBeRefCountedGarbageCollected<AnimationPlayer>, public EventTargetWithInlineData {
|
| + DEFINE_EVENT_TARGET_REFCOUNTING(RefCountedWillBeRefCountedGarbageCollected<AnimationPlayer>);
|
| public:
|
| enum UpdateReason {
|
| UpdateOnDemand,
|
| @@ -49,7 +49,7 @@ public:
|
| };
|
|
|
| ~AnimationPlayer();
|
| - static PassRefPtr<AnimationPlayer> create(DocumentTimeline&, TimedItem*);
|
| + static PassRefPtrWillBeRawPtr<AnimationPlayer> create(DocumentTimeline&, TimedItem*);
|
|
|
| // Returns whether the player is finished.
|
| bool update(UpdateReason);
|
| @@ -82,7 +82,9 @@ public:
|
| const DocumentTimeline* timeline() const { return m_timeline; }
|
| DocumentTimeline* timeline() { return m_timeline; }
|
|
|
| - void timelineDestroyed() { m_timeline = 0; }
|
| +#if !ENABLE(OILPAN)
|
| + void timelineDestroyed() { m_timeline = nullptr; }
|
| +#endif
|
|
|
| bool hasStartTime() const { return !isNull(m_startTime); }
|
| double startTime() const { return m_startTime; }
|
| @@ -117,7 +119,8 @@ public:
|
| SortInfo(unsigned sequenceNumber, double startTime)
|
| : m_sequenceNumber(sequenceNumber)
|
| , m_startTime(startTime)
|
| - { }
|
| + {
|
| + }
|
| unsigned m_sequenceNumber;
|
| double m_startTime;
|
| };
|
| @@ -129,12 +132,16 @@ public:
|
| return player1->sortInfo() < player2->sortInfo();
|
| }
|
|
|
| +#if !ENABLE(OILPAN)
|
| // Checks if the AnimationStack is the last reference holder to the Player.
|
| // This won't be needed when AnimationPlayer is moved to Oilpan.
|
| bool canFree() const;
|
| +#endif
|
|
|
| virtual bool addEventListener(const AtomicString& eventType, PassRefPtr<EventListener>, bool useCapture = false) OVERRIDE;
|
|
|
| + void trace(Visitor*);
|
| +
|
| private:
|
| AnimationPlayer(DocumentTimeline&, TimedItem*);
|
| double sourceEnd() const;
|
| @@ -151,10 +158,10 @@ private:
|
|
|
| SortInfo m_sortInfo;
|
|
|
| - RefPtr<TimedItem> m_content;
|
| + RefPtrWillBeMember<TimedItem> m_content;
|
| // FIXME: We should keep the timeline alive and have this as non-null
|
| // but this is tricky to do without Oilpan
|
| - DocumentTimeline* m_timeline;
|
| + RawPtrWillBeMember<DocumentTimeline> m_timeline;
|
| // Reflects all pausing, including via pauseForTesting().
|
| bool m_paused;
|
| bool m_held;
|
|
|