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

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

Issue 2212183004: Log to UMA when x-origin frames (1) are created and (2) become visible (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 3fa8e63c185b071c4f343796b89e2d2f3ac3c1be..dbf348daedac03f65fc542a7c6ea429f8a769f11 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -4182,6 +4182,7 @@ void FrameView::updateViewportIntersectionsForSubtree(DocumentLifecycle::Lifecyc
if (shouldNotify && !m_renderThrottlingObserverNotificationFactory->isPending())
m_frame->frameScheduler()->unthrottledTaskRunner()->postTask(BLINK_FROM_HERE, m_renderThrottlingObserverNotificationFactory->cancelAndCreate());
+ // TODO(dgrogan): Document why we need this check. For cycles in the frame tree?
Sami 2016/08/08 11:09:47 This is so that we don't traverse the frame tree u
dgrogan 2016/08/08 17:45:48 It what cases will it be triggered though?
ojan 2016/08/08 22:01:53 https://cs.chromium.org/chromium/src/third_party/W
if (!m_needsUpdateViewportIntersectionInSubtree)
return;
m_needsUpdateViewportIntersectionInSubtree = false;
@@ -4197,6 +4198,7 @@ void FrameView::updateViewportIntersectionsForSubtree(DocumentLifecycle::Lifecyc
void FrameView::updateThrottlingStatus()
{
// Only offscreen frames can be throttled.
+ // TODO(dgrogan): Change this to DCHECK(m_viewportIntersectionValid)?
Sami 2016/08/08 11:09:47 Right, we should be able to require that.
ojan 2016/08/08 22:01:54 Same as above, either add the DCHECK or leave the
dgrogan 2016/08/09 00:30:15 Sorry, it wasn't clear at all, but these comments
m_hiddenForThrottling = m_viewportIntersectionValid && m_viewportIntersection.isEmpty();
// We only throttle the rendering pipeline in cross-origin frames. This is
@@ -4235,6 +4237,8 @@ void FrameView::notifyRenderThrottlingObservers()
updateThrottlingStatus();
+ frame().onVisibilityMaybeChanged(!m_hiddenForThrottling);
+
bool becameThrottled = !wasThrottled && canThrottleRendering();
bool becameUnthrottled = wasThrottled && !canThrottleRendering();
ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator();

Powered by Google App Engine
This is Rietveld 408576698