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

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

Issue 2339873002: Replace hide-scrollbars flag with a web setting. (Closed)
Patch Set: check for presence of settings using DCHECK + sync. 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 2d272212984fa06d25340d11c0945fca06af43f8..d7545e2403001c862882077846444ddb86bf6f71 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
@@ -1051,6 +1051,10 @@ void PaintLayerScrollableArea::setHasHorizontalScrollbar(bool hasScrollbar)
if (FreezeScrollbarsScope::scrollbarsAreFrozen())
return;
+ DCHECK(box().frame()->settings());
+ if (box().frame()->settings()->hideScrollbars())
+ hasScrollbar = false;
+
if (hasScrollbar == hasHorizontalScrollbar())
return;
@@ -1078,6 +1082,10 @@ void PaintLayerScrollableArea::setHasVerticalScrollbar(bool hasScrollbar)
if (FreezeScrollbarsScope::scrollbarsAreFrozen())
return;
+ DCHECK(box().frame()->settings());
+ if (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