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

Unified Diff: third_party/WebKit/Source/platform/scroll/ScrollbarThemeOverlay.cpp

Issue 2239313002: Hide non-composited native scrollbars. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add test. Created 4 years, 4 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/platform/scroll/ScrollbarThemeOverlay.cpp
diff --git a/third_party/WebKit/Source/platform/scroll/ScrollbarThemeOverlay.cpp b/third_party/WebKit/Source/platform/scroll/ScrollbarThemeOverlay.cpp
index ad0085bc03fa3b83f7b40eee9f8658455afc8529..27f0dde5aaa5408fc8ccf85bb8d92a6033482dba 100644
--- a/third_party/WebKit/Source/platform/scroll/ScrollbarThemeOverlay.cpp
+++ b/third_party/WebKit/Source/platform/scroll/ScrollbarThemeOverlay.cpp
@@ -175,11 +175,15 @@ ScrollbarThemeOverlay& ScrollbarThemeOverlay::mobileTheme()
{
static ScrollbarThemeOverlay* theme;
if (!theme) {
- WebThemeEngine::ScrollbarStyle style = { 3, 3, 0x80808080 }; // default style
- if (Platform::current()->themeEngine()) {
- Platform::current()->themeEngine()->getOverlayScrollbarStyle(&style);
+ if (RuntimeEnabledFeatures::hideScrollbarsEnabled()) {
+ theme = new ScrollbarThemeOverlay(0, 0, ScrollbarThemeOverlay::DisallowHitTest, Color());
+ } else {
+ WebThemeEngine::ScrollbarStyle style = { 3, 3, 0x80808080 }; // default style
+ if (Platform::current()->themeEngine()) {
+ Platform::current()->themeEngine()->getOverlayScrollbarStyle(&style);
+ }
+ theme = new ScrollbarThemeOverlay(style.thumbThickness, style.scrollbarMargin, ScrollbarThemeOverlay::DisallowHitTest, Color(style.color));
}
- theme = new ScrollbarThemeOverlay(style.thumbThickness, style.scrollbarMargin, ScrollbarThemeOverlay::DisallowHitTest, Color(style.color));
}
return *theme;
}

Powered by Google App Engine
This is Rietveld 408576698