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

Unified Diff: third_party/WebKit/Source/platform/scroll/ScrollbarTheme.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/ScrollbarTheme.cpp
diff --git a/third_party/WebKit/Source/platform/scroll/ScrollbarTheme.cpp b/third_party/WebKit/Source/platform/scroll/ScrollbarTheme.cpp
index 9d36150257e4681000f95dbb1da3bee179bc2e3d..7eaf836be2f90f2ac96e9977d2b52a1bceb5486f 100644
--- a/third_party/WebKit/Source/platform/scroll/ScrollbarTheme.cpp
+++ b/third_party/WebKit/Source/platform/scroll/ScrollbarTheme.cpp
@@ -233,6 +233,30 @@ bool ScrollbarTheme::shouldSnapBackToDragOrigin(
scrollbar.orientation() == HorizontalScrollbar);
}
+double ScrollbarTheme::overlayScrollbarFadeOutDelaySeconds() const {
+ DCHECK(usesOverlayScrollbars());
+#if !OS(MACOSX)
skobes 2016/11/02 21:02:43 Override in ScrollbarThemeMac instead of using #if
bokan 2016/11/02 22:41:57 Can't since WebThemeEngine.h is conditionally incl
+ return Platform::current()
+ ->themeEngine()
+ ->getOverlayScrollbarFadeOutDelaySeconds();
+#else
+ // On Mac, fading is controlled by the painting code in ScrollAnimatorMac.
+ return 0.0;
+#endif
+}
+
+double ScrollbarTheme::overlayScrollbarFadeOutDurationSeconds() const {
+ DCHECK(usesOverlayScrollbars());
+#if !OS(MACOSX)
+ return Platform::current()
+ ->themeEngine()
+ ->getOverlayScrollbarFadeOutDurationSeconds();
+#else
+ // On Mac, fading is controlled by the painting code in ScrollAnimatorMac.
+ return 0.0;
+#endif
+}
+
int ScrollbarTheme::thumbPosition(const ScrollbarThemeClient& scrollbar,
float scrollPosition) {
if (scrollbar.enabled()) {

Powered by Google App Engine
This is Rietveld 408576698