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..9b1fb69267c52a13da0f04d73048b7b99bf13afe 100644 |
--- a/third_party/WebKit/Source/platform/scroll/ScrollbarThemeOverlay.cpp |
+++ b/third_party/WebKit/Source/platform/scroll/ScrollbarThemeOverlay.cpp |
@@ -72,6 +72,18 @@ bool ScrollbarThemeOverlay::usesOverlayScrollbars() const { |
return true; |
} |
+double ScrollbarThemeOverlay::overlayScrollbarFadeOutDelaySeconds() const { |
+ WebThemeEngine::ScrollbarStyle style; |
+ Platform::current()->themeEngine()->getOverlayScrollbarStyle(&style); |
+ return style.fadeOutDelaySeconds; |
+} |
+ |
+double ScrollbarThemeOverlay::overlayScrollbarFadeOutDurationSeconds() const { |
+ WebThemeEngine::ScrollbarStyle style; |
+ Platform::current()->themeEngine()->getOverlayScrollbarStyle(&style); |
+ return style.fadeOutDurationSeconds; |
+} |
+ |
int ScrollbarThemeOverlay::thumbPosition(const ScrollbarThemeClient& scrollbar, |
float scrollPosition) { |
if (!scrollbar.totalSize()) |
@@ -151,7 +163,10 @@ void ScrollbarThemeOverlay::paintThumb(GraphicsContext& context, |
} |
WebThemeEngine::State state = WebThemeEngine::StateNormal; |
- if (scrollbar.pressedPart() == ThumbPart) |
+ |
+ if (!scrollbar.enabled()) |
+ state = WebThemeEngine::StateDisabled; |
+ else if (scrollbar.pressedPart() == ThumbPart) |
state = WebThemeEngine::StatePressed; |
else if (scrollbar.hoveredPart() == ThumbPart) |
state = WebThemeEngine::StateHover; |
@@ -177,7 +192,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() { |