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

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

Issue 2421913002: Change Aura overlay scrollbars from solid color to painted scrollbars. (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
« no previous file with comments | « content/renderer/gpu/render_widget_compositor.cc ('k') | ui/native_theme/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/scroll/ScrollbarThemeAura.cpp
diff --git a/third_party/WebKit/Source/platform/scroll/ScrollbarThemeAura.cpp b/third_party/WebKit/Source/platform/scroll/ScrollbarThemeAura.cpp
index 655c9203cf97f5ad111eb4dff98f233ba3baa4db..6d213bed316a255435be846e8e016c116a4cfec2 100644
--- a/third_party/WebKit/Source/platform/scroll/ScrollbarThemeAura.cpp
+++ b/third_party/WebKit/Source/platform/scroll/ScrollbarThemeAura.cpp
@@ -126,12 +126,20 @@ PartPaintingParams buttonPartPaintingParams(
return PartPaintingParams(paintPart, state);
}
+static int getScrollbarThickness() {
+ return Platform::current()
+ ->themeEngine()
+ ->getSize(WebThemeEngine::PartScrollbarVerticalThumb)
+ .width;
+}
+
} // namespace
ScrollbarTheme& ScrollbarTheme::nativeTheme() {
if (RuntimeEnabledFeatures::overlayScrollbarsEnabled()) {
- DEFINE_STATIC_LOCAL(ScrollbarThemeOverlay, theme,
- (10, 0, ScrollbarThemeOverlay::AllowHitTest));
+ DEFINE_STATIC_LOCAL(
+ ScrollbarThemeOverlay, theme,
+ (getScrollbarThickness(), 0, ScrollbarThemeOverlay::AllowHitTest));
return theme;
}
« no previous file with comments | « content/renderer/gpu/render_widget_compositor.cc ('k') | ui/native_theme/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698