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

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

Issue 19266007: Web Animations: Introduce ActiveAnimations and AnimationStack (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased. Created 7 years, 5 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/Player.h ('k') | Source/core/animation/TimedItem.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/Player.cpp
diff --git a/Source/core/animation/Player.cpp b/Source/core/animation/Player.cpp
index 2cdefe0b60d73b34f9fdc2f6a940b2d082f61f98..abb23f92de91c87fcefd054a7b02b241a2688732 100644
--- a/Source/core/animation/Player.cpp
+++ b/Source/core/animation/Player.cpp
@@ -52,9 +52,17 @@ Player::Player(DocumentTimeline* timeline, TimedItem* content)
, m_timeline(timeline)
{
ASSERT(m_startTime >= 0);
+ if (m_content)
+ m_content->attach(this);
update();
}
+Player::~Player()
+{
+ if (m_content)
+ m_content->detach();
+}
+
double Player::currentTimeBeforeDrift() const
{
return (effectiveTime(m_timeline->currentTime()) - m_startTime) * m_playbackRate;
« no previous file with comments | « Source/core/animation/Player.h ('k') | Source/core/animation/TimedItem.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698