| Index: Source/core/animation/DocumentTimeline.cpp
|
| diff --git a/Source/core/animation/DocumentTimeline.cpp b/Source/core/animation/DocumentTimeline.cpp
|
| index c46729cd74cf25de129df2c6efbaa392eb2079ec..6236e5ead4ded98fd802bb0eceaa520e15e56690 100644
|
| --- a/Source/core/animation/DocumentTimeline.cpp
|
| +++ b/Source/core/animation/DocumentTimeline.cpp
|
| @@ -31,7 +31,6 @@
|
| #include "config.h"
|
| #include "core/animation/DocumentTimeline.h"
|
|
|
| -#include "core/animation/AnimationClock.h"
|
| #include "core/animation/Player.h"
|
| #include "core/dom/Document.h"
|
| #include "core/frame/FrameView.h"
|
| @@ -44,7 +43,8 @@ PassRefPtr<DocumentTimeline> DocumentTimeline::create(Document* document)
|
| }
|
|
|
| DocumentTimeline::DocumentTimeline(Document* document)
|
| - : m_document(document)
|
| + : m_currentTime(nullValue())
|
| + , m_document(document)
|
| , m_zeroTimeAsPerfTime(nullValue())
|
| {
|
| ASSERT(document);
|
| @@ -65,8 +65,14 @@ void DocumentTimeline::serviceAnimations(double monotonicAnimationStartTime)
|
| {
|
| {
|
| TRACE_EVENT0("webkit", "DocumentTimeline::serviceAnimations");
|
| -
|
| - m_document->animationClock().updateTime(monotonicAnimationStartTime);
|
| + // FIXME: The below ASSERT fires on Windows when running chrome.exe.
|
| + // Does not fire with --single-process, or on Linux, or in
|
| + // content_shell.exe. The assert condition has been moved up into the
|
| + // outer 'if' to work around this. http://crbug.com/280439.
|
| + if (!isNull(m_zeroTimeAsPerfTime) && (m_currentTime <= monotonicAnimationStartTime - m_zeroTimeAsPerfTime)) {
|
| + ASSERT(m_currentTime <= monotonicAnimationStartTime - m_zeroTimeAsPerfTime);
|
| + m_currentTime = monotonicAnimationStartTime - m_zeroTimeAsPerfTime;
|
| + }
|
|
|
| double timeToNextEffect = -1;
|
| for (int i = m_players.size() - 1; i >= 0; --i) {
|
| @@ -86,11 +92,7 @@ void DocumentTimeline::setZeroTimeAsPerfTime(double zeroTime)
|
| ASSERT(isNull(m_zeroTimeAsPerfTime));
|
| m_zeroTimeAsPerfTime = zeroTime;
|
| ASSERT(!isNull(m_zeroTimeAsPerfTime));
|
| -}
|
| -
|
| -double DocumentTimeline::currentTime()
|
| -{
|
| - return m_document->animationClock().currentTime() - m_zeroTimeAsPerfTime;
|
| + m_currentTime = 0;
|
| }
|
|
|
| void DocumentTimeline::pauseAnimationsForTesting(double pauseTime)
|
| @@ -113,7 +115,7 @@ size_t DocumentTimeline::numberOfActiveAnimationsForTesting() const
|
| {
|
| // Includes all players whose directly associated timed items
|
| // are current or in effect.
|
| - return isNull(m_zeroTimeAsPerfTime) ? 0 : m_players.size();
|
| + return isNull(m_currentTime) ? 0 : m_players.size();
|
| }
|
|
|
| } // namespace
|
|
|