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

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

Issue 1287013003: Ensure serviceOnNextFrame isn't put off indefinitely. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 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/AnimationTimeline.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/AnimationTimeline.cpp
diff --git a/Source/core/animation/AnimationTimeline.cpp b/Source/core/animation/AnimationTimeline.cpp
index dd7057a56e7d7f72f0abb5483a5ef455c5fbf34a..1097ed035785183a14dc9c6945aea3ef87181b59 100644
--- a/Source/core/animation/AnimationTimeline.cpp
+++ b/Source/core/animation/AnimationTimeline.cpp
@@ -174,11 +174,16 @@ void AnimationTimeline::scheduleNextService()
void AnimationTimeline::AnimationTimelineTiming::wakeAfter(double duration)
{
+ double nextFireTime = m_timeline->currentTime() + duration;
alancutter (OOO until 2018) 2015/08/17 07:30:36 currentTime() is affected by m_playbackRate making
dtapuska 2015/08/17 17:50:44 Acknowledged.
+ if (m_timer.isActive() && nextFireTime >= m_currentScheduledTime)
dstockwell 2015/08/17 08:05:36 You should be able to retrieve the next fire time
dtapuska 2015/08/17 17:50:44 Done.
+ return;
+ m_currentScheduledTime = nextFireTime;
m_timer.startOneShot(duration, FROM_HERE);
}
void AnimationTimeline::AnimationTimelineTiming::cancelWake()
{
+ m_currentScheduledTime = std::numeric_limits<double>::infinity();
m_timer.stop();
}
« no previous file with comments | « Source/core/animation/AnimationTimeline.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698