| Index: third_party/WebKit/Source/core/animation/AnimationTimeline.cpp
|
| diff --git a/third_party/WebKit/Source/core/animation/AnimationTimeline.cpp b/third_party/WebKit/Source/core/animation/AnimationTimeline.cpp
|
| index 6d4e56af05ab9e731b054555fef2e4f8181d2640..eace544522d53851cd4de48436927cb20ba83801 100644
|
| --- a/third_party/WebKit/Source/core/animation/AnimationTimeline.cpp
|
| +++ b/third_party/WebKit/Source/core/animation/AnimationTimeline.cpp
|
| @@ -89,11 +89,6 @@
|
| {
|
| }
|
|
|
| -bool AnimationTimeline::isActive()
|
| -{
|
| - return m_document && m_document->page();
|
| -}
|
| -
|
| void AnimationTimeline::animationAttached(Animation& animation)
|
| {
|
| ASSERT(animation.timeline() == this);
|
| @@ -150,7 +145,7 @@
|
| }
|
|
|
| ASSERT(m_outdatedAnimationCount == 0);
|
| - ASSERT(m_lastCurrentTimeInternal == currentTimeInternal() || (std::isnan(currentTimeInternal()) && std::isnan(m_lastCurrentTimeInternal)));
|
| + ASSERT(m_lastCurrentTimeInternal == currentTimeInternal());
|
|
|
| #if ENABLE(ASSERT)
|
| for (const auto& animation : m_animationsNeedingUpdate)
|
| @@ -214,7 +209,7 @@
|
|
|
| double AnimationTimeline::currentTimeInternal(bool& isNull)
|
| {
|
| - if (!isActive()) {
|
| + if (!m_document) {
|
| isNull = true;
|
| return std::numeric_limits<double>::quiet_NaN();
|
| }
|
| @@ -243,7 +238,7 @@
|
|
|
| void AnimationTimeline::setCurrentTimeInternal(double currentTime)
|
| {
|
| - if (!isActive())
|
| + if (!document())
|
| return;
|
| m_zeroTime = m_playbackRate == 0
|
| ? currentTime
|
| @@ -278,9 +273,6 @@
|
| if (currentTimeInternal() == m_lastCurrentTimeInternal)
|
| return false;
|
|
|
| - if (std::isnan(currentTimeInternal()) && std::isnan(m_lastCurrentTimeInternal))
|
| - return false;
|
| -
|
| // We allow m_lastCurrentTimeInternal to advance here when there
|
| // are no animations to allow animations spawned during style
|
| // recalc to not invalidate this flag.
|
| @@ -301,13 +293,13 @@
|
| ASSERT(animation->outdated());
|
| m_outdatedAnimationCount++;
|
| m_animationsNeedingUpdate.add(animation);
|
| - if (isActive() && !m_document->page()->animator().isServicingAnimations())
|
| + if (m_document && m_document->page() && !m_document->page()->animator().isServicingAnimations())
|
| m_timing->serviceOnNextFrame();
|
| }
|
|
|
| void AnimationTimeline::setPlaybackRate(double playbackRate)
|
| {
|
| - if (!isActive())
|
| + if (!document())
|
| return;
|
| double currentTime = currentTimeInternal();
|
| m_playbackRate = playbackRate;
|
|
|