Changeset 93445 in webkit


Ignore:
Timestamp:
Aug 19, 2011 3:34:05 PM (13 years ago)
Author:
Beth Dakin
Message:

https://bugs.webkit.org/show_bug.cgi?id=66590
Re-name scrollbar painter types

Reviewed by Sam Weinig.

Source/JavaScriptCore:

WTF_USE_WK_SCROLLBAR_PAINTER is now WTF_USE_SCROLLBAR_PAINTER since WK no longer
applies.

  • wtf/Platform.h:

Source/WebCore:

Names changed to remove references to WebKitSystemInterface since the
implementation is now in WebCore. And the type names changed to be more Objective-
Cish instead of C++ish
WTF_USE_WK_SCROLLBAR_PAINTER -> WTF_USE_SCROLLBAR_PAINTER
WKScrollbarPainterRef -> ScrollbarPainter
WKScrollbarPainterControllerRef -> ScrollbarPainterController

  • platform/mac/NSScrollerImpDetails.h:
  • platform/mac/ScrollAnimatorMac.h:
  • platform/mac/ScrollAnimatorMac.mm:

(-[ScrollbarPartAnimation initWithScrollbarPainter:part:WebCore::scrollAnimator:WebCore::animateAlphaTo:duration:]):
(-[ScrollbarPainterDelegate setUpAnimation:scrollerPainter:part:WebCore::animateAlphaTo:duration:]):
(-[ScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:]):
(-[ScrollbarPainterDelegate scrollerImp:animateTrackAlphaTo:duration:]):
(WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
(WebCore::ScrollAnimatorMac::~ScrollAnimatorMac):
(WebCore::ScrollAnimatorMac::notifyPositionChanged):
(WebCore::ScrollAnimatorMac::contentAreaWillPaint):
(WebCore::ScrollAnimatorMac::mouseEnteredContentArea):
(WebCore::ScrollAnimatorMac::mouseExitedContentArea):
(WebCore::ScrollAnimatorMac::mouseMovedInContentArea):
(WebCore::ScrollAnimatorMac::willStartLiveResize):
(WebCore::ScrollAnimatorMac::contentsResized):
(WebCore::ScrollAnimatorMac::willEndLiveResize):
(WebCore::ScrollAnimatorMac::contentAreaDidShow):
(WebCore::ScrollAnimatorMac::contentAreaDidHide):
(WebCore::ScrollAnimatorMac::didBeginScrollGesture):
(WebCore::ScrollAnimatorMac::didEndScrollGesture):
(WebCore::ScrollAnimatorMac::didAddVerticalScrollbar):
(WebCore::ScrollAnimatorMac::willRemoveVerticalScrollbar):
(WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar):
(WebCore::ScrollAnimatorMac::willRemoveHorizontalScrollbar):
(WebCore::ScrollAnimatorMac::cancelAnimations):
(WebCore::ScrollAnimatorMac::setIsActive):
(WebCore::ScrollAnimatorMac::updateScrollerStyle):

  • platform/mac/ScrollViewMac.mm:

(WebCore::ScrollView::platformSetScrollbarOverlayStyle):

  • platform/mac/ScrollbarThemeMac.h:
  • platform/mac/ScrollbarThemeMac.mm:

(+[ScrollbarPrefsObserver appearancePrefsChanged:]):
(WebCore::updateArrowPlacement):
(WebCore::ScrollbarThemeMac::registerScrollbar):
(WebCore::ScrollbarThemeMac::setNewPainterForScrollbar):
(WebCore::ScrollbarThemeMac::painterForScrollbar):
(WebCore::ScrollbarThemeMac::scrollbarThickness):
(WebCore::ScrollbarThemeMac::usesOverlayScrollbars):
(WebCore::ScrollbarThemeMac::updateScrollbarOverlayStyle):
(WebCore::ScrollbarThemeMac::hasThumb):
(WebCore::ScrollbarThemeMac::minimumThumbLength):
(WebCore::ScrollbarThemeMac::updateEnabledState):
(WebCore::scrollbarPainterPaint):
(WebCore::ScrollbarThemeMac::paint):

Location:
trunk/Source
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r93378 r93445  
     12011-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
    1122011-08-18  Mark Hahnenberg  <mhahnenberg@apple.com>
    213
  • trunk/Source/JavaScriptCore/wtf/Platform.h

    r92974 r93445  
    556556#define ENABLE_GESTURE_EVENTS 1
    557557#define ENABLE_RUBBER_BANDING 1
    558 #define WTF_USE_WK_SCROLLBAR_PAINTER 1
     558#define WTF_USE_SCROLLBAR_PAINTER 1
    559559#endif
    560560#if !defined(ENABLE_JAVA_BRIDGE)
  • trunk/Source/WebCore/ChangeLog

    r93443 r93445  
     12011-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
    1612011-08-19  Van Lam  <vanlam@google.com>
    262
  • trunk/Source/WebCore/platform/mac/NSScrollerImpDetails.h

    r93377 r93445  
    2929#include "config.h"
    3030
    31 #if USE(WK_SCROLLBAR_PAINTER)
     31#if USE(SCROLLBAR_PAINTER)
    3232@interface NSObject (ScrollbarPainter)
    3333+ (id)scrollerImpWithStyle:(NSScrollerStyle)newScrollerStyle controlSize:(NSControlSize)newControlSize horizontal:(BOOL)horizontal replacingScrollerImp:(id)previous;
  • trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.h

    r93377 r93445  
    4848#endif
    4949
    50 #if USE(WK_SCROLLBAR_PAINTER)
    51 typedef id WKScrollbarPainterControllerRef;
     50#if USE(SCROLLBAR_PAINTER)
     51typedef id ScrollbarPainterController;
    5252#endif
    5353
     
    8686    virtual void setIsActive();
    8787
    88 #if USE(WK_SCROLLBAR_PAINTER)
     88#if USE(SCROLLBAR_PAINTER)
    8989    void updateScrollerStyle();
    9090
     
    100100    RetainPtr<ScrollAnimationHelperDelegate> m_scrollAnimationHelperDelegate;
    101101
    102 #if USE(WK_SCROLLBAR_PAINTER)
    103     RetainPtr<WKScrollbarPainterControllerRef> m_scrollbarPainterController;
     102#if USE(SCROLLBAR_PAINTER)
     103    RetainPtr<ScrollbarPainterController> m_scrollbarPainterController;
    104104    RetainPtr<ScrollbarPainterControllerDelegate> m_scrollbarPainterControllerDelegate;
    105105    RetainPtr<id> m_scrollbarPainterDelegate;
  • trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm

    r93377 r93445  
    149149@end
    150150
    151 #if USE(WK_SCROLLBAR_PAINTER)
     151#if USE(SCROLLBAR_PAINTER)
    152152
    153153@interface ScrollbarPainterControllerDelegate : NSObject
     
    245245@interface ScrollbarPartAnimation : NSAnimation
    246246{
    247     RetainPtr<WKScrollbarPainterRef> _scrollerPainter;
     247    RetainPtr<ScrollbarPainter> _scrollerPainter;
    248248    WebCore::ScrollbarPart _part;
    249249    WebCore::ScrollAnimatorMac* _animator;
     
    251251    CGFloat _newAlpha;
    252252}
    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;
    254254@end
    255255
    256256@implementation ScrollbarPartAnimation
    257257
    258 - (id)initWithScrollbarPainter:(WKScrollbarPainterRef)scrollerPainter part:(WebCore::ScrollbarPart)part scrollAnimator:(WebCore::ScrollAnimatorMac*)scrollAnimator animateAlphaTo:(CGFloat)newAlpha duration:(NSTimeInterval)duration
     258- (id)initWithScrollbarPainter:(ScrollbarPainter)scrollerPainter part:(WebCore::ScrollbarPart)part scrollAnimator:(WebCore::ScrollAnimatorMac*)scrollAnimator animateAlphaTo:(CGFloat)newAlpha duration:(NSTimeInterval)duration
    259259{
    260260    self = [super initWithDuration:duration animationCurve:NSAnimationEaseInOut];
     
    360360}
    361361
    362 - (void)setUpAnimation:(RetainPtr<ScrollbarPartAnimation>&)scrollbarPartAnimation scrollerPainter:(WKScrollbarPainterRef)scrollerPainter part:(WebCore::ScrollbarPart)part animateAlphaTo:(CGFloat)newAlpha duration:(NSTimeInterval)duration
     362- (void)setUpAnimation:(RetainPtr<ScrollbarPartAnimation>&)scrollbarPartAnimation scrollerPainter:(ScrollbarPainter)scrollerPainter part:(WebCore::ScrollbarPart)part animateAlphaTo:(CGFloat)newAlpha duration:(NSTimeInterval)duration
    363363{
    364364    // If the user has scrolled the page, then the scrollbars must be animated here.
     
    408408        return;
    409409
    410     WKScrollbarPainterRef scrollerPainter = (WKScrollbarPainterRef)scrollerImp;
     410    ScrollbarPainter scrollerPainter = (ScrollbarPainter)scrollerImp;
    411411    if ([scrollerImp isHorizontal])
    412412        [self setUpAnimation:_horizontalKnobAnimation scrollerPainter:scrollerPainter part:WebCore::ThumbPart animateAlphaTo:newKnobAlpha duration:duration];
     
    420420        return;
    421421
    422     WKScrollbarPainterRef scrollerPainter = (WKScrollbarPainterRef)scrollerImp;
     422    ScrollbarPainter scrollerPainter = (ScrollbarPainter)scrollerImp;
    423423    if ([scrollerImp isHorizontal])
    424424        [self setUpAnimation:_horizontalTrackAnimation scrollerPainter:scrollerPainter part:WebCore::BackTrackPart animateAlphaTo:newTrackAlpha duration:duration];
     
    444444@end
    445445
    446 #endif // USE(WK_SCROLLBAR_PAINTER)
     446#endif // USE(SCROLLBAR_PAINTER)
    447447
    448448namespace WebCore {
     
    455455ScrollAnimatorMac::ScrollAnimatorMac(ScrollableArea* scrollableArea)
    456456    : ScrollAnimator(scrollableArea)
    457 #if USE(WK_SCROLLBAR_PAINTER)
     457#if USE(SCROLLBAR_PAINTER)
    458458    , m_initialScrollbarPaintTimer(this, &ScrollAnimatorMac::initialScrollbarPaintTimerFired)
    459459#endif
     
    473473    m_scrollAnimationHelper.adoptNS([[NSClassFromString(@"NSScrollAnimationHelper") alloc] initWithDelegate:m_scrollAnimationHelperDelegate.get()]);
    474474
    475 #if USE(WK_SCROLLBAR_PAINTER)
     475#if USE(SCROLLBAR_PAINTER)
    476476    m_scrollbarPainterControllerDelegate.adoptNS([[ScrollbarPainterControllerDelegate alloc] initWithScrollAnimator:this]);
    477477    m_scrollbarPainterController = [[[NSClassFromString(@"NSScrollerImpPair") alloc] init] autorelease];
     
    485485ScrollAnimatorMac::~ScrollAnimatorMac()
    486486{
    487 #if USE(WK_SCROLLBAR_PAINTER)
     487#if USE(SCROLLBAR_PAINTER)
    488488    [m_scrollbarPainterControllerDelegate.get() scrollAnimatorDestroyed];
    489489    [m_scrollbarPainterController.get() setDelegate:nil];
     
    601601void ScrollAnimatorMac::notifyPositionChanged()
    602602{
    603 #if USE(WK_SCROLLBAR_PAINTER)
     603#if USE(SCROLLBAR_PAINTER)
    604604    [m_scrollbarPainterController.get() contentAreaScrolled];
    605605#endif
     
    609609void ScrollAnimatorMac::contentAreaWillPaint() const
    610610{
    611 #if USE(WK_SCROLLBAR_PAINTER)
     611#if USE(SCROLLBAR_PAINTER)
    612612    [m_scrollbarPainterController.get() contentAreaWillDraw];
    613613#endif
     
    616616void ScrollAnimatorMac::mouseEnteredContentArea() const
    617617{
    618 #if USE(WK_SCROLLBAR_PAINTER)
     618#if USE(SCROLLBAR_PAINTER)
    619619    [m_scrollbarPainterController.get() mouseEnteredContentArea];
    620620#endif
     
    623623void ScrollAnimatorMac::mouseExitedContentArea() const
    624624{
    625 #if USE(WK_SCROLLBAR_PAINTER)
     625#if USE(SCROLLBAR_PAINTER)
    626626    [m_scrollbarPainterController.get() mouseExitedContentArea];
    627627#endif
     
    630630void ScrollAnimatorMac::mouseMovedInContentArea() const
    631631{
    632 #if USE(WK_SCROLLBAR_PAINTER)
     632#if USE(SCROLLBAR_PAINTER)
    633633    [m_scrollbarPainterController.get() mouseMovedInContentArea];
    634634#endif
     
    637637void ScrollAnimatorMac::willStartLiveResize()
    638638{
    639 #if USE(WK_SCROLLBAR_PAINTER)
     639#if USE(SCROLLBAR_PAINTER)
    640640    [m_scrollbarPainterController.get() startLiveResize];
    641641#endif
     
    644644void ScrollAnimatorMac::contentsResized() const
    645645{
    646 #if USE(WK_SCROLLBAR_PAINTER)
     646#if USE(SCROLLBAR_PAINTER)
    647647    [m_scrollbarPainterController.get() contentAreaDidResize];
    648648#endif
     
    651651void ScrollAnimatorMac::willEndLiveResize()
    652652{
    653 #if USE(WK_SCROLLBAR_PAINTER)
     653#if USE(SCROLLBAR_PAINTER)
    654654    [m_scrollbarPainterController.get() endLiveResize];
    655655#endif
     
    658658void ScrollAnimatorMac::contentAreaDidShow() const
    659659{
    660 #if USE(WK_SCROLLBAR_PAINTER)
     660#if USE(SCROLLBAR_PAINTER)
    661661    [m_scrollbarPainterController.get() windowOrderedIn];
    662662#endif
     
    665665void ScrollAnimatorMac::contentAreaDidHide() const
    666666{
    667 #if USE(WK_SCROLLBAR_PAINTER)
     667#if USE(SCROLLBAR_PAINTER)
    668668    [m_scrollbarPainterController.get() windowOrderedOut];
    669669#endif
     
    672672void ScrollAnimatorMac::didBeginScrollGesture() const
    673673{
    674 #if USE(WK_SCROLLBAR_PAINTER)
     674#if USE(SCROLLBAR_PAINTER)
    675675    [m_scrollbarPainterController.get() beginScrollGesture];
    676676#endif
     
    679679void ScrollAnimatorMac::didEndScrollGesture() const
    680680{
    681 #if USE(WK_SCROLLBAR_PAINTER)
     681#if USE(SCROLLBAR_PAINTER)
    682682    [m_scrollbarPainterController.get() endScrollGesture];
    683683#endif
     
    686686void ScrollAnimatorMac::didAddVerticalScrollbar(Scrollbar* scrollbar)
    687687{
    688 #if USE(WK_SCROLLBAR_PAINTER)
    689     WKScrollbarPainterRef painter = 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);
    690690    [painter setDelegate:m_scrollbarPainterDelegate.get()];
    691691    [m_scrollbarPainterController.get() setVerticalScrollerImp:painter];
     
    699699void ScrollAnimatorMac::willRemoveVerticalScrollbar(Scrollbar* scrollbar)
    700700{
    701 #if USE(WK_SCROLLBAR_PAINTER)
    702     WKScrollbarPainterRef painter = 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);
    703703    [painter setDelegate:nil];
    704704    [m_scrollbarPainterController.get() setVerticalScrollerImp:nil];
     
    710710void ScrollAnimatorMac::didAddHorizontalScrollbar(Scrollbar* scrollbar)
    711711{
    712 #if USE(WK_SCROLLBAR_PAINTER)
    713     WKScrollbarPainterRef painter = 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);
    714714    [painter setDelegate:m_scrollbarPainterDelegate.get()];
    715715    [m_scrollbarPainterController.get() setHorizontalScrollerImp:painter];
     
    723723void ScrollAnimatorMac::willRemoveHorizontalScrollbar(Scrollbar* scrollbar)
    724724{
    725 #if USE(WK_SCROLLBAR_PAINTER)
    726     WKScrollbarPainterRef painter = 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);
    727727    [painter setDelegate:nil];
    728728    [m_scrollbarPainterController.get() setHorizontalScrollerImp:nil];
     
    736736    m_haveScrolledSincePageLoad = false;
    737737
    738 #if USE(WK_SCROLLBAR_PAINTER)
     738#if USE(SCROLLBAR_PAINTER)
    739739    if (scrollbarPaintTimerIsActive())
    740740        stopScrollbarPaintTimer();
     
    12231223void ScrollAnimatorMac::setIsActive()
    12241224{
    1225 #if USE(WK_SCROLLBAR_PAINTER)
     1225#if USE(SCROLLBAR_PAINTER)
    12261226    if (needsScrollerStyleUpdate())
    12271227        updateScrollerStyle();
     
    12291229}
    12301230
    1231 #if USE(WK_SCROLLBAR_PAINTER)
     1231#if USE(SCROLLBAR_PAINTER)
    12321232void ScrollAnimatorMac::updateScrollerStyle()
    12331233{
     
    12431243        verticalScrollbar->invalidate();
    12441244
    1245         WKScrollbarPainterRef oldVerticalPainter = [m_scrollbarPainterController.get() verticalScrollerImp];
    1246         WKScrollbarPainterRef newVerticalPainter = [NSClassFromString(@"NSScrollerImp") scrollerImpWithStyle:newStyle
     1245        ScrollbarPainter oldVerticalPainter = [m_scrollbarPainterController.get() verticalScrollerImp];
     1246        ScrollbarPainter newVerticalPainter = [NSClassFromString(@"NSScrollerImp") scrollerImpWithStyle:newStyle
    12471247                                                                                    controlSize:(NSControlSize)verticalScrollbar->controlSize()
    12481248                                                                                    horizontal:NO
     
    12611261        horizontalScrollbar->invalidate();
    12621262
    1263         WKScrollbarPainterRef oldHorizontalPainter = [m_scrollbarPainterController.get() horizontalScrollerImp];
    1264         WKScrollbarPainterRef newHorizontalPainter = [NSClassFromString(@"NSScrollerImp") scrollerImpWithStyle:newStyle
     1263        ScrollbarPainter oldHorizontalPainter = [m_scrollbarPainterController.get() horizontalScrollerImp];
     1264        ScrollbarPainter newHorizontalPainter = [NSClassFromString(@"NSScrollerImp") scrollerImpWithStyle:newStyle
    12651265                                                                                    controlSize:(NSControlSize)horizontalScrollbar->controlSize()
    12661266                                                                                    horizontal:YES
  • trunk/Source/WebCore/platform/mac/ScrollViewMac.mm

    r91438 r93445  
    205205}
    206206
    207 #if USE(WK_SCROLLBAR_PAINTER)
     207#if USE(SCROLLBAR_PAINTER)
    208208static inline NSScrollerKnobStyle toNSScrollerKnobStyle(ScrollbarOverlayStyle style)
    209209{
     
    221221void ScrollView::platformSetScrollbarOverlayStyle(ScrollbarOverlayStyle overlayStyle)
    222222{
    223 #if USE(WK_SCROLLBAR_PAINTER)
     223#if USE(SCROLLBAR_PAINTER)
    224224    [scrollView() setScrollerKnobStyle:toNSScrollerKnobStyle(overlayStyle)];
    225225#else
  • trunk/Source/WebCore/platform/mac/ScrollbarThemeMac.h

    r93377 r93445  
    2929#include "ScrollbarThemeComposite.h"
    3030
    31 #if USE(WK_SCROLLBAR_PAINTER)
    32 typedef id WKScrollbarPainterRef;
     31#if USE(SCROLLBAR_PAINTER)
     32typedef id ScrollbarPainter;
    3333#endif
    3434
     
    6060    virtual void unregisterScrollbar(Scrollbar*);
    6161
    62 #if USE(WK_SCROLLBAR_PAINTER)
    63     void setNewPainterForScrollbar(Scrollbar*, WKScrollbarPainterRef);
    64     WKScrollbarPainterRef painterForScrollbar(Scrollbar*);
     62#if USE(SCROLLBAR_PAINTER)
     63    void setNewPainterForScrollbar(Scrollbar*, ScrollbarPainter);
     64    ScrollbarPainter painterForScrollbar(Scrollbar*);
    6565#endif
    6666
  • trunk/Source/WebCore/platform/mac/ScrollbarThemeMac.mm

    r93377 r93445  
    4646namespace WebCore {
    4747
    48 #if USE(WK_SCROLLBAR_PAINTER)
    49 typedef HashMap<Scrollbar*, RetainPtr<WKScrollbarPainterRef> > ScrollbarPainterMap;
     48#if USE(SCROLLBAR_PAINTER)
     49typedef HashMap<Scrollbar*, RetainPtr<ScrollbarPainter> > ScrollbarPainterMap;
    5050#else
    5151typedef HashSet<Scrollbar*> ScrollbarPainterMap;
     
    8181    ScrollbarPainterMap::iterator end = scrollbarMap()->end();
    8282    for (ScrollbarPainterMap::iterator it = scrollbarMap()->begin(); it != end; ++it) {
    83 #if USE(WK_SCROLLBAR_PAINTER)
     83#if USE(SCROLLBAR_PAINTER)
    8484        it->first->styleChanged();
    8585        it->first->invalidate();
     
    119119// cRealButtonLength - cButtonInset
    120120static int cButtonLength[] = { 14, 10 };
    121 #if !USE(WK_SCROLLBAR_PAINTER)
     121#if !USE(SCROLLBAR_PAINTER)
    122122static int cScrollbarThickness[] = { 15, 11 };
    123123static int cButtonInset[] = { 14, 11 };
     
    132132static bool gJumpOnTrackClick = false;
    133133
    134 #if USE(WK_SCROLLBAR_PAINTER)
     134#if USE(SCROLLBAR_PAINTER)
    135135static ScrollbarButtonsPlacement gButtonPlacement = ScrollbarButtonsNone;
    136136#else
     
    140140static void updateArrowPlacement()
    141141{
    142 #if USE(WK_SCROLLBAR_PAINTER)
     142#if USE(SCROLLBAR_PAINTER)
    143143    return;
    144144#endif
     
    158158void ScrollbarThemeMac::registerScrollbar(Scrollbar* scrollbar)
    159159{
    160 #if USE(WK_SCROLLBAR_PAINTER)
     160#if USE(SCROLLBAR_PAINTER)
    161161    bool isHorizontal = scrollbar->orientation() == HorizontalScrollbar;
    162     WKScrollbarPainterRef scrollbarPainter = [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];
    163163    scrollbarMap()->add(scrollbar, scrollbarPainter);
    164164    updateEnabledState(scrollbar);
     
    174174}
    175175
    176 #if USE(WK_SCROLLBAR_PAINTER)
    177 void ScrollbarThemeMac::setNewPainterForScrollbar(Scrollbar* scrollbar, WKScrollbarPainterRef newPainter)
     176#if USE(SCROLLBAR_PAINTER)
     177void ScrollbarThemeMac::setNewPainterForScrollbar(Scrollbar* scrollbar, ScrollbarPainter newPainter)
    178178{
    179179    scrollbarMap()->set(scrollbar, newPainter);
     
    182182}
    183183
    184 WKScrollbarPainterRef ScrollbarThemeMac::painterForScrollbar(Scrollbar* scrollbar)
     184ScrollbarPainter ScrollbarThemeMac::painterForScrollbar(Scrollbar* scrollbar)
    185185{
    186186    return scrollbarMap()->get(scrollbar).get();
     
    214214int ScrollbarThemeMac::scrollbarThickness(ScrollbarControlSize controlSize)
    215215{
    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];
    218218    return [scrollbarPainter trackBoxWidth];
    219219#else
     
    224224bool ScrollbarThemeMac::usesOverlayScrollbars() const
    225225{
    226 #if USE(WK_SCROLLBAR_PAINTER)
     226#if USE(SCROLLBAR_PAINTER)
    227227    return wkRecommendedScrollerStyle() == NSScrollerStyleOverlay;
    228228#else
     
    233233void ScrollbarThemeMac::updateScrollbarOverlayStyle(Scrollbar* scrollbar)
    234234{
    235 #if USE(WK_SCROLLBAR_PAINTER)
    236     WKScrollbarPainterRef painter = painterForScrollbar(scrollbar);
     235#if USE(SCROLLBAR_PAINTER)
     236    ScrollbarPainter painter = painterForScrollbar(scrollbar);
    237237    switch (scrollbar->scrollableArea()->scrollbarOverlayStyle()) {
    238238    case ScrollbarOverlayStyleDefault:
     
    277277{
    278278    int minLengthForThumb;
    279 #if USE(WK_SCROLLBAR_PAINTER)
    280     WKScrollbarPainterRef painter = scrollbarMap()->get(scrollbar).get();
     279#if USE(SCROLLBAR_PAINTER)
     280    ScrollbarPainter painter = scrollbarMap()->get(scrollbar).get();
    281281    minLengthForThumb = [painter knobMinLength] + [painter trackOverlapEndInset] + [painter knobOverlapEndInset]
    282282        + 2 * ([painter trackEndInset] + [painter knobEndInset]);
     
    420420int ScrollbarThemeMac::minimumThumbLength(Scrollbar* scrollbar)
    421421{
    422 #if USE(WK_SCROLLBAR_PAINTER)
     422#if USE(SCROLLBAR_PAINTER)
    423423    return [scrollbarMap()->get(scrollbar).get() knobMinLength];
    424424#else
     
    461461void ScrollbarThemeMac::updateEnabledState(Scrollbar* scrollbar)
    462462{
    463 #if USE(WK_SCROLLBAR_PAINTER)
     463#if USE(SCROLLBAR_PAINTER)
    464464    [scrollbarMap()->get(scrollbar).get() setEnabled:scrollbar->enabled()];
    465465#else
     
    468468}
    469469
    470 #if USE(WK_SCROLLBAR_PAINTER)
    471 static void scrollbarPainterPaint(WKScrollbarPainterRef scrollbarPainter, bool enabled, double value, CGFloat proportion, CGRect frameRect)
     470#if USE(SCROLLBAR_PAINTER)
     471static void scrollbarPainterPaint(ScrollbarPainter scrollbarPainter, bool enabled, double value, CGFloat proportion, CGRect frameRect)
    472472{
    473473    [scrollbarPainter setEnabled:enabled];
     
    494494bool ScrollbarThemeMac::paint(Scrollbar* scrollbar, GraphicsContext* context, const IntRect& damageRect)
    495495{
    496 #if USE(WK_SCROLLBAR_PAINTER)
     496#if USE(SCROLLBAR_PAINTER)
    497497    float value = 0;
    498498    float overhang = 0;
Note: See TracChangeset for help on using the changeset viewer.