Title: [101878] branches/safari-534.53-branch/Source

Diff

Modified: branches/safari-534.53-branch/Source/_javascript_Core/ChangeLog (101877 => 101878)


--- branches/safari-534.53-branch/Source/_javascript_Core/ChangeLog	2011-12-03 00:21:07 UTC (rev 101877)
+++ branches/safari-534.53-branch/Source/_javascript_Core/ChangeLog	2011-12-03 00:41:34 UTC (rev 101878)
@@ -1,3 +1,18 @@
+2011-12-02  Lucas Forschler  <[email protected]>
+
+    Merge 93445
+
+    2011-08-19  Beth Dakin  <[email protected]>
+
+            https://bugs.webkit.org/show_bug.cgi?id=66590
+            Re-name scrollbar painter types
+
+            Reviewed by Sam Weinig.
+
+            WTF_USE_WK_SCROLLBAR_PAINTER is now WTF_USE_SCROLLBAR_PAINTER since WK no longer 
+            applies.
+            * wtf/Platform.h:
+
 2011-10-26  Lucas Forschler  <[email protected]>
 
     Merge fix for 10351765.

Modified: branches/safari-534.53-branch/Source/_javascript_Core/wtf/Platform.h (101877 => 101878)


--- branches/safari-534.53-branch/Source/_javascript_Core/wtf/Platform.h	2011-12-03 00:21:07 UTC (rev 101877)
+++ branches/safari-534.53-branch/Source/_javascript_Core/wtf/Platform.h	2011-12-03 00:41:34 UTC (rev 101878)
@@ -624,7 +624,7 @@
 #if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
 #define ENABLE_GESTURE_EVENTS 1
 #define ENABLE_RUBBER_BANDING 1
-#define WTF_USE_WK_SCROLLBAR_PAINTER 1
+#define WTF_USE_SCROLLBAR_PAINTER 1
 #endif
 #if !defined(ENABLE_JAVA_BRIDGE)
 #define ENABLE_JAVA_BRIDGE 1

Modified: branches/safari-534.53-branch/Source/WebCore/ChangeLog (101877 => 101878)


--- branches/safari-534.53-branch/Source/WebCore/ChangeLog	2011-12-03 00:21:07 UTC (rev 101877)
+++ branches/safari-534.53-branch/Source/WebCore/ChangeLog	2011-12-03 00:41:34 UTC (rev 101878)
@@ -1,5 +1,69 @@
 2011-12-02  Lucas Forschler  <[email protected]>
 
+    Merge 93445
+
+    2011-08-19  Beth Dakin  <[email protected]>
+
+            https://bugs.webkit.org/show_bug.cgi?id=66590
+            Re-name scrollbar painter types
+
+            Reviewed by Sam Weinig.
+
+            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):
+
+2011-12-02  Lucas Forschler  <[email protected]>
+
     Merge 93377
 
     2011-08-18  Beth Dakin  <[email protected]>

Modified: branches/safari-534.53-branch/Source/WebCore/platform/mac/NSScrollerImpDetails.h (101877 => 101878)


--- branches/safari-534.53-branch/Source/WebCore/platform/mac/NSScrollerImpDetails.h	2011-12-03 00:21:07 UTC (rev 101877)
+++ branches/safari-534.53-branch/Source/WebCore/platform/mac/NSScrollerImpDetails.h	2011-12-03 00:41:34 UTC (rev 101878)
@@ -28,7 +28,7 @@
 
 #include "config.h"
 
-#if USE(WK_SCROLLBAR_PAINTER)
+#if USE(SCROLLBAR_PAINTER)
 @interface NSObject (ScrollbarPainter)
 + (id)scrollerImpWithStyle:(NSScrollerStyle)newScrollerStyle controlSize:(NSControlSize)newControlSize horizontal:(BOOL)horizontal replacingScrollerImp:(id)previous;
 - (CGFloat)knobAlpha;

Modified: branches/safari-534.53-branch/Source/WebCore/platform/mac/ScrollAnimatorMac.h (101877 => 101878)


--- branches/safari-534.53-branch/Source/WebCore/platform/mac/ScrollAnimatorMac.h	2011-12-03 00:21:07 UTC (rev 101877)
+++ branches/safari-534.53-branch/Source/WebCore/platform/mac/ScrollAnimatorMac.h	2011-12-03 00:41:34 UTC (rev 101878)
@@ -47,8 +47,8 @@
 class ScrollbarPainterDelegate;
 #endif
 
-#if USE(WK_SCROLLBAR_PAINTER)
-typedef id WKScrollbarPainterControllerRef;
+#if USE(SCROLLBAR_PAINTER)
+typedef id ScrollbarPainterController;
 #endif
 
 namespace WebCore {
@@ -85,7 +85,7 @@
 
     virtual void setIsActive();
 
-#if USE(WK_SCROLLBAR_PAINTER)
+#if USE(SCROLLBAR_PAINTER)
     void updateScrollerStyle();
 
     bool scrollbarPaintTimerIsActive() const;
@@ -99,8 +99,8 @@
     RetainPtr<id> m_scrollAnimationHelper;
     RetainPtr<ScrollAnimationHelperDelegate> m_scrollAnimationHelperDelegate;
 
-#if USE(WK_SCROLLBAR_PAINTER)
-    RetainPtr<WKScrollbarPainterControllerRef> m_scrollbarPainterController;
+#if USE(SCROLLBAR_PAINTER)
+    RetainPtr<ScrollbarPainterController> m_scrollbarPainterController;
     RetainPtr<ScrollbarPainterControllerDelegate> m_scrollbarPainterControllerDelegate;
     RetainPtr<id> m_scrollbarPainterDelegate;
 

Modified: branches/safari-534.53-branch/Source/WebCore/platform/mac/ScrollAnimatorMac.mm (101877 => 101878)


--- branches/safari-534.53-branch/Source/WebCore/platform/mac/ScrollAnimatorMac.mm	2011-12-03 00:21:07 UTC (rev 101877)
+++ branches/safari-534.53-branch/Source/WebCore/platform/mac/ScrollAnimatorMac.mm	2011-12-03 00:41:34 UTC (rev 101878)
@@ -149,7 +149,7 @@
 
 @end
 
-#if USE(WK_SCROLLBAR_PAINTER)
+#if USE(SCROLLBAR_PAINTER)
 
 @interface ScrollbarPainterControllerDelegate : NSObject
 {
@@ -245,18 +245,18 @@
 
 @interface ScrollbarPartAnimation : NSAnimation
 {
-    RetainPtr<WKScrollbarPainterRef> _scrollerPainter;
+    RetainPtr<ScrollbarPainter> _scrollerPainter;
     WebCore::ScrollbarPart _part;
     WebCore::ScrollAnimatorMac* _animator;
     CGFloat _initialAlpha;
     CGFloat _newAlpha;
 }
-- (id)initWithScrollbarPainter:(WKScrollbarPainterRef)scrollerPainter part:(WebCore::ScrollbarPart)part scrollAnimator:(WebCore::ScrollAnimatorMac*)scrollAnimator animateAlphaTo:(CGFloat)newAlpha duration:(NSTimeInterval)duration;
+- (id)initWithScrollbarPainter:(ScrollbarPainter)scrollerPainter part:(WebCore::ScrollbarPart)part scrollAnimator:(WebCore::ScrollAnimatorMac*)scrollAnimator animateAlphaTo:(CGFloat)newAlpha duration:(NSTimeInterval)duration;
 @end
 
 @implementation ScrollbarPartAnimation
 
-- (id)initWithScrollbarPainter:(WKScrollbarPainterRef)scrollerPainter part:(WebCore::ScrollbarPart)part scrollAnimator:(WebCore::ScrollAnimatorMac*)scrollAnimator animateAlphaTo:(CGFloat)newAlpha duration:(NSTimeInterval)duration
+- (id)initWithScrollbarPainter:(ScrollbarPainter)scrollerPainter part:(WebCore::ScrollbarPart)part scrollAnimator:(WebCore::ScrollAnimatorMac*)scrollAnimator animateAlphaTo:(CGFloat)newAlpha duration:(NSTimeInterval)duration
 {
     self = [super initWithDuration:duration animationCurve:NSAnimationEaseInOut];
     if (!self)
@@ -364,7 +364,7 @@
     return dummyLayer;
 }
 
-- (void)setUpAnimation:(RetainPtr<ScrollbarPartAnimation>&)scrollbarPartAnimation scrollerPainter:(WKScrollbarPainterRef)scrollerPainter part:(WebCore::ScrollbarPart)part animateAlphaTo:(CGFloat)newAlpha duration:(NSTimeInterval)duration
+- (void)setUpAnimation:(RetainPtr<ScrollbarPartAnimation>&)scrollbarPartAnimation scrollerPainter:(ScrollbarPainter)scrollerPainter part:(WebCore::ScrollbarPart)part animateAlphaTo:(CGFloat)newAlpha duration:(NSTimeInterval)duration
 {
     // If the user has scrolled the page, then the scrollbars must be animated here. 
     // This overrides the early returns.
@@ -412,7 +412,7 @@
     if (!_animator)
         return;
 
-    WKScrollbarPainterRef scrollerPainter = (WKScrollbarPainterRef)scrollerImp;
+    ScrollbarPainter scrollerPainter = (ScrollbarPainter)scrollerImp;
     if ([scrollerImp isHorizontal])
         [self setUpAnimation:_horizontalKnobAnimation scrollerPainter:scrollerPainter part:WebCore::ThumbPart animateAlphaTo:newKnobAlpha duration:duration];
     else
@@ -424,7 +424,7 @@
     if (!_animator)
         return;
 
-    WKScrollbarPainterRef scrollerPainter = (WKScrollbarPainterRef)scrollerImp;
+    ScrollbarPainter scrollerPainter = (ScrollbarPainter)scrollerImp;
     if ([scrollerImp isHorizontal])
         [self setUpAnimation:_horizontalTrackAnimation scrollerPainter:scrollerPainter part:WebCore::BackTrackPart animateAlphaTo:newTrackAlpha duration:duration];
     else
@@ -450,7 +450,7 @@
 
 @end
 
-#endif // USE(WK_SCROLLBAR_PAINTER)
+#endif // USE(SCROLLBAR_PAINTER)
 
 namespace WebCore {
 
@@ -461,7 +461,7 @@
 
 ScrollAnimatorMac::ScrollAnimatorMac(ScrollableArea* scrollableArea)
     : ScrollAnimator(scrollableArea)
-#if USE(WK_SCROLLBAR_PAINTER)
+#if USE(SCROLLBAR_PAINTER)
     , m_initialScrollbarPaintTimer(this, &ScrollAnimatorMac::initialScrollbarPaintTimerFired)
 #endif
 #if ENABLE(RUBBER_BANDING)
@@ -479,7 +479,7 @@
     m_scrollAnimationHelperDelegate.adoptNS([[ScrollAnimationHelperDelegate alloc] initWithScrollAnimator:this]);
     m_scrollAnimationHelper.adoptNS([[NSClassFromString(@"NSScrollAnimationHelper") alloc] initWithDelegate:m_scrollAnimationHelperDelegate.get()]);
 
-#if USE(WK_SCROLLBAR_PAINTER)
+#if USE(SCROLLBAR_PAINTER)
     m_scrollbarPainterControllerDelegate.adoptNS([[ScrollbarPainterControllerDelegate alloc] initWithScrollAnimator:this]);
     m_scrollbarPainterController = [[[NSClassFromString(@"NSScrollerImpPair") alloc] init] autorelease];
     [m_scrollbarPainterController.get() setDelegate:m_scrollbarPainterControllerDelegate.get()];
@@ -491,7 +491,7 @@
 
 ScrollAnimatorMac::~ScrollAnimatorMac()
 {
-#if USE(WK_SCROLLBAR_PAINTER)
+#if USE(SCROLLBAR_PAINTER)
     BEGIN_BLOCK_OBJC_EXCEPTIONS;
     [m_scrollbarPainterControllerDelegate.get() scrollAnimatorDestroyed];
     [m_scrollbarPainterController.get() setDelegate:nil];
@@ -609,7 +609,7 @@
 
 void ScrollAnimatorMac::notityPositionChanged()
 {
-#if USE(WK_SCROLLBAR_PAINTER)
+#if USE(SCROLLBAR_PAINTER)
     // This function is called when a page is going into the page cache, but the page 
     // isn't really scrolling in that case. We should only pass the message on to the
     // ScrollbarPainterController when we're really scrolling on an active page.
@@ -623,7 +623,7 @@
 {
     if (!scrollableArea()->isOnActivePage()) 
         return;
-#if USE(WK_SCROLLBAR_PAINTER)
+#if USE(SCROLLBAR_PAINTER)
     [m_scrollbarPainterController.get() contentAreaWillDraw];
 #endif
 }
@@ -632,7 +632,7 @@
 {
     if (!scrollableArea()->isOnActivePage()) 
         return;
-#if USE(WK_SCROLLBAR_PAINTER)
+#if USE(SCROLLBAR_PAINTER)
     [m_scrollbarPainterController.get() mouseEnteredContentArea];
 #endif
 }
@@ -641,7 +641,7 @@
 {
     if (!scrollableArea()->isOnActivePage()) 
         return;
-#if USE(WK_SCROLLBAR_PAINTER)
+#if USE(SCROLLBAR_PAINTER)
     [m_scrollbarPainterController.get() mouseExitedContentArea];
 #endif
 }
@@ -650,7 +650,7 @@
 {
     if (!scrollableArea()->isOnActivePage()) 
         return;
-#if USE(WK_SCROLLBAR_PAINTER)
+#if USE(SCROLLBAR_PAINTER)
     [m_scrollbarPainterController.get() mouseMovedInContentArea];
 #endif
 }
@@ -659,7 +659,7 @@
 {
     if (!scrollableArea()->isOnActivePage()) 
          return;
-#if USE(WK_SCROLLBAR_PAINTER)
+#if USE(SCROLLBAR_PAINTER)
     [m_scrollbarPainterController.get() startLiveResize];
 #endif
 }
@@ -668,7 +668,7 @@
 {
     if (!scrollableArea()->isOnActivePage()) 
           return;
-#if USE(WK_SCROLLBAR_PAINTER)
+#if USE(SCROLLBAR_PAINTER)
     [m_scrollbarPainterController.get() contentAreaDidResize];
 #endif
 }
@@ -677,7 +677,7 @@
 {
     if (!scrollableArea()->isOnActivePage()) 
          return;
-#if USE(WK_SCROLLBAR_PAINTER)
+#if USE(SCROLLBAR_PAINTER)
     [m_scrollbarPainterController.get() endLiveResize];
 #endif
 }
@@ -686,7 +686,7 @@
 {
     if (!scrollableArea()->isOnActivePage()) 
          return;
-#if USE(WK_SCROLLBAR_PAINTER)
+#if USE(SCROLLBAR_PAINTER)
     [m_scrollbarPainterController.get() windowOrderedIn];
 #endif
 }
@@ -695,7 +695,7 @@
 {
     if (!scrollableArea()->isOnActivePage()) 
          return;
-#if USE(WK_SCROLLBAR_PAINTER)
+#if USE(SCROLLBAR_PAINTER)
     [m_scrollbarPainterController.get() windowOrderedOut];
 #endif
 }
@@ -704,7 +704,7 @@
 {
     if (!scrollableArea()->isOnActivePage()) 
         return;
-#if USE(WK_SCROLLBAR_PAINTER)
+#if USE(SCROLLBAR_PAINTER)
     [m_scrollbarPainterController.get() beginScrollGesture];
 #endif
 }
@@ -713,15 +713,15 @@
 {
     if (!scrollableArea()->isOnActivePage()) 
          return;   
-#if USE(WK_SCROLLBAR_PAINTER)
+#if USE(SCROLLBAR_PAINTER)
     [m_scrollbarPainterController.get() endScrollGesture];
 #endif
 }
 
 void ScrollAnimatorMac::didAddVerticalScrollbar(Scrollbar* scrollbar)
 {
-#if USE(WK_SCROLLBAR_PAINTER)
-    WKScrollbarPainterRef painter = static_cast<WebCore::ScrollbarThemeMac*>(WebCore::ScrollbarTheme::nativeTheme())->painterForScrollbar(scrollbar);
+#if USE(SCROLLBAR_PAINTER)
+    ScrollbarPainter painter = static_cast<WebCore::ScrollbarThemeMac*>(WebCore::ScrollbarTheme::nativeTheme())->painterForScrollbar(scrollbar);
     [painter setDelegate:m_scrollbarPainterDelegate.get()];
     [m_scrollbarPainterController.get() setVerticalScrollerImp:painter];
     if (scrollableArea()->inLiveResize())
@@ -733,8 +733,8 @@
 
 void ScrollAnimatorMac::willRemoveVerticalScrollbar(Scrollbar* scrollbar)
 {
-#if USE(WK_SCROLLBAR_PAINTER)
-    WKScrollbarPainterRef painter = static_cast<WebCore::ScrollbarThemeMac*>(WebCore::ScrollbarTheme::nativeTheme())->painterForScrollbar(scrollbar);
+#if USE(SCROLLBAR_PAINTER)
+    ScrollbarPainter painter = static_cast<WebCore::ScrollbarThemeMac*>(WebCore::ScrollbarTheme::nativeTheme())->painterForScrollbar(scrollbar);
     [painter setDelegate:nil];
     [m_scrollbarPainterController.get() setVerticalScrollerImp:nil];
 #else
@@ -744,8 +744,8 @@
 
 void ScrollAnimatorMac::didAddHorizontalScrollbar(Scrollbar* scrollbar)
 {
-#if USE(WK_SCROLLBAR_PAINTER)
-    WKScrollbarPainterRef painter = static_cast<WebCore::ScrollbarThemeMac*>(WebCore::ScrollbarTheme::nativeTheme())->painterForScrollbar(scrollbar);
+#if USE(SCROLLBAR_PAINTER)
+    ScrollbarPainter painter = static_cast<WebCore::ScrollbarThemeMac*>(WebCore::ScrollbarTheme::nativeTheme())->painterForScrollbar(scrollbar);
     [painter setDelegate:m_scrollbarPainterDelegate.get()];
     [m_scrollbarPainterController.get() setHorizontalScrollerImp:painter];
     if (scrollableArea()->inLiveResize())
@@ -757,8 +757,8 @@
 
 void ScrollAnimatorMac::willRemoveHorizontalScrollbar(Scrollbar* scrollbar)
 {
-#if USE(WK_SCROLLBAR_PAINTER)
-    WKScrollbarPainterRef painter = static_cast<WebCore::ScrollbarThemeMac*>(WebCore::ScrollbarTheme::nativeTheme())->painterForScrollbar(scrollbar);
+#if USE(SCROLLBAR_PAINTER)
+    ScrollbarPainter painter = static_cast<WebCore::ScrollbarThemeMac*>(WebCore::ScrollbarTheme::nativeTheme())->painterForScrollbar(scrollbar);
     [painter setDelegate:nil];
     [m_scrollbarPainterController.get() setHorizontalScrollerImp:nil];
 #else
@@ -770,7 +770,7 @@
 {
     m_haveScrolledSincePageLoad = false;
 
-#if USE(WK_SCROLLBAR_PAINTER)
+#if USE(SCROLLBAR_PAINTER)
     if (scrollbarPaintTimerIsActive())
         stopScrollbarPaintTimer();
     [m_scrollbarPainterDelegate.get() cancelAnimations];
@@ -1257,13 +1257,13 @@
 
 void ScrollAnimatorMac::setIsActive()
 {
-#if USE(WK_SCROLLBAR_PAINTER)
+#if USE(SCROLLBAR_PAINTER)
     if (needsScrollerStyleUpdate())
         updateScrollerStyle();
 #endif
 }
 
-#if USE(WK_SCROLLBAR_PAINTER)
+#if USE(SCROLLBAR_PAINTER)
 void ScrollAnimatorMac::updateScrollerStyle()
 {
     if (!scrollableArea()->isOnActivePage()) {
@@ -1275,8 +1275,8 @@
     NSScrollerStyle newStyle = [m_scrollbarPainterController.get() scrollerStyle];
 
     if (Scrollbar* verticalScrollbar = scrollableArea()->verticalScrollbar()) {
-        WKScrollbarPainterRef oldVerticalPainter = [m_scrollbarPainterController.get() verticalScrollerImp];
-        WKScrollbarPainterRef newVerticalPainter = [NSClassFromString(@"NSScrollerImp") scrollerImpWithStyle:newStyle 
+        ScrollbarPainter oldVerticalPainter = [m_scrollbarPainterController.get() verticalScrollerImp];
+        ScrollbarPainter newVerticalPainter = [NSClassFromString(@"NSScrollerImp") scrollerImpWithStyle:newStyle 
                                                                                     controlSize:(NSControlSize)verticalScrollbar->controlSize() 
                                                                                     horizontal:NO 
                                                                                     replacingScrollerImp:oldVerticalPainter];
@@ -1291,8 +1291,8 @@
     }
 
     if (Scrollbar* horizontalScrollbar = scrollableArea()->horizontalScrollbar()) {
-        WKScrollbarPainterRef oldHorizontalPainter = [m_scrollbarPainterController.get() horizontalScrollerImp];
-        WKScrollbarPainterRef newHorizontalPainter = [NSClassFromString(@"NSScrollerImp") scrollerImpWithStyle:newStyle 
+        ScrollbarPainter oldHorizontalPainter = [m_scrollbarPainterController.get() horizontalScrollerImp];
+        ScrollbarPainter newHorizontalPainter = [NSClassFromString(@"NSScrollerImp") scrollerImpWithStyle:newStyle 
                                                                                     controlSize:(NSControlSize)horizontalScrollbar->controlSize() 
                                                                                     horizontal:YES 
                                                                                     replacingScrollerImp:oldHorizontalPainter];

Modified: branches/safari-534.53-branch/Source/WebCore/platform/mac/ScrollViewMac.mm (101877 => 101878)


--- branches/safari-534.53-branch/Source/WebCore/platform/mac/ScrollViewMac.mm	2011-12-03 00:21:07 UTC (rev 101877)
+++ branches/safari-534.53-branch/Source/WebCore/platform/mac/ScrollViewMac.mm	2011-12-03 00:41:34 UTC (rev 101878)
@@ -204,7 +204,7 @@
     return ![platformWidget() window] || ![[platformWidget() window] isVisible];
 }
 
-#if USE(WK_SCROLLBAR_PAINTER)
+#if USE(SCROLLBAR_PAINTER)
 static inline NSScrollerKnobStyle toNSScrollerKnobStyle(ScrollbarOverlayStyle style)
 {
     switch (style) {
@@ -220,7 +220,7 @@
 
 void ScrollView::platformSetScrollbarOverlayStyle(ScrollbarOverlayStyle overlayStyle)
 {
-#if USE(WK_SCROLLBAR_PAINTER)
+#if USE(SCROLLBAR_PAINTER)
     [scrollView() setScrollerKnobStyle:toNSScrollerKnobStyle(overlayStyle)];
 #else
     UNUSED_PARAM(overlayStyle);

Modified: branches/safari-534.53-branch/Source/WebCore/platform/mac/ScrollbarThemeMac.h (101877 => 101878)


--- branches/safari-534.53-branch/Source/WebCore/platform/mac/ScrollbarThemeMac.h	2011-12-03 00:21:07 UTC (rev 101877)
+++ branches/safari-534.53-branch/Source/WebCore/platform/mac/ScrollbarThemeMac.h	2011-12-03 00:41:34 UTC (rev 101878)
@@ -28,8 +28,8 @@
 
 #include "ScrollbarThemeComposite.h"
 
-#if USE(WK_SCROLLBAR_PAINTER)
-typedef id WKScrollbarPainterRef;
+#if USE(SCROLLBAR_PAINTER)
+typedef id ScrollbarPainter;
 #endif
 
 namespace WebCore {
@@ -57,9 +57,9 @@
     virtual void registerScrollbar(Scrollbar*);
     virtual void unregisterScrollbar(Scrollbar*);
 
-#if USE(WK_SCROLLBAR_PAINTER)
-    void setNewPainterForScrollbar(Scrollbar*, WKScrollbarPainterRef);
-    WKScrollbarPainterRef painterForScrollbar(Scrollbar*);
+#if USE(SCROLLBAR_PAINTER)
+    void setNewPainterForScrollbar(Scrollbar*, ScrollbarPainter);
+    ScrollbarPainter painterForScrollbar(Scrollbar*);
 #endif
 
 protected:

Modified: branches/safari-534.53-branch/Source/WebCore/platform/mac/ScrollbarThemeMac.mm (101877 => 101878)


--- branches/safari-534.53-branch/Source/WebCore/platform/mac/ScrollbarThemeMac.mm	2011-12-03 00:21:07 UTC (rev 101877)
+++ branches/safari-534.53-branch/Source/WebCore/platform/mac/ScrollbarThemeMac.mm	2011-12-03 00:41:34 UTC (rev 101878)
@@ -45,8 +45,8 @@
 
 namespace WebCore {
 
-#if USE(WK_SCROLLBAR_PAINTER)
-typedef HashMap<Scrollbar*, RetainPtr<WKScrollbarPainterRef> > ScrollbarPainterMap;
+#if USE(SCROLLBAR_PAINTER)
+typedef HashMap<Scrollbar*, RetainPtr<ScrollbarPainter> > ScrollbarPainterMap;
 #else
 typedef HashSet<Scrollbar*> ScrollbarPainterMap;
 #endif
@@ -80,7 +80,7 @@
         return;
     ScrollbarPainterMap::iterator end = scrollbarMap()->end();
     for (ScrollbarPainterMap::iterator it = scrollbarMap()->begin(); it != end; ++it) {
-#if USE(WK_SCROLLBAR_PAINTER)
+#if USE(SCROLLBAR_PAINTER)
         it->first->styleChanged();
         it->first->invalidate();
 #else
@@ -118,7 +118,7 @@
 static int cButtonHitInset[] = { 3, 2 };
 // cRealButtonLength - cButtonInset
 static int cButtonLength[] = { 14, 10 };
-#if !USE(WK_SCROLLBAR_PAINTER)
+#if !USE(SCROLLBAR_PAINTER)
 static int cScrollbarThickness[] = { 15, 11 };
 static int cButtonInset[] = { 14, 11 };
 static int cThumbMinLength[] = { 26, 20 };
@@ -131,7 +131,7 @@
 static float gAutoscrollButtonDelay = 0.05f;
 static bool gJumpOnTrackClick = false;
 
-#if USE(WK_SCROLLBAR_PAINTER)
+#if USE(SCROLLBAR_PAINTER)
 static ScrollbarButtonsPlacement gButtonPlacement = ScrollbarButtonsNone;
 #else
 static ScrollbarButtonsPlacement gButtonPlacement = ScrollbarButtonsDoubleEnd;
@@ -139,7 +139,7 @@
 
 static void updateArrowPlacement()
 {
-#if USE(WK_SCROLLBAR_PAINTER)
+#if USE(SCROLLBAR_PAINTER)
     return;
 #endif
     NSString *buttonPlacement = [[NSUserDefaults standardUserDefaults] objectForKey:@"AppleScrollBarVariant"];
@@ -157,9 +157,9 @@
 
 void ScrollbarThemeMac::registerScrollbar(Scrollbar* scrollbar)
 {
-#if USE(WK_SCROLLBAR_PAINTER)
+#if USE(SCROLLBAR_PAINTER)
     bool isHorizontal = scrollbar->orientation() == HorizontalScrollbar;
-    WKScrollbarPainterRef scrollbarPainter = [NSClassFromString(@"NSScrollerImp") scrollerImpWithStyle:wkRecommendedScrollerStyle() controlSize:(NSControlSize)scrollbar->controlSize() horizontal:isHorizontal replacingScrollerImp:nil];
+    ScrollbarPainter scrollbarPainter = [NSClassFromString(@"NSScrollerImp") scrollerImpWithStyle:wkRecommendedScrollerStyle() controlSize:(NSControlSize)scrollbar->controlSize() horizontal:isHorizontal replacingScrollerImp:nil];
     scrollbarMap()->add(scrollbar, scrollbarPainter);
     updateEnabledState(scrollbar);
     updateScrollbarOverlayStyle(scrollbar);
@@ -173,15 +173,15 @@
     scrollbarMap()->remove(scrollbar);
 }
 
-#if USE(WK_SCROLLBAR_PAINTER)
-void ScrollbarThemeMac::setNewPainterForScrollbar(Scrollbar* scrollbar, WKScrollbarPainterRef newPainter)
+#if USE(SCROLLBAR_PAINTER)
+void ScrollbarThemeMac::setNewPainterForScrollbar(Scrollbar* scrollbar, ScrollbarPainter newPainter)
 {
     scrollbarMap()->set(scrollbar, newPainter);
     updateEnabledState(scrollbar);
     updateScrollbarOverlayStyle(scrollbar);
 }
 
-WKScrollbarPainterRef ScrollbarThemeMac::painterForScrollbar(Scrollbar* scrollbar)
+ScrollbarPainter ScrollbarThemeMac::painterForScrollbar(Scrollbar* scrollbar)
 {
     return scrollbarMap()->get(scrollbar).get();
 }
@@ -213,8 +213,8 @@
 
 int ScrollbarThemeMac::scrollbarThickness(ScrollbarControlSize controlSize)
 {
-#if USE(WK_SCROLLBAR_PAINTER)
-    WKScrollbarPainterRef scrollbarPainter = (WKScrollbarPainterRef)[NSClassFromString(@"NSScrollerImp") scrollerImpWithStyle:wkRecommendedScrollerStyle() controlSize:controlSize horizontal:NO replacingScrollerImp:nil];
+#if USE(SCROLLBAR_PAINTER)
+    ScrollbarPainter scrollbarPainter = [NSClassFromString(@"NSScrollerImp") scrollerImpWithStyle:wkRecommendedScrollerStyle() controlSize:controlSize horizontal:NO replacingScrollerImp:nil];
     return [scrollbarPainter trackBoxWidth];
 #else
     return cScrollbarThickness[controlSize];
@@ -223,7 +223,7 @@
 
 bool ScrollbarThemeMac::usesOverlayScrollbars() const
 {
-#if USE(WK_SCROLLBAR_PAINTER)
+#if USE(SCROLLBAR_PAINTER)
     return wkRecommendedScrollerStyle() == NSScrollerStyleOverlay;
 #else
     return false;
@@ -232,8 +232,8 @@
 
 void ScrollbarThemeMac::updateScrollbarOverlayStyle(Scrollbar* scrollbar)
 {
-#if USE(WK_SCROLLBAR_PAINTER)
-    WKScrollbarPainterRef painter = painterForScrollbar(scrollbar);
+#if USE(SCROLLBAR_PAINTER)
+    ScrollbarPainter painter = painterForScrollbar(scrollbar);
     switch (scrollbar->scrollableArea()->scrollbarOverlayStyle()) {
     case ScrollbarOverlayStyleDefault:
         [painter setKnobStyle:NSScrollerKnobStyleDefault];
@@ -276,8 +276,8 @@
 bool ScrollbarThemeMac::hasThumb(Scrollbar* scrollbar)
 {
     int minLengthForThumb;
-#if USE(WK_SCROLLBAR_PAINTER)
-    WKScrollbarPainterRef painter = scrollbarMap()->get(scrollbar).get();
+#if USE(SCROLLBAR_PAINTER)
+    ScrollbarPainter painter = scrollbarMap()->get(scrollbar).get();
     minLengthForThumb = [painter knobMinLength] + [painter trackOverlapEndInset] + [painter knobOverlapEndInset]
         + 2 * ([painter trackEndInset] + [painter knobEndInset]);
 #else
@@ -419,7 +419,7 @@
 
 int ScrollbarThemeMac::minimumThumbLength(Scrollbar* scrollbar)
 {
-#if USE(WK_SCROLLBAR_PAINTER)
+#if USE(SCROLLBAR_PAINTER)
     return [scrollbarMap()->get(scrollbar).get() knobMinLength];
 #else
     return cThumbMinLength[scrollbar->controlSize()];
@@ -460,15 +460,15 @@
 
 void ScrollbarThemeMac::updateEnabledState(Scrollbar* scrollbar)
 {
-#if USE(WK_SCROLLBAR_PAINTER)
+#if USE(SCROLLBAR_PAINTER)
     [scrollbarMap()->get(scrollbar).get() setEnabled:scrollbar->enabled()];
 #else
     UNUSED_PARAM(scrollbar);
 #endif
 }
 
-#if USE(WK_SCROLLBAR_PAINTER)
-static void scrollbarPainterPaint(WKScrollbarPainterRef scrollbarPainter, bool enabled, double value, CGFloat proportion, CGRect frameRect)
+#if USE(SCROLLBAR_PAINTER)
+static void scrollbarPainterPaint(ScrollbarPainter scrollbarPainter, bool enabled, double value, CGFloat proportion, CGRect frameRect)
 {
     [scrollbarPainter setEnabled:enabled];
     [scrollbarPainter setBoundsSize: NSSizeFromCGSize(frameRect.size)];
@@ -493,7 +493,7 @@
 
 bool ScrollbarThemeMac::paint(Scrollbar* scrollbar, GraphicsContext* context, const IntRect& damageRect)
 {
-#if USE(WK_SCROLLBAR_PAINTER)
+#if USE(SCROLLBAR_PAINTER)
     float value = 0;
     float overhang = 0;
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to