Changeset 93445 in webkit
- Timestamp:
- Aug 19, 2011 3:34:05 PM (13 years ago)
- Location:
- trunk/Source
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r93378 r93445 1 2011-08-19 Beth Dakin <bdakin@apple.com> 2 3 https://bugs.webkit.org/show_bug.cgi?id=66590 4 Re-name scrollbar painter types 5 6 Reviewed by Sam Weinig. 7 8 WTF_USE_WK_SCROLLBAR_PAINTER is now WTF_USE_SCROLLBAR_PAINTER since WK no longer 9 applies. 10 * wtf/Platform.h: 11 1 12 2011-08-18 Mark Hahnenberg <mhahnenberg@apple.com> 2 13 -
trunk/Source/JavaScriptCore/wtf/Platform.h
r92974 r93445 556 556 #define ENABLE_GESTURE_EVENTS 1 557 557 #define ENABLE_RUBBER_BANDING 1 558 #define WTF_USE_ WK_SCROLLBAR_PAINTER 1558 #define WTF_USE_SCROLLBAR_PAINTER 1 559 559 #endif 560 560 #if !defined(ENABLE_JAVA_BRIDGE) -
trunk/Source/WebCore/ChangeLog
r93443 r93445 1 2011-08-19 Beth Dakin <bdakin@apple.com> 2 3 https://bugs.webkit.org/show_bug.cgi?id=66590 4 Re-name scrollbar painter types 5 6 Reviewed by Sam Weinig. 7 8 Names changed to remove references to WebKitSystemInterface since the 9 implementation is now in WebCore. And the type names changed to be more Objective- 10 Cish instead of C++ish 11 WTF_USE_WK_SCROLLBAR_PAINTER -> WTF_USE_SCROLLBAR_PAINTER 12 WKScrollbarPainterRef -> ScrollbarPainter 13 WKScrollbarPainterControllerRef -> ScrollbarPainterController 14 15 * platform/mac/NSScrollerImpDetails.h: 16 * platform/mac/ScrollAnimatorMac.h: 17 * platform/mac/ScrollAnimatorMac.mm: 18 (-[ScrollbarPartAnimation initWithScrollbarPainter:part:WebCore::scrollAnimator:WebCore::animateAlphaTo:duration:]): 19 (-[ScrollbarPainterDelegate setUpAnimation:scrollerPainter:part:WebCore::animateAlphaTo:duration:]): 20 (-[ScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:]): 21 (-[ScrollbarPainterDelegate scrollerImp:animateTrackAlphaTo:duration:]): 22 (WebCore::ScrollAnimatorMac::ScrollAnimatorMac): 23 (WebCore::ScrollAnimatorMac::~ScrollAnimatorMac): 24 (WebCore::ScrollAnimatorMac::notifyPositionChanged): 25 (WebCore::ScrollAnimatorMac::contentAreaWillPaint): 26 (WebCore::ScrollAnimatorMac::mouseEnteredContentArea): 27 (WebCore::ScrollAnimatorMac::mouseExitedContentArea): 28 (WebCore::ScrollAnimatorMac::mouseMovedInContentArea): 29 (WebCore::ScrollAnimatorMac::willStartLiveResize): 30 (WebCore::ScrollAnimatorMac::contentsResized): 31 (WebCore::ScrollAnimatorMac::willEndLiveResize): 32 (WebCore::ScrollAnimatorMac::contentAreaDidShow): 33 (WebCore::ScrollAnimatorMac::contentAreaDidHide): 34 (WebCore::ScrollAnimatorMac::didBeginScrollGesture): 35 (WebCore::ScrollAnimatorMac::didEndScrollGesture): 36 (WebCore::ScrollAnimatorMac::didAddVerticalScrollbar): 37 (WebCore::ScrollAnimatorMac::willRemoveVerticalScrollbar): 38 (WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar): 39 (WebCore::ScrollAnimatorMac::willRemoveHorizontalScrollbar): 40 (WebCore::ScrollAnimatorMac::cancelAnimations): 41 (WebCore::ScrollAnimatorMac::setIsActive): 42 (WebCore::ScrollAnimatorMac::updateScrollerStyle): 43 * platform/mac/ScrollViewMac.mm: 44 (WebCore::ScrollView::platformSetScrollbarOverlayStyle): 45 * platform/mac/ScrollbarThemeMac.h: 46 * platform/mac/ScrollbarThemeMac.mm: 47 (+[ScrollbarPrefsObserver appearancePrefsChanged:]): 48 (WebCore::updateArrowPlacement): 49 (WebCore::ScrollbarThemeMac::registerScrollbar): 50 (WebCore::ScrollbarThemeMac::setNewPainterForScrollbar): 51 (WebCore::ScrollbarThemeMac::painterForScrollbar): 52 (WebCore::ScrollbarThemeMac::scrollbarThickness): 53 (WebCore::ScrollbarThemeMac::usesOverlayScrollbars): 54 (WebCore::ScrollbarThemeMac::updateScrollbarOverlayStyle): 55 (WebCore::ScrollbarThemeMac::hasThumb): 56 (WebCore::ScrollbarThemeMac::minimumThumbLength): 57 (WebCore::ScrollbarThemeMac::updateEnabledState): 58 (WebCore::scrollbarPainterPaint): 59 (WebCore::ScrollbarThemeMac::paint): 60 1 61 2011-08-19 Van Lam <vanlam@google.com> 2 62 -
trunk/Source/WebCore/platform/mac/NSScrollerImpDetails.h
r93377 r93445 29 29 #include "config.h" 30 30 31 #if USE( WK_SCROLLBAR_PAINTER)31 #if USE(SCROLLBAR_PAINTER) 32 32 @interface NSObject (ScrollbarPainter) 33 33 + (id)scrollerImpWithStyle:(NSScrollerStyle)newScrollerStyle controlSize:(NSControlSize)newControlSize horizontal:(BOOL)horizontal replacingScrollerImp:(id)previous; -
trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.h
r93377 r93445 48 48 #endif 49 49 50 #if USE( WK_SCROLLBAR_PAINTER)51 typedef id WKScrollbarPainterControllerRef;50 #if USE(SCROLLBAR_PAINTER) 51 typedef id ScrollbarPainterController; 52 52 #endif 53 53 … … 86 86 virtual void setIsActive(); 87 87 88 #if USE( WK_SCROLLBAR_PAINTER)88 #if USE(SCROLLBAR_PAINTER) 89 89 void updateScrollerStyle(); 90 90 … … 100 100 RetainPtr<ScrollAnimationHelperDelegate> m_scrollAnimationHelperDelegate; 101 101 102 #if USE( WK_SCROLLBAR_PAINTER)103 RetainPtr< WKScrollbarPainterControllerRef> m_scrollbarPainterController;102 #if USE(SCROLLBAR_PAINTER) 103 RetainPtr<ScrollbarPainterController> m_scrollbarPainterController; 104 104 RetainPtr<ScrollbarPainterControllerDelegate> m_scrollbarPainterControllerDelegate; 105 105 RetainPtr<id> m_scrollbarPainterDelegate; -
trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm
r93377 r93445 149 149 @end 150 150 151 #if USE( WK_SCROLLBAR_PAINTER)151 #if USE(SCROLLBAR_PAINTER) 152 152 153 153 @interface ScrollbarPainterControllerDelegate : NSObject … … 245 245 @interface ScrollbarPartAnimation : NSAnimation 246 246 { 247 RetainPtr< WKScrollbarPainterRef> _scrollerPainter;247 RetainPtr<ScrollbarPainter> _scrollerPainter; 248 248 WebCore::ScrollbarPart _part; 249 249 WebCore::ScrollAnimatorMac* _animator; … … 251 251 CGFloat _newAlpha; 252 252 } 253 - (id)initWithScrollbarPainter:( WKScrollbarPainterRef)scrollerPainter part:(WebCore::ScrollbarPart)part scrollAnimator:(WebCore::ScrollAnimatorMac*)scrollAnimator animateAlphaTo:(CGFloat)newAlpha duration:(NSTimeInterval)duration;253 - (id)initWithScrollbarPainter:(ScrollbarPainter)scrollerPainter part:(WebCore::ScrollbarPart)part scrollAnimator:(WebCore::ScrollAnimatorMac*)scrollAnimator animateAlphaTo:(CGFloat)newAlpha duration:(NSTimeInterval)duration; 254 254 @end 255 255 256 256 @implementation ScrollbarPartAnimation 257 257 258 - (id)initWithScrollbarPainter:( WKScrollbarPainterRef)scrollerPainter part:(WebCore::ScrollbarPart)part scrollAnimator:(WebCore::ScrollAnimatorMac*)scrollAnimator animateAlphaTo:(CGFloat)newAlpha duration:(NSTimeInterval)duration258 - (id)initWithScrollbarPainter:(ScrollbarPainter)scrollerPainter part:(WebCore::ScrollbarPart)part scrollAnimator:(WebCore::ScrollAnimatorMac*)scrollAnimator animateAlphaTo:(CGFloat)newAlpha duration:(NSTimeInterval)duration 259 259 { 260 260 self = [super initWithDuration:duration animationCurve:NSAnimationEaseInOut]; … … 360 360 } 361 361 362 - (void)setUpAnimation:(RetainPtr<ScrollbarPartAnimation>&)scrollbarPartAnimation scrollerPainter:( WKScrollbarPainterRef)scrollerPainter part:(WebCore::ScrollbarPart)part animateAlphaTo:(CGFloat)newAlpha duration:(NSTimeInterval)duration362 - (void)setUpAnimation:(RetainPtr<ScrollbarPartAnimation>&)scrollbarPartAnimation scrollerPainter:(ScrollbarPainter)scrollerPainter part:(WebCore::ScrollbarPart)part animateAlphaTo:(CGFloat)newAlpha duration:(NSTimeInterval)duration 363 363 { 364 364 // If the user has scrolled the page, then the scrollbars must be animated here. … … 408 408 return; 409 409 410 WKScrollbarPainterRef scrollerPainter = (WKScrollbarPainterRef)scrollerImp;410 ScrollbarPainter scrollerPainter = (ScrollbarPainter)scrollerImp; 411 411 if ([scrollerImp isHorizontal]) 412 412 [self setUpAnimation:_horizontalKnobAnimation scrollerPainter:scrollerPainter part:WebCore::ThumbPart animateAlphaTo:newKnobAlpha duration:duration]; … … 420 420 return; 421 421 422 WKScrollbarPainterRef scrollerPainter = (WKScrollbarPainterRef)scrollerImp;422 ScrollbarPainter scrollerPainter = (ScrollbarPainter)scrollerImp; 423 423 if ([scrollerImp isHorizontal]) 424 424 [self setUpAnimation:_horizontalTrackAnimation scrollerPainter:scrollerPainter part:WebCore::BackTrackPart animateAlphaTo:newTrackAlpha duration:duration]; … … 444 444 @end 445 445 446 #endif // USE( WK_SCROLLBAR_PAINTER)446 #endif // USE(SCROLLBAR_PAINTER) 447 447 448 448 namespace WebCore { … … 455 455 ScrollAnimatorMac::ScrollAnimatorMac(ScrollableArea* scrollableArea) 456 456 : ScrollAnimator(scrollableArea) 457 #if USE( WK_SCROLLBAR_PAINTER)457 #if USE(SCROLLBAR_PAINTER) 458 458 , m_initialScrollbarPaintTimer(this, &ScrollAnimatorMac::initialScrollbarPaintTimerFired) 459 459 #endif … … 473 473 m_scrollAnimationHelper.adoptNS([[NSClassFromString(@"NSScrollAnimationHelper") alloc] initWithDelegate:m_scrollAnimationHelperDelegate.get()]); 474 474 475 #if USE( WK_SCROLLBAR_PAINTER)475 #if USE(SCROLLBAR_PAINTER) 476 476 m_scrollbarPainterControllerDelegate.adoptNS([[ScrollbarPainterControllerDelegate alloc] initWithScrollAnimator:this]); 477 477 m_scrollbarPainterController = [[[NSClassFromString(@"NSScrollerImpPair") alloc] init] autorelease]; … … 485 485 ScrollAnimatorMac::~ScrollAnimatorMac() 486 486 { 487 #if USE( WK_SCROLLBAR_PAINTER)487 #if USE(SCROLLBAR_PAINTER) 488 488 [m_scrollbarPainterControllerDelegate.get() scrollAnimatorDestroyed]; 489 489 [m_scrollbarPainterController.get() setDelegate:nil]; … … 601 601 void ScrollAnimatorMac::notifyPositionChanged() 602 602 { 603 #if USE( WK_SCROLLBAR_PAINTER)603 #if USE(SCROLLBAR_PAINTER) 604 604 [m_scrollbarPainterController.get() contentAreaScrolled]; 605 605 #endif … … 609 609 void ScrollAnimatorMac::contentAreaWillPaint() const 610 610 { 611 #if USE( WK_SCROLLBAR_PAINTER)611 #if USE(SCROLLBAR_PAINTER) 612 612 [m_scrollbarPainterController.get() contentAreaWillDraw]; 613 613 #endif … … 616 616 void ScrollAnimatorMac::mouseEnteredContentArea() const 617 617 { 618 #if USE( WK_SCROLLBAR_PAINTER)618 #if USE(SCROLLBAR_PAINTER) 619 619 [m_scrollbarPainterController.get() mouseEnteredContentArea]; 620 620 #endif … … 623 623 void ScrollAnimatorMac::mouseExitedContentArea() const 624 624 { 625 #if USE( WK_SCROLLBAR_PAINTER)625 #if USE(SCROLLBAR_PAINTER) 626 626 [m_scrollbarPainterController.get() mouseExitedContentArea]; 627 627 #endif … … 630 630 void ScrollAnimatorMac::mouseMovedInContentArea() const 631 631 { 632 #if USE( WK_SCROLLBAR_PAINTER)632 #if USE(SCROLLBAR_PAINTER) 633 633 [m_scrollbarPainterController.get() mouseMovedInContentArea]; 634 634 #endif … … 637 637 void ScrollAnimatorMac::willStartLiveResize() 638 638 { 639 #if USE( WK_SCROLLBAR_PAINTER)639 #if USE(SCROLLBAR_PAINTER) 640 640 [m_scrollbarPainterController.get() startLiveResize]; 641 641 #endif … … 644 644 void ScrollAnimatorMac::contentsResized() const 645 645 { 646 #if USE( WK_SCROLLBAR_PAINTER)646 #if USE(SCROLLBAR_PAINTER) 647 647 [m_scrollbarPainterController.get() contentAreaDidResize]; 648 648 #endif … … 651 651 void ScrollAnimatorMac::willEndLiveResize() 652 652 { 653 #if USE( WK_SCROLLBAR_PAINTER)653 #if USE(SCROLLBAR_PAINTER) 654 654 [m_scrollbarPainterController.get() endLiveResize]; 655 655 #endif … … 658 658 void ScrollAnimatorMac::contentAreaDidShow() const 659 659 { 660 #if USE( WK_SCROLLBAR_PAINTER)660 #if USE(SCROLLBAR_PAINTER) 661 661 [m_scrollbarPainterController.get() windowOrderedIn]; 662 662 #endif … … 665 665 void ScrollAnimatorMac::contentAreaDidHide() const 666 666 { 667 #if USE( WK_SCROLLBAR_PAINTER)667 #if USE(SCROLLBAR_PAINTER) 668 668 [m_scrollbarPainterController.get() windowOrderedOut]; 669 669 #endif … … 672 672 void ScrollAnimatorMac::didBeginScrollGesture() const 673 673 { 674 #if USE( WK_SCROLLBAR_PAINTER)674 #if USE(SCROLLBAR_PAINTER) 675 675 [m_scrollbarPainterController.get() beginScrollGesture]; 676 676 #endif … … 679 679 void ScrollAnimatorMac::didEndScrollGesture() const 680 680 { 681 #if USE( WK_SCROLLBAR_PAINTER)681 #if USE(SCROLLBAR_PAINTER) 682 682 [m_scrollbarPainterController.get() endScrollGesture]; 683 683 #endif … … 686 686 void ScrollAnimatorMac::didAddVerticalScrollbar(Scrollbar* scrollbar) 687 687 { 688 #if USE( WK_SCROLLBAR_PAINTER)689 WKScrollbarPainterRefpainter = static_cast<WebCore::ScrollbarThemeMac*>(WebCore::ScrollbarTheme::nativeTheme())->painterForScrollbar(scrollbar);688 #if USE(SCROLLBAR_PAINTER) 689 ScrollbarPainter painter = static_cast<WebCore::ScrollbarThemeMac*>(WebCore::ScrollbarTheme::nativeTheme())->painterForScrollbar(scrollbar); 690 690 [painter setDelegate:m_scrollbarPainterDelegate.get()]; 691 691 [m_scrollbarPainterController.get() setVerticalScrollerImp:painter]; … … 699 699 void ScrollAnimatorMac::willRemoveVerticalScrollbar(Scrollbar* scrollbar) 700 700 { 701 #if USE( WK_SCROLLBAR_PAINTER)702 WKScrollbarPainterRefpainter = static_cast<WebCore::ScrollbarThemeMac*>(WebCore::ScrollbarTheme::nativeTheme())->painterForScrollbar(scrollbar);701 #if USE(SCROLLBAR_PAINTER) 702 ScrollbarPainter painter = static_cast<WebCore::ScrollbarThemeMac*>(WebCore::ScrollbarTheme::nativeTheme())->painterForScrollbar(scrollbar); 703 703 [painter setDelegate:nil]; 704 704 [m_scrollbarPainterController.get() setVerticalScrollerImp:nil]; … … 710 710 void ScrollAnimatorMac::didAddHorizontalScrollbar(Scrollbar* scrollbar) 711 711 { 712 #if USE( WK_SCROLLBAR_PAINTER)713 WKScrollbarPainterRefpainter = static_cast<WebCore::ScrollbarThemeMac*>(WebCore::ScrollbarTheme::nativeTheme())->painterForScrollbar(scrollbar);712 #if USE(SCROLLBAR_PAINTER) 713 ScrollbarPainter painter = static_cast<WebCore::ScrollbarThemeMac*>(WebCore::ScrollbarTheme::nativeTheme())->painterForScrollbar(scrollbar); 714 714 [painter setDelegate:m_scrollbarPainterDelegate.get()]; 715 715 [m_scrollbarPainterController.get() setHorizontalScrollerImp:painter]; … … 723 723 void ScrollAnimatorMac::willRemoveHorizontalScrollbar(Scrollbar* scrollbar) 724 724 { 725 #if USE( WK_SCROLLBAR_PAINTER)726 WKScrollbarPainterRefpainter = static_cast<WebCore::ScrollbarThemeMac*>(WebCore::ScrollbarTheme::nativeTheme())->painterForScrollbar(scrollbar);725 #if USE(SCROLLBAR_PAINTER) 726 ScrollbarPainter painter = static_cast<WebCore::ScrollbarThemeMac*>(WebCore::ScrollbarTheme::nativeTheme())->painterForScrollbar(scrollbar); 727 727 [painter setDelegate:nil]; 728 728 [m_scrollbarPainterController.get() setHorizontalScrollerImp:nil]; … … 736 736 m_haveScrolledSincePageLoad = false; 737 737 738 #if USE( WK_SCROLLBAR_PAINTER)738 #if USE(SCROLLBAR_PAINTER) 739 739 if (scrollbarPaintTimerIsActive()) 740 740 stopScrollbarPaintTimer(); … … 1223 1223 void ScrollAnimatorMac::setIsActive() 1224 1224 { 1225 #if USE( WK_SCROLLBAR_PAINTER)1225 #if USE(SCROLLBAR_PAINTER) 1226 1226 if (needsScrollerStyleUpdate()) 1227 1227 updateScrollerStyle(); … … 1229 1229 } 1230 1230 1231 #if USE( WK_SCROLLBAR_PAINTER)1231 #if USE(SCROLLBAR_PAINTER) 1232 1232 void ScrollAnimatorMac::updateScrollerStyle() 1233 1233 { … … 1243 1243 verticalScrollbar->invalidate(); 1244 1244 1245 WKScrollbarPainterRefoldVerticalPainter = [m_scrollbarPainterController.get() verticalScrollerImp];1246 WKScrollbarPainterRefnewVerticalPainter = [NSClassFromString(@"NSScrollerImp") scrollerImpWithStyle:newStyle1245 ScrollbarPainter oldVerticalPainter = [m_scrollbarPainterController.get() verticalScrollerImp]; 1246 ScrollbarPainter newVerticalPainter = [NSClassFromString(@"NSScrollerImp") scrollerImpWithStyle:newStyle 1247 1247 controlSize:(NSControlSize)verticalScrollbar->controlSize() 1248 1248 horizontal:NO … … 1261 1261 horizontalScrollbar->invalidate(); 1262 1262 1263 WKScrollbarPainterRefoldHorizontalPainter = [m_scrollbarPainterController.get() horizontalScrollerImp];1264 WKScrollbarPainterRefnewHorizontalPainter = [NSClassFromString(@"NSScrollerImp") scrollerImpWithStyle:newStyle1263 ScrollbarPainter oldHorizontalPainter = [m_scrollbarPainterController.get() horizontalScrollerImp]; 1264 ScrollbarPainter newHorizontalPainter = [NSClassFromString(@"NSScrollerImp") scrollerImpWithStyle:newStyle 1265 1265 controlSize:(NSControlSize)horizontalScrollbar->controlSize() 1266 1266 horizontal:YES -
trunk/Source/WebCore/platform/mac/ScrollViewMac.mm
r91438 r93445 205 205 } 206 206 207 #if USE( WK_SCROLLBAR_PAINTER)207 #if USE(SCROLLBAR_PAINTER) 208 208 static inline NSScrollerKnobStyle toNSScrollerKnobStyle(ScrollbarOverlayStyle style) 209 209 { … … 221 221 void ScrollView::platformSetScrollbarOverlayStyle(ScrollbarOverlayStyle overlayStyle) 222 222 { 223 #if USE( WK_SCROLLBAR_PAINTER)223 #if USE(SCROLLBAR_PAINTER) 224 224 [scrollView() setScrollerKnobStyle:toNSScrollerKnobStyle(overlayStyle)]; 225 225 #else -
trunk/Source/WebCore/platform/mac/ScrollbarThemeMac.h
r93377 r93445 29 29 #include "ScrollbarThemeComposite.h" 30 30 31 #if USE( WK_SCROLLBAR_PAINTER)32 typedef id WKScrollbarPainterRef;31 #if USE(SCROLLBAR_PAINTER) 32 typedef id ScrollbarPainter; 33 33 #endif 34 34 … … 60 60 virtual void unregisterScrollbar(Scrollbar*); 61 61 62 #if USE( WK_SCROLLBAR_PAINTER)63 void setNewPainterForScrollbar(Scrollbar*, WKScrollbarPainterRef);64 WKScrollbarPainterRefpainterForScrollbar(Scrollbar*);62 #if USE(SCROLLBAR_PAINTER) 63 void setNewPainterForScrollbar(Scrollbar*, ScrollbarPainter); 64 ScrollbarPainter painterForScrollbar(Scrollbar*); 65 65 #endif 66 66 -
trunk/Source/WebCore/platform/mac/ScrollbarThemeMac.mm
r93377 r93445 46 46 namespace WebCore { 47 47 48 #if USE( WK_SCROLLBAR_PAINTER)49 typedef HashMap<Scrollbar*, RetainPtr< WKScrollbarPainterRef> > ScrollbarPainterMap;48 #if USE(SCROLLBAR_PAINTER) 49 typedef HashMap<Scrollbar*, RetainPtr<ScrollbarPainter> > ScrollbarPainterMap; 50 50 #else 51 51 typedef HashSet<Scrollbar*> ScrollbarPainterMap; … … 81 81 ScrollbarPainterMap::iterator end = scrollbarMap()->end(); 82 82 for (ScrollbarPainterMap::iterator it = scrollbarMap()->begin(); it != end; ++it) { 83 #if USE( WK_SCROLLBAR_PAINTER)83 #if USE(SCROLLBAR_PAINTER) 84 84 it->first->styleChanged(); 85 85 it->first->invalidate(); … … 119 119 // cRealButtonLength - cButtonInset 120 120 static int cButtonLength[] = { 14, 10 }; 121 #if !USE( WK_SCROLLBAR_PAINTER)121 #if !USE(SCROLLBAR_PAINTER) 122 122 static int cScrollbarThickness[] = { 15, 11 }; 123 123 static int cButtonInset[] = { 14, 11 }; … … 132 132 static bool gJumpOnTrackClick = false; 133 133 134 #if USE( WK_SCROLLBAR_PAINTER)134 #if USE(SCROLLBAR_PAINTER) 135 135 static ScrollbarButtonsPlacement gButtonPlacement = ScrollbarButtonsNone; 136 136 #else … … 140 140 static void updateArrowPlacement() 141 141 { 142 #if USE( WK_SCROLLBAR_PAINTER)142 #if USE(SCROLLBAR_PAINTER) 143 143 return; 144 144 #endif … … 158 158 void ScrollbarThemeMac::registerScrollbar(Scrollbar* scrollbar) 159 159 { 160 #if USE( WK_SCROLLBAR_PAINTER)160 #if USE(SCROLLBAR_PAINTER) 161 161 bool isHorizontal = scrollbar->orientation() == HorizontalScrollbar; 162 WKScrollbarPainterRefscrollbarPainter = [NSClassFromString(@"NSScrollerImp") scrollerImpWithStyle:wkRecommendedScrollerStyle() controlSize:(NSControlSize)scrollbar->controlSize() horizontal:isHorizontal replacingScrollerImp:nil];162 ScrollbarPainter scrollbarPainter = [NSClassFromString(@"NSScrollerImp") scrollerImpWithStyle:wkRecommendedScrollerStyle() controlSize:(NSControlSize)scrollbar->controlSize() horizontal:isHorizontal replacingScrollerImp:nil]; 163 163 scrollbarMap()->add(scrollbar, scrollbarPainter); 164 164 updateEnabledState(scrollbar); … … 174 174 } 175 175 176 #if USE( WK_SCROLLBAR_PAINTER)177 void ScrollbarThemeMac::setNewPainterForScrollbar(Scrollbar* scrollbar, WKScrollbarPainterRefnewPainter)176 #if USE(SCROLLBAR_PAINTER) 177 void ScrollbarThemeMac::setNewPainterForScrollbar(Scrollbar* scrollbar, ScrollbarPainter newPainter) 178 178 { 179 179 scrollbarMap()->set(scrollbar, newPainter); … … 182 182 } 183 183 184 WKScrollbarPainterRefScrollbarThemeMac::painterForScrollbar(Scrollbar* scrollbar)184 ScrollbarPainter ScrollbarThemeMac::painterForScrollbar(Scrollbar* scrollbar) 185 185 { 186 186 return scrollbarMap()->get(scrollbar).get(); … … 214 214 int ScrollbarThemeMac::scrollbarThickness(ScrollbarControlSize controlSize) 215 215 { 216 #if USE( WK_SCROLLBAR_PAINTER)217 WKScrollbarPainterRef scrollbarPainter = (WKScrollbarPainterRef)[NSClassFromString(@"NSScrollerImp") scrollerImpWithStyle:wkRecommendedScrollerStyle() controlSize:controlSize horizontal:NO replacingScrollerImp:nil];216 #if USE(SCROLLBAR_PAINTER) 217 ScrollbarPainter scrollbarPainter = [NSClassFromString(@"NSScrollerImp") scrollerImpWithStyle:wkRecommendedScrollerStyle() controlSize:controlSize horizontal:NO replacingScrollerImp:nil]; 218 218 return [scrollbarPainter trackBoxWidth]; 219 219 #else … … 224 224 bool ScrollbarThemeMac::usesOverlayScrollbars() const 225 225 { 226 #if USE( WK_SCROLLBAR_PAINTER)226 #if USE(SCROLLBAR_PAINTER) 227 227 return wkRecommendedScrollerStyle() == NSScrollerStyleOverlay; 228 228 #else … … 233 233 void ScrollbarThemeMac::updateScrollbarOverlayStyle(Scrollbar* scrollbar) 234 234 { 235 #if USE( WK_SCROLLBAR_PAINTER)236 WKScrollbarPainterRefpainter = painterForScrollbar(scrollbar);235 #if USE(SCROLLBAR_PAINTER) 236 ScrollbarPainter painter = painterForScrollbar(scrollbar); 237 237 switch (scrollbar->scrollableArea()->scrollbarOverlayStyle()) { 238 238 case ScrollbarOverlayStyleDefault: … … 277 277 { 278 278 int minLengthForThumb; 279 #if USE( WK_SCROLLBAR_PAINTER)280 WKScrollbarPainterRefpainter = scrollbarMap()->get(scrollbar).get();279 #if USE(SCROLLBAR_PAINTER) 280 ScrollbarPainter painter = scrollbarMap()->get(scrollbar).get(); 281 281 minLengthForThumb = [painter knobMinLength] + [painter trackOverlapEndInset] + [painter knobOverlapEndInset] 282 282 + 2 * ([painter trackEndInset] + [painter knobEndInset]); … … 420 420 int ScrollbarThemeMac::minimumThumbLength(Scrollbar* scrollbar) 421 421 { 422 #if USE( WK_SCROLLBAR_PAINTER)422 #if USE(SCROLLBAR_PAINTER) 423 423 return [scrollbarMap()->get(scrollbar).get() knobMinLength]; 424 424 #else … … 461 461 void ScrollbarThemeMac::updateEnabledState(Scrollbar* scrollbar) 462 462 { 463 #if USE( WK_SCROLLBAR_PAINTER)463 #if USE(SCROLLBAR_PAINTER) 464 464 [scrollbarMap()->get(scrollbar).get() setEnabled:scrollbar->enabled()]; 465 465 #else … … 468 468 } 469 469 470 #if USE( WK_SCROLLBAR_PAINTER)471 static void scrollbarPainterPaint( WKScrollbarPainterRefscrollbarPainter, bool enabled, double value, CGFloat proportion, CGRect frameRect)470 #if USE(SCROLLBAR_PAINTER) 471 static void scrollbarPainterPaint(ScrollbarPainter scrollbarPainter, bool enabled, double value, CGFloat proportion, CGRect frameRect) 472 472 { 473 473 [scrollbarPainter setEnabled:enabled]; … … 494 494 bool ScrollbarThemeMac::paint(Scrollbar* scrollbar, GraphicsContext* context, const IntRect& damageRect) 495 495 { 496 #if USE( WK_SCROLLBAR_PAINTER)496 #if USE(SCROLLBAR_PAINTER) 497 497 float value = 0; 498 498 float overhang = 0;
Note: See TracChangeset
for help on using the changeset viewer.