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 e8b7ec1112d4094ad011ab24af71a31b7b1fef2f..8dda919717d2da5089824fb8bb191852119af575 100644 |
| --- a/third_party/WebKit/Source/core/frame/FrameView.cpp |
| +++ b/third_party/WebKit/Source/core/frame/FrameView.cpp |
| @@ -4395,11 +4395,26 @@ void FrameView::updateViewportIntersectionIfNeeded() { |
| m_viewportIntersectionValid = true; |
| FrameView* parent = parentFrameView(); |
| if (!parent) { |
| + if (HTMLFrameOwnerElement* element = frame().deprecatedLocalOwner()) { |
| + if (!element->layoutObject()) |
| + frame().document()->wouldLoadBecause(WouldLoadDisplayNone); |
| + } |
| + frame().document()->wouldLoadBecause(WouldLoadOutOfProcess); |
|
dcheng
2016/10/08 00:46:22
Should this be in an else?
dgrogan
2016/10/13 01:06:22
It was ok without one because of the check in Docu
|
| m_viewportIntersection = frameRect(); |
| return; |
| } |
| ASSERT(!parent->m_needsUpdateViewportIntersection); |
| + bool parentLoaded = parent->frame().document()->wouldLoadReason() != Created; |
|
dcheng
2016/10/08 00:46:22
Maybe add a comment here: it'll help me understand
dgrogan
2016/10/13 01:06:22
Comment added. I think we're saying the same thing
|
| + if (parentLoaded) { |
| + if (frameRect().isEmpty()) |
| + frame().document()->wouldLoadBecause(WouldLoadZeroByZero); |
| + else if (frameRect().maxY() < 0) |
| + frame().document()->wouldLoadBecause(WouldLoadAbove); |
| + else if (frameRect().maxX() < 0) |
| + frame().document()->wouldLoadBecause(WouldLoadLeft); |
| + } |
| + |
| // If our parent is hidden, then we are too. |
| if (parent->m_viewportIntersection.isEmpty()) { |
| m_viewportIntersection = parent->m_viewportIntersection; |
| @@ -4419,6 +4434,9 @@ void FrameView::updateViewportIntersectionIfNeeded() { |
| // content while scrolling. |
| IntRect viewport = parent->m_viewportIntersection; |
| m_viewportIntersection.intersect(viewport); |
| + |
| + if (parentLoaded && !m_viewportIntersection.isEmpty()) |
| + frame().document()->wouldLoadBecause(WouldLoadVisible); |
| } |
| void FrameView::updateViewportIntersectionsForSubtree( |
| @@ -4504,8 +4522,6 @@ void FrameView::notifyRenderThrottlingObservers() { |
| updateThrottlingStatus(); |
| - frame().document()->onVisibilityMaybeChanged(!m_hiddenForThrottling); |
| - |
| bool becameThrottled = !wasThrottled && canThrottleRendering(); |
| bool becameUnthrottled = wasThrottled && !canThrottleRendering(); |
| ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator(); |