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

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

Issue 2467693002: Implement overlay scrollbar fade out for non-composited scrollers. (Closed)
Patch Set: overlay-scrollbar-mouse-capture now works on Mac Created 4 years, 1 month 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 b60cfbcbfbea6ef5c5a60358ba6299897314ea72..daa45d18e5079ee58f9fd09953da6acdd9416a61 100644
--- a/third_party/WebKit/Source/platform/scroll/ScrollbarThemeOverlay.cpp
+++ b/third_party/WebKit/Source/platform/scroll/ScrollbarThemeOverlay.cpp
@@ -167,6 +167,9 @@ void ScrollbarThemeOverlay::paintThumb(GraphicsContext& context,
static_cast<WebScrollbarOverlayColorTheme>(
scrollbar.getScrollbarOverlayColorTheme());
+ if (!scrollbar.enabled())
skobes 2016/11/02 21:02:43 Move this up next to the rest of the "state = " lo
bokan 2016/11/02 22:41:57 Done.
+ state = WebThemeEngine::StateDisabled;
+
Platform::current()->themeEngine()->paint(canvas, part, state, WebRect(rect),
&params);
}
@@ -177,7 +180,11 @@ ScrollbarPart ScrollbarThemeOverlay::hitTest(
if (m_allowHitTest == DisallowHitTest)
return NoPart;
- return ScrollbarTheme::hitTest(scrollbar, position);
+ ScrollbarPart part = ScrollbarTheme::hitTest(scrollbar, position);
+ if (part != ThumbPart)
+ return NoPart;
+
+ return ThumbPart;
}
ScrollbarThemeOverlay& ScrollbarThemeOverlay::mobileTheme() {

Powered by Google App Engine
This is Rietveld 408576698