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

Unified Diff: third_party/WebKit/Source/platform/mac/ScrollAnimatorMac.mm

Issue 2478463003: Revert of Implement overlay scrollbar fade out for non-composited scrollers. (Closed)
Patch Set: 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/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

Powered by Google App Engine
This is Rietveld 408576698