Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(80)

Unified Diff: third_party/WebKit/Source/core/frame/FrameView.cpp

Issue 2023033003: scheduler: Throttle timers in out-of-view frames (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add cross origin check, tests Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/frame/FrameView.cpp
diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp
index 92177225f6e30dbaa865f5197f386664f36000e4..3ad4a623b46c2f1ca2802e9d1976f8b3748944ac 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -4139,6 +4139,7 @@ void FrameView::updateThrottlingStatus()
{
// Only offscreen frames can be throttled.
m_hiddenForThrottling = m_viewportIntersectionValid && m_viewportIntersection.isEmpty();
+ m_frame->frameScheduler()->setFrameVisible(!m_hiddenForThrottling);
// We only throttle the rendering pipeline in cross-origin frames. This is
// to avoid a situation where an ancestor frame directly depends on the
@@ -4159,6 +4160,7 @@ void FrameView::updateThrottlingStatus()
if (parentFrame->isLocalFrame() && toLocalFrame(parentFrame)->view() && toLocalFrame(parentFrame)->view()->canThrottleRendering())
m_subtreeThrottled = true;
}
+ m_frame->frameScheduler()->setCrossOrigin(m_crossOriginForThrottling);
}
void FrameView::notifyRenderThrottlingObserversForTesting()

Powered by Google App Engine
This is Rietveld 408576698