| Index: third_party/WebKit/Source/core/animation/Animation.cpp
|
| diff --git a/third_party/WebKit/Source/core/animation/Animation.cpp b/third_party/WebKit/Source/core/animation/Animation.cpp
|
| index 0a42bfc4d90a0de3320d5d868d02118b664d6e94..eedc832c9708d25adca55b1dc1baee6993a58157 100644
|
| --- a/third_party/WebKit/Source/core/animation/Animation.cpp
|
| +++ b/third_party/WebKit/Source/core/animation/Animation.cpp
|
| @@ -66,15 +66,18 @@
|
| }
|
|
|
| Animation* animation = new Animation(timeline->document()->contextDocument().get(), *timeline, effect);
|
| + animation->suspendIfNeeded();
|
| +
|
| if (timeline) {
|
| timeline->animationAttached(*animation);
|
| animation->attachCompositorTimeline();
|
| }
|
| +
|
| return animation;
|
| }
|
|
|
| Animation::Animation(ExecutionContext* executionContext, AnimationTimeline& timeline, AnimationEffect* content)
|
| - : ContextLifecycleObserver(executionContext)
|
| + : ActiveDOMObject(executionContext)
|
| , m_playState(Idle)
|
| , m_playbackRate(1)
|
| , m_startTime(nullValue())
|
| @@ -637,7 +640,7 @@
|
|
|
| ExecutionContext* Animation::executionContext() const
|
| {
|
| - return ContextLifecycleObserver::executionContext();
|
| + return ActiveDOMObject::executionContext();
|
| }
|
|
|
| bool Animation::hasPendingActivity() const
|
| @@ -645,7 +648,7 @@
|
| return m_pendingFinishedEvent || (!m_finished && hasEventListeners(EventTypeNames::finish));
|
| }
|
|
|
| -void Animation::contextDestroyed()
|
| +void Animation::stop()
|
| {
|
| PlayStateUpdateScope updateScope(*this, TimingUpdateOnDemand);
|
|
|
| @@ -1082,7 +1085,7 @@
|
| visitor->trace(m_finishedPromise);
|
| visitor->trace(m_readyPromise);
|
| RefCountedGarbageCollectedEventTargetWithInlineData<Animation>::trace(visitor);
|
| - ContextLifecycleObserver::trace(visitor);
|
| + ActiveDOMObject::trace(visitor);
|
| }
|
|
|
| } // namespace blink
|
|
|