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

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

Issue 2413723002: Re-Compute slow scroll region on frameview visibility change. (Closed)
Patch Set: addressed review comments Created 4 years, 1 month 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 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();
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.h ('k') | third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698