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

Unified Diff: third_party/WebKit/Source/platform/scroll/ScrollbarThemeMac.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/scroll/ScrollbarThemeMac.mm
diff --git a/third_party/WebKit/Source/platform/scroll/ScrollbarThemeMac.mm b/third_party/WebKit/Source/platform/scroll/ScrollbarThemeMac.mm
index 861c471961dc43bb9cd44e920ab84a92c2a0bd95..60d97556f4c6f11a0934be919c53a2d87cbd020b 100644
--- a/third_party/WebKit/Source/platform/scroll/ScrollbarThemeMac.mm
+++ b/third_party/WebKit/Source/platform/scroll/ScrollbarThemeMac.mm
@@ -56,6 +56,7 @@
@interface BlinkScrollbarObserver : NSObject {
blink::ScrollbarThemeClient* _scrollbar;
RetainPtr<ScrollbarPainter> _scrollbarPainter;
+ BOOL _visible;
}
- (id)initWithScrollbar:(blink::ScrollbarThemeClient*)scrollbar
painter:(const RetainPtr<ScrollbarPainter>&)painter;
@@ -91,7 +92,10 @@
context:(void*)context {
if ([keyPath isEqualToString:@"knobAlpha"]) {
BOOL visible = [_scrollbarPainter.get() knobAlpha] > 0;
- _scrollbar->setScrollbarsHidden(!visible);
+ if (_visible != visible) {
+ _visible = visible;
+ _scrollbar->visibilityChanged();
+ }
}
}

Powered by Google App Engine
This is Rietveld 408576698