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

Unified Diff: third_party/WebKit/Source/core/page/scrolling/TopDocumentRootScrollerController.cpp

Issue 2501723003: Disable scrollbars on the root scroller when using visual viewport scrollbars. (Closed)
Patch Set: Fix (?) Graphics2D test 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/page/scrolling/TopDocumentRootScrollerController.cpp
diff --git a/third_party/WebKit/Source/core/page/scrolling/TopDocumentRootScrollerController.cpp b/third_party/WebKit/Source/core/page/scrolling/TopDocumentRootScrollerController.cpp
index 5d6d6d3fb280d241804e343a125a07cfdbfc5af3..48c64a0d69eac00822dac09f221903aaf75263a0 100644
--- a/third_party/WebKit/Source/core/page/scrolling/TopDocumentRootScrollerController.cpp
+++ b/third_party/WebKit/Source/core/page/scrolling/TopDocumentRootScrollerController.cpp
@@ -94,6 +94,11 @@ void TopDocumentRootScrollerController::recomputeGlobalRootScroller() {
// changes.
setNeedsCompositingInputsUpdateOnGlobalRootScroller();
+ ScrollableArea* oldRootScrollerArea =
+ m_globalRootScroller
+ ? RootScrollerUtil::scrollableAreaFor(*m_globalRootScroller.get())
+ : nullptr;
+
m_globalRootScroller = target;
setNeedsCompositingInputsUpdateOnGlobalRootScroller();
@@ -104,6 +109,13 @@ void TopDocumentRootScrollerController::recomputeGlobalRootScroller() {
// ViewportScrollCallback to swap the target into the layout viewport
// in RootFrameViewport.
m_viewportApplyScroll->setScroller(targetScroller);
+
+ // The scrollers may need to stop using their own scrollbars as Android
+ // Chrome's VisualViewport provides the scrollbars for the root scroller.
+ if (oldRootScrollerArea)
+ oldRootScrollerArea->didChangeGlobalRootScroller();
+
+ targetScroller->didChangeGlobalRootScroller();
}
Document* TopDocumentRootScrollerController::topDocument() const {
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.cpp ('k') | third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698