Chromium Code Reviews| Index: Source/core/dom/ScriptedAnimationController.cpp |
| diff --git a/Source/core/dom/ScriptedAnimationController.cpp b/Source/core/dom/ScriptedAnimationController.cpp |
| index 3f5f9b9e41023d58b8ec291289ac85009afd492b..41a2dc7d31427d7836964b5632c67b9fd7e1db49 100644 |
| --- a/Source/core/dom/ScriptedAnimationController.cpp |
| +++ b/Source/core/dom/ScriptedAnimationController.cpp |
| @@ -26,6 +26,7 @@ |
| #include "config.h" |
| #include "core/dom/ScriptedAnimationController.h" |
| +#include "core/css/MediaQueryMatcher.h" |
| #include "core/dom/Document.h" |
| #include "core/dom/RequestAnimationFrameCallback.h" |
| #include "core/events/Event.h" |
| @@ -171,7 +172,7 @@ void ScriptedAnimationController::executeCallbacks(double monotonicTimeNow) |
| void ScriptedAnimationController::serviceScriptedAnimations(double monotonicTimeNow) |
| { |
| - if (!m_callbacks.size() && !m_eventQueue.size()) |
| + if (!m_callbacks.size() && !m_eventQueue.size() && !m_document->mediaQueryMatcher().hasDelayedListeners()) |
| return; |
| if (m_suspendCount) |
| @@ -179,6 +180,7 @@ void ScriptedAnimationController::serviceScriptedAnimations(double monotonicTime |
| RefPtrWillBeRawPtr<ScriptedAnimationController> protect(this); |
| + m_document->mediaQueryMatcher().notifyDelayedListeners(); |
| dispatchEvents(); |
| executeCallbacks(monotonicTimeNow); |
| @@ -207,7 +209,7 @@ void ScriptedAnimationController::scheduleAnimationIfNeeded() |
| if (m_suspendCount) |
| return; |
| - if (!m_callbacks.size() && !m_eventQueue.size()) |
| + if (!m_callbacks.size() && !m_eventQueue.size() && !m_document->mediaQueryMatcher().hasDelayedListeners()) |
|
esprehn
2014/07/01 00:01:06
ScriptedAnimationController should not be reaching
cbiesinger
2014/07/01 00:12:09
So, what should I do instead?
|
| return; |
| if (FrameView* frameView = m_document->view()) |