Chromium Code Reviews| 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(); |
| } |