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

Unified Diff: third_party/WebKit/Source/core/animation/Animation.cpp

Issue 1750453002: Reduce ActiveDOMObjects from core/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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: 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 eedc832c9708d25adca55b1dc1baee6993a58157..0a42bfc4d90a0de3320d5d868d02118b664d6e94 100644
--- a/third_party/WebKit/Source/core/animation/Animation.cpp
+++ b/third_party/WebKit/Source/core/animation/Animation.cpp
@@ -66,18 +66,15 @@ Animation* Animation::create(AnimationEffect* effect, AnimationTimeline* timelin
}
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)
- : ActiveDOMObject(executionContext)
+ : ContextLifecycleObserver(executionContext)
, m_playState(Idle)
, m_playbackRate(1)
, m_startTime(nullValue())
@@ -640,7 +637,7 @@ const AtomicString& Animation::interfaceName() const
ExecutionContext* Animation::executionContext() const
{
- return ActiveDOMObject::executionContext();
+ return ContextLifecycleObserver::executionContext();
}
bool Animation::hasPendingActivity() const
@@ -648,7 +645,7 @@ bool Animation::hasPendingActivity() const
return m_pendingFinishedEvent || (!m_finished && hasEventListeners(EventTypeNames::finish));
}
-void Animation::stop()
+void Animation::contextDestroyed()
{
PlayStateUpdateScope updateScope(*this, TimingUpdateOnDemand);
@@ -1085,7 +1082,7 @@ DEFINE_TRACE(Animation)
visitor->trace(m_finishedPromise);
visitor->trace(m_readyPromise);
RefCountedGarbageCollectedEventTargetWithInlineData<Animation>::trace(visitor);
- ActiveDOMObject::trace(visitor);
+ ContextLifecycleObserver::trace(visitor);
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698