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

Unified Diff: Source/core/animation/DocumentTimeline.cpp

Issue 210363007: Declare onFinish event handler for AnimationPlayer (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Stop using ContextLifecycleObserver Created 6 years, 9 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
« no previous file with comments | « Source/core/animation/DocumentTimeline.h ('k') | Source/core/core.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/DocumentTimeline.cpp
diff --git a/Source/core/animation/DocumentTimeline.cpp b/Source/core/animation/DocumentTimeline.cpp
index 77ef592d566ff005da38639a7d62257444a653db..9e862d5d959c895853826de18802d239fa4461b3 100644
--- a/Source/core/animation/DocumentTimeline.cpp
+++ b/Source/core/animation/DocumentTimeline.cpp
@@ -79,6 +79,8 @@ AnimationPlayer* DocumentTimeline::createAnimationPlayer(TimedItem* child)
AnimationPlayer* DocumentTimeline::play(TimedItem* child)
{
+ if (!m_document)
+ return 0;
AnimationPlayer* player = createAnimationPlayer(child);
player->setStartTime(effectiveTime());
return player;
@@ -190,6 +192,7 @@ size_t DocumentTimeline::numberOfActiveAnimationsForTesting() const
}
void DocumentTimeline::detachFromDocument() {
+ // FIXME: DocumentTimeline should keep Document alive.
m_document = 0;
}
« no previous file with comments | « Source/core/animation/DocumentTimeline.h ('k') | Source/core/core.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698