| Index: Source/core/dom/ScriptedAnimationController.cpp
|
| diff --git a/Source/core/dom/ScriptedAnimationController.cpp b/Source/core/dom/ScriptedAnimationController.cpp
|
| index e7aaba9a76410dfb1ac7934f848e91b823fa7e40..ea8ee6a11472249a99a477abbca1dc39c63afbf7 100644
|
| --- a/Source/core/dom/ScriptedAnimationController.cpp
|
| +++ b/Source/core/dom/ScriptedAnimationController.cpp
|
| @@ -151,12 +151,17 @@ void ScriptedAnimationController::callMediaQueryListListeners()
|
| }
|
| }
|
|
|
| -void ScriptedAnimationController::serviceScriptedAnimations(double monotonicTimeNow)
|
| +bool ScriptedAnimationController::hasScheduledItems() const
|
| {
|
| - if (m_callbackCollection.isEmpty() && !m_eventQueue.size() && !m_mediaQueryListListeners.size())
|
| - return;
|
| -
|
| if (m_suspendCount)
|
| + return false;
|
| +
|
| + return !m_callbackCollection.isEmpty() || !m_eventQueue.isEmpty() || !m_mediaQueryListListeners.isEmpty();
|
| +}
|
| +
|
| +void ScriptedAnimationController::serviceScriptedAnimations(double monotonicTimeNow)
|
| +{
|
| + if (!hasScheduledItems())
|
| return;
|
|
|
| RefPtrWillBeRawPtr<ScriptedAnimationController> protect(this);
|
| @@ -192,13 +197,10 @@ void ScriptedAnimationController::enqueueMediaQueryChangeListeners(WillBeHeapVec
|
|
|
| void ScriptedAnimationController::scheduleAnimationIfNeeded()
|
| {
|
| - if (!m_document)
|
| - return;
|
| -
|
| - if (m_suspendCount)
|
| + if (!hasScheduledItems())
|
| return;
|
|
|
| - if (m_callbackCollection.isEmpty() && !m_eventQueue.size() && !m_mediaQueryListListeners.size())
|
| + if (!m_document)
|
| return;
|
|
|
| if (FrameView* frameView = m_document->view())
|
|
|