Chromium Code Reviews| 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(); |