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

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

Issue 210363007: Declare onFinish event handler for AnimationPlayer (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Use 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/AnimationPlayer.h ('k') | Source/core/animation/AnimationPlayer.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/AnimationPlayer.cpp
diff --git a/Source/core/animation/AnimationPlayer.cpp b/Source/core/animation/AnimationPlayer.cpp
index 48351215c4e60238decff833135fed84c1410bb3..0dc14abb9ef16b356c136a88218487ce2ba455d0 100644
--- a/Source/core/animation/AnimationPlayer.cpp
+++ b/Source/core/animation/AnimationPlayer.cpp
@@ -46,13 +46,14 @@ static unsigned nextSequenceNumber()
}
-PassRefPtr<AnimationPlayer> AnimationPlayer::create(DocumentTimeline& timeline, TimedItem* content)
+PassRefPtr<AnimationPlayer> AnimationPlayer::create(ExecutionContext* context, DocumentTimeline& timeline, TimedItem* content)
{
- return adoptRef(new AnimationPlayer(timeline, content));
+ return adoptRef(new AnimationPlayer(context, timeline, content));
}
-AnimationPlayer::AnimationPlayer(DocumentTimeline& timeline, TimedItem* content)
- : m_playbackRate(1)
+AnimationPlayer::AnimationPlayer(ExecutionContext* context, DocumentTimeline& timeline, TimedItem* content)
+ : ContextLifecycleObserver(context)
+ , m_playbackRate(1)
, m_startTime(nullValue())
, m_holdTime(nullValue())
, m_storedTimeLag(0)
@@ -238,6 +239,16 @@ void AnimationPlayer::finish(ExceptionState& exceptionState)
ASSERT(finished());
}
+const AtomicString& AnimationPlayer::interfaceName() const
+{
+ return EventTargetNames::AnimationPlayer;
+}
+
+ExecutionContext* AnimationPlayer::executionContext() const
+{
+ return ContextLifecycleObserver::executionContext();
dstockwell 2014/03/31 09:17:24 Isn't the timeline's document the execution contex
Eric Willigers 2014/04/01 05:05:48 The execution context is document.contextDocument(
+}
+
void AnimationPlayer::setPlaybackRate(double playbackRate)
{
if (!std::isfinite(playbackRate))
« no previous file with comments | « Source/core/animation/AnimationPlayer.h ('k') | Source/core/animation/AnimationPlayer.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698