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

Unified Diff: third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp

Issue 2339873002: Replace hide-scrollbars flag with a web setting. (Closed)
Patch Set: Add missing plumbing of hide_scrollbars preference. Created 4 years, 3 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/paint/PaintLayerScrollableArea.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
index f3710f0d20314c96e033feab385d84e7201682cc..6d015c29b0a3eaf90876db5e5937bd045f49b0b4 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
@@ -1051,6 +1051,9 @@ void PaintLayerScrollableArea::setHasHorizontalScrollbar(bool hasScrollbar)
if (FreezeScrollbarsScope::scrollbarsAreFrozen())
return;
+ if (box().frame()->settings() && box().frame()->settings()->hideScrollbars())
dcheng 2016/09/19 10:04:47 Is this null check of settings() required? We do c
skobes 2016/09/19 18:37:22 The question is whether Frame::m_host can ever be
skobes 2016/09/19 19:31:20 Ok, let's change the null checks to DCHECKs.
Eric Seckler 2016/09/22 12:41:56 Done. I also changed this in FrameView, assuming i
+ hasScrollbar = false;
+
if (hasScrollbar == hasHorizontalScrollbar())
return;
@@ -1078,6 +1081,9 @@ void PaintLayerScrollableArea::setHasVerticalScrollbar(bool hasScrollbar)
if (FreezeScrollbarsScope::scrollbarsAreFrozen())
return;
+ if (box().frame()->settings() && box().frame()->settings()->hideScrollbars())
+ hasScrollbar = false;
+
if (hasScrollbar == hasVerticalScrollbar())
return;
« no previous file with comments | « third_party/WebKit/Source/core/frame/VisualViewport.cpp ('k') | third_party/WebKit/Source/core/testing/InternalSettings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698