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

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

Issue 2453553003: Disable overlay scrollbars in Blink when hidden by the compositor. (Closed)
Patch Set: Rebase Created 4 years, 2 months 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 8a3bfdab13304af8192d6e487225889e4d25b60f..b0900d71a5e93f8558fed8ad92d2d2b119db4895 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -3736,7 +3736,8 @@ void FrameView::updateScrollbarGeometry() {
if (oldRect != horizontalScrollbar()->frameRect())
setScrollbarNeedsPaintInvalidation(HorizontalScrollbar);
- horizontalScrollbar()->setEnabled(contentsWidth() > clientWidth);
+ horizontalScrollbar()->setEnabled(contentsWidth() > clientWidth &&
+ !scrollbarsHidden());
horizontalScrollbar()->setProportion(clientWidth, contentsWidth());
horizontalScrollbar()->offsetDidChange();
}
@@ -3754,7 +3755,8 @@ void FrameView::updateScrollbarGeometry() {
if (oldRect != verticalScrollbar()->frameRect())
setScrollbarNeedsPaintInvalidation(VerticalScrollbar);
- verticalScrollbar()->setEnabled(contentsHeight() > clientHeight);
+ verticalScrollbar()->setEnabled(contentsHeight() > clientHeight &&
+ !scrollbarsHidden());
verticalScrollbar()->setProportion(clientHeight, contentsHeight());
verticalScrollbar()->offsetDidChange();
}
@@ -3822,6 +3824,10 @@ void FrameView::updateScrollbarsIfNeeded() {
updateScrollbars();
}
+void FrameView::didChangeScrollbarsHidden() {
+ updateScrollbars();
+}
+
void FrameView::updateScrollbars() {
m_needsScrollbarsUpdate = false;
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.h ('k') | third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698