Index: third_party/WebKit/Source/platform/mac/ScrollAnimatorMac.mm |
diff --git a/third_party/WebKit/Source/platform/mac/ScrollAnimatorMac.mm b/third_party/WebKit/Source/platform/mac/ScrollAnimatorMac.mm |
index a49351808fc115c54467c0f1efafa3d14ffc4027..79356732195909885ce20fbac12ebf74221af731 100644 |
--- a/third_party/WebKit/Source/platform/mac/ScrollAnimatorMac.mm |
+++ b/third_party/WebKit/Source/platform/mac/ScrollAnimatorMac.mm |
@@ -952,6 +952,20 @@ |
[m_scrollbarPainterController.get() setHorizontalScrollerImp:nil]; |
} |
+bool ScrollAnimatorMac::shouldScrollbarParticipateInHitTesting( |
+ Scrollbar& scrollbar) { |
+ // Non-overlay scrollbars should always participate in hit testing. |
+ if (ScrollbarThemeMac::recommendedScrollerStyle() != NSScrollerStyleOverlay) |
+ return true; |
+ |
+ // Overlay scrollbars should participate in hit testing whenever they are at |
+ // all visible. |
+ ScrollbarPainter painter = scrollbarPainterForScrollbar(scrollbar); |
+ if (!painter) |
+ return false; |
+ return [painter knobAlpha] > 0; |
+} |
+ |
void ScrollAnimatorMac::notifyContentAreaScrolled(const ScrollOffset& delta) { |
// This function is called when a page is going into the page cache, but the |
// page |