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

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

Issue 23874019: Web Animations CSS: Start running animations on the compositor (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase and rename hasActiveAnimationOnCompositor to hasActiveAnimationsOnCompositor Created 7 years, 1 month 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/animation/KeyframeAnimationEffect.h » ('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 7aae89ab27d34846e0d06ef5a7130229714923c1..687ccf1e76b977ce265acc16a90496f3697c777e 100644
--- a/Source/core/animation/DocumentTimeline.cpp
+++ b/Source/core/animation/DocumentTimeline.cpp
@@ -157,6 +157,8 @@ void DocumentTimeline::dispatchEvents()
size_t DocumentTimeline::numberOfActiveAnimationsForTesting() const
{
+ if (isNull(m_zeroTime))
+ return 0;
// Includes all players whose directly associated timed items
// are current or in effect.
if (isNull(m_zeroTime))
@@ -164,7 +166,8 @@ size_t DocumentTimeline::numberOfActiveAnimationsForTesting() const
size_t count = 0;
for (size_t i = 0; i < m_players.size(); ++i) {
const TimedItem* timedItem = m_players[i]->source();
- count += (timedItem && (timedItem->isCurrent() || timedItem->isInEffect()));
+ if (m_players[i]->hasStartTime())
+ count += (timedItem && (timedItem->isCurrent() || timedItem->isInEffect()));
}
return count;
}
« no previous file with comments | « Source/core/animation/DocumentTimeline.h ('k') | Source/core/animation/KeyframeAnimationEffect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698