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 419d75ec172dbeecae388a6c79699fff76fb6e8e..00a83842a62e217afe1289c0ffd87540892a70d1 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 |
| @@ -540,7 +540,7 @@ void FrameView::setContentsSize(const IntSize& size) { |
| if (!page) |
| return; |
| - updateScrollableAreaSet(); |
| + updateParentScrollableAreaSet(); |
| page->chromeClient().contentsSizeChanged(m_frame.get(), size); |
| frame().loader().restoreScrollPositionAndViewState(); |
| @@ -2386,7 +2386,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) |
| @@ -3337,7 +3337,7 @@ void FrameView::setParent(Widget* parentView) { |
| Widget::setParent(parentView); |
| - updateScrollableAreaSet(); |
| + updateParentScrollableAreaSet(); |
| setNeedsUpdateViewportIntersection(); |
| } |
| @@ -4220,11 +4220,17 @@ void FrameView::setParentVisible(bool visible) { |
| child->setParentVisible(visible); |
| } |
| +void FrameView::frameViewVisibilityChanged() { |
|
majidvp
2016/11/02 14:15:17
This function seems superfulous. It is reducing on
MuVen
2016/11/02 17:07:47
Done.
|
| + if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator()) |
| + scrollingCoordinator->frameViewVisibilityDidChange(); |
| +} |
| + |
| void FrameView::show() { |
| if (!isSelfVisible()) { |
| setSelfVisible(true); |
| + frameViewVisibilityChanged(); |
| setNeedsCompositingUpdate(layoutViewItem(), CompositingUpdateRebuildTree); |
| - updateScrollableAreaSet(); |
| + updateParentScrollableAreaSet(); |
| if (isParentVisible()) { |
| for (const auto& child : m_children) |
| child->setParentVisible(true); |
| @@ -4241,8 +4247,9 @@ void FrameView::hide() { |
| child->setParentVisible(false); |
| } |
| setSelfVisible(false); |
| + frameViewVisibilityChanged(); |
| setNeedsCompositingUpdate(layoutViewItem(), CompositingUpdateRebuildTree); |
| - updateScrollableAreaSet(); |
| + updateParentScrollableAreaSet(); |
| } |
| Widget::hide(); |