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 5cfb85f3f5f5fddc20055ed245de877eeb10987f..f189dc813d7d5e61398b0fdb35359217102be856 100644 |
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp |
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp |
@@ -418,7 +418,7 @@ void FrameView::setFrameRect(const IntRect& newRect) { |
frameRectsChanged(); |
- updateScrollableAreaSet(); |
+ updateParentScrollableAreaSet(); |
if (LayoutViewItem layoutView = this->layoutViewItem()) { |
// TODO(majidvp): It seems that this only needs to be called when size |
@@ -539,7 +539,7 @@ void FrameView::setContentsSize(const IntSize& size) { |
if (!page) |
return; |
- updateScrollableAreaSet(); |
+ updateParentScrollableAreaSet(); |
page->chromeClient().contentsSizeChanged(m_frame.get(), size); |
frame().loader().restoreScrollPositionAndViewState(); |
@@ -2384,7 +2384,7 @@ FrameView::ScrollingReasons FrameView::getScrollingReasons() { |
return Scrollable; |
} |
-void FrameView::updateScrollableAreaSet() { |
+void FrameView::updateParentScrollableAreaSet() { |
// That ensures that only inner frames are cached. |
FrameView* parentFrameView = this->parentFrameView(); |
if (!parentFrameView) |
@@ -3340,7 +3340,7 @@ void FrameView::setParent(Widget* parentView) { |
Widget::setParent(parentView); |
- updateScrollableAreaSet(); |
+ updateParentScrollableAreaSet(); |
setNeedsUpdateViewportIntersection(); |
} |
@@ -4226,8 +4226,11 @@ void FrameView::setParentVisible(bool visible) { |
void FrameView::show() { |
if (!isSelfVisible()) { |
setSelfVisible(true); |
+ if (ScrollingCoordinator* scrollingCoordinator = |
+ this->scrollingCoordinator()) |
+ scrollingCoordinator->frameViewVisibilityDidChange(); |
setNeedsCompositingUpdate(layoutViewItem(), CompositingUpdateRebuildTree); |
- updateScrollableAreaSet(); |
+ updateParentScrollableAreaSet(); |
if (isParentVisible()) { |
for (const auto& child : m_children) |
child->setParentVisible(true); |
@@ -4244,8 +4247,11 @@ void FrameView::hide() { |
child->setParentVisible(false); |
} |
setSelfVisible(false); |
+ if (ScrollingCoordinator* scrollingCoordinator = |
+ this->scrollingCoordinator()) |
+ scrollingCoordinator->frameViewVisibilityDidChange(); |
setNeedsCompositingUpdate(layoutViewItem(), CompositingUpdateRebuildTree); |
- updateScrollableAreaSet(); |
+ updateParentScrollableAreaSet(); |
} |
Widget::hide(); |