Changeset 185431 in webkit
- Timestamp:
- Jun 10, 2015, 2:53:42 PM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 6 edited
-
ChangeLog (modified) (1 diff)
-
platform/ScrollAnimator.h (modified) (1 diff)
-
platform/ScrollableArea.cpp (modified) (2 diffs)
-
platform/mac/NSScrollerImpDetails.h (modified) (1 diff)
-
platform/mac/ScrollAnimatorMac.h (modified) (1 diff)
-
platform/mac/ScrollAnimatorMac.mm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r185429 r185431 1 2015-06-10 Beth Dakin <bdakin@apple.com> 2 3 Overriding the overlay scrollbar style on WKView doesn't take effect immediately 4 https://bugs.webkit.org/show_bug.cgi?id=145855 5 -and corresponding- 6 rdar://problem/20948706 7 8 Reviewed by Simon Fraser. 9 10 Since we opt into layer-per-part scrollbars in order to move the knob on the 11 secondary thread, AppKit is creating its own layers for the knob and track. To 12 invalidate them, we need to call into the ScrollbarPainter’s setNeedsDisplay. 13 14 New virtual function on ScrollAnimator to call into ScrollbarPainter’s 15 setNeedsDispay. 16 * platform/ScrollAnimator.h: 17 18 Call the new function when setting the overlay style. 19 * platform/ScrollableArea.cpp: 20 (WebCore::ScrollableArea::setScrollbarOverlayStyle): 21 22 Add setNeedsDisplay to the list of ScrollbarPainter methods. 23 * platform/mac/NSScrollerImpDetails.h: 24 25 Implement invalidateScrollbarPartLayers. 26 * platform/mac/ScrollAnimatorMac.h: 27 * platform/mac/ScrollAnimatorMac.mm: 28 (WebCore::ScrollAnimatorMac::invalidateScrollbarPartLayers): 29 1 30 2015-06-10 Matt Rajca <mrajca@apple.com> 2 31 -
trunk/Source/WebCore/platform/ScrollAnimator.h
r184728 r185431 111 111 virtual void willRemoveHorizontalScrollbar(Scrollbar*) { } 112 112 113 virtual void invalidateScrollbarPartLayers(Scrollbar*) { } 114 113 115 virtual void verticalScrollbarLayerDidChange() { } 114 116 virtual void horizontalScrollbarLayerDidChange() { } -
trunk/Source/WebCore/platform/ScrollableArea.cpp
r184596 r185431 342 342 ScrollbarTheme::theme()->updateScrollbarOverlayStyle(horizontalScrollbar()); 343 343 horizontalScrollbar()->invalidate(); 344 if (ScrollAnimator* scrollAnimator = existingScrollAnimator()) 345 scrollAnimator->invalidateScrollbarPartLayers(horizontalScrollbar()); 344 346 } 345 347 … … 347 349 ScrollbarTheme::theme()->updateScrollbarOverlayStyle(verticalScrollbar()); 348 350 verticalScrollbar()->invalidate(); 351 if (ScrollAnimator* scrollAnimator = existingScrollAnimator()) 352 scrollAnimator->invalidateScrollbarPartLayers(verticalScrollbar()); 349 353 } 350 354 } -
trunk/Source/WebCore/platform/mac/NSScrollerImpDetails.h
r172346 r185431 63 63 - (void)mouseEnteredScroller; 64 64 - (void)mouseExitedScroller; 65 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000 66 - (void)setNeedsDisplay:(BOOL)flag; 67 #endif 65 68 @end 66 69 -
trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.h
r184513 r185431 116 116 virtual void willRemoveHorizontalScrollbar(Scrollbar*); 117 117 118 void invalidateScrollbarPartLayers(Scrollbar*) override; 119 118 120 virtual void verticalScrollbarLayerDidChange(); 119 121 virtual void horizontalScrollbarLayerDidChange(); -
trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm
r184728 r185431 1012 1012 } 1013 1013 1014 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000 1015 void ScrollAnimatorMac::invalidateScrollbarPartLayers(Scrollbar* scrollbar) 1016 { 1017 ScrollbarPainter painter = scrollbarPainterForScrollbar(scrollbar); 1018 [painter setNeedsDisplay:YES]; 1019 } 1020 #else 1021 void ScrollAnimatorMac::invalidateScrollbarPartLayers(Scrollbar*) 1022 { 1023 } 1024 #endif 1025 1014 1026 void ScrollAnimatorMac::verticalScrollbarLayerDidChange() 1015 1027 {
Note:
See TracChangeset
for help on using the changeset viewer.