Changeset 147860 in webkit


Ignore:
Timestamp:
Apr 6, 2013 4:23:17 PM (11 years ago)
Author:
benjamin@webkit.org
Message:

Remove the chromium code from WebCore/platform/mac
https://bugs.webkit.org/show_bug.cgi?id=114104

Patch by Benjamin Poulain <bpoulain@apple.com> on 2013-04-06
Reviewed by Sam Weinig.

  • platform/mac/NSScrollerImpDetails.h:

(WebCore::isScrollbarOverlayAPIAvailable):

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

(-[WebScrollbarPainterDelegate layer]):
(WebCore::scrollAnimationEnabledForSystem):

  • platform/mac/ScrollElasticityController.mm:

(WebCore):

  • platform/mac/ScrollbarThemeMac.h:

(ScrollbarThemeMac):

  • platform/mac/ScrollbarThemeMac.mm:

(WebCore::ScrollbarTheme::nativeTheme):
(WebCore::ScrollbarThemeMac::paint):
(WebCore):

  • platform/mac/ThemeMac.mm:

(WebCore::ThemeMac::ensuredView):

  • platform/mac/WebCoreNSCellExtras.h:
Location:
trunk/Source/WebCore
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r147859 r147860  
     12013-04-06  Benjamin Poulain  <bpoulain@apple.com>
     2
     3        Remove the chromium code from WebCore/platform/mac
     4        https://bugs.webkit.org/show_bug.cgi?id=114104
     5
     6        Reviewed by Sam Weinig.
     7
     8        * platform/mac/NSScrollerImpDetails.h:
     9        (WebCore::isScrollbarOverlayAPIAvailable):
     10        * platform/mac/NSScrollerImpDetails.mm:
     11        * platform/mac/ScrollAnimatorMac.mm:
     12        (-[WebScrollbarPainterDelegate layer]):
     13        (WebCore::scrollAnimationEnabledForSystem):
     14        * platform/mac/ScrollElasticityController.mm:
     15        (WebCore):
     16        * platform/mac/ScrollbarThemeMac.h:
     17        (ScrollbarThemeMac):
     18        * platform/mac/ScrollbarThemeMac.mm:
     19        (WebCore::ScrollbarTheme::nativeTheme):
     20        (WebCore::ScrollbarThemeMac::paint):
     21        (WebCore):
     22        * platform/mac/ThemeMac.mm:
     23        (WebCore::ThemeMac::ensuredView):
     24        * platform/mac/WebCoreNSCellExtras.h:
     25
    1262013-04-06  Benjamin Poulain  <benjamin@webkit.org>
    227
  • trunk/Source/WebCore/platform/mac/NSScrollerImpDetails.h

    r141610 r147860  
    111111namespace WebCore {
    112112
    113 #if PLATFORM(CHROMIUM)
    114 bool isScrollbarOverlayAPIAvailable();
    115 #else
    116113static inline bool isScrollbarOverlayAPIAvailable()
    117114{
     
    122119#endif
    123120}
    124 #endif
    125121
    126122NSScrollerStyle recommendedScrollerStyle();
  • trunk/Source/WebCore/platform/mac/NSScrollerImpDetails.mm

    r128963 r147860  
    3232namespace WebCore {
    3333
    34 #if PLATFORM(CHROMIUM)
    35 bool isScrollbarOverlayAPIAvailable()
    36 {
    37     static bool apiAvailable;
    38     static bool shouldInitialize = true;
    39     if (shouldInitialize) {
    40         shouldInitialize = false;
    41         Class scrollerImpClass = NSClassFromString(@"NSScrollerImp");
    42         Class scrollerImpPairClass = NSClassFromString(@"NSScrollerImpPair");
    43         apiAvailable = [scrollerImpClass respondsToSelector:@selector(scrollerImpWithStyle:controlSize:horizontal:replacingScrollerImp:)]
    44                        && [scrollerImpPairClass instancesRespondToSelector:@selector(scrollerStyle)];
    45     }
    46     return apiAvailable;
    47 }
    48 #endif
    49 
    5034NSScrollerStyle recommendedScrollerStyle() {
    5135    if (Settings::usesOverlayScrollbars())
  • trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm

    r147039 r147860  
    433433}
    434434
    435 #if !PLATFORM(CHROMIUM)
    436435- (CALayer *)layer
    437436{
     
    446445    return dummyLayer;
    447446}
    448 #endif
    449447
    450448- (NSPoint)mouseLocationInScrollerForScrollerImp:(id)scrollerImp
     
    643641{
    644642    NSString* scrollAnimationDefaultsKey =
    645 #if __MAC_OS_X_VERSION_MIN_REQUIRED <= 1070 || PLATFORM(CHROMIUM)
     643#if __MAC_OS_X_VERSION_MIN_REQUIRED <= 1070
    646644        @"AppleScrollAnimationEnabled";
    647645#else
  • trunk/Source/WebCore/platform/mac/ScrollElasticityController.mm

    r147710 r147860  
    6464static const float rubberbandMinimumRequiredDeltaBeforeStretch = 10;
    6565
    66 #if __MAC_OS_X_VERSION_MIN_REQUIRED <= 1070 || PLATFORM(CHROMIUM)
     66#if __MAC_OS_X_VERSION_MIN_REQUIRED <= 1070
    6767static const float rubberbandStiffness = 20;
    6868static const float rubberbandAmplitude = 0.31f;
  • trunk/Source/WebCore/platform/mac/ScrollbarThemeMac.h

    r144397 r147860  
    4242    virtual void updateEnabledState(ScrollbarThemeClient*);
    4343
    44 #if !PLATFORM(CHROMIUM)
    4544    virtual bool paint(ScrollbarThemeClient*, GraphicsContext*, const IntRect& damageRect);
    46 #endif
    4745
    4846    virtual int scrollbarThickness(ScrollbarControlSize = RegularScrollbar);
     
    8280    int scrollbarPartToHIPressedState(ScrollbarPart);
    8381
    84 #if !PLATFORM(CHROMIUM) && USE(ACCELERATED_COMPOSITING) && ENABLE(RUBBER_BANDING)
     82#if USE(ACCELERATED_COMPOSITING) && ENABLE(RUBBER_BANDING)
    8583    virtual void setUpOverhangAreasLayerContents(GraphicsLayer*, const Color&) OVERRIDE;
    8684    virtual void setUpContentShadowLayer(GraphicsLayer*) OVERRIDE;
  • trunk/Source/WebCore/platform/mac/ScrollbarThemeMac.mm

    r144397 r147860  
    114114namespace WebCore {
    115115
    116 #if !PLATFORM(CHROMIUM)
    117116ScrollbarTheme* ScrollbarTheme::nativeTheme()
    118117{
     
    120119    return &theme;
    121120}
    122 #endif
    123121
    124122// FIXME: Get these numbers from CoreUI.
     
    479477}
    480478
    481 #if !PLATFORM(CHROMIUM)
    482479static void scrollbarPainterPaint(ScrollbarPainter scrollbarPainter, bool enabled, double value, CGFloat proportion, CGRect frameRect)
    483480{
     
    598595    return true;
    599596}
    600 #endif
    601 
    602 #if !PLATFORM(CHROMIUM) && USE(ACCELERATED_COMPOSITING) && ENABLE(RUBBER_BANDING)
     597
     598#if USE(ACCELERATED_COMPOSITING) && ENABLE(RUBBER_BANDING)
    603599static RetainPtr<CGColorRef> linenBackgroundColor()
    604600{
  • trunk/Source/WebCore/platform/mac/ThemeMac.mm

    r147039 r147860  
    573573NSView *ThemeMac::ensuredView(ScrollView* scrollView)
    574574{
    575 #if !PLATFORM(CHROMIUM)
    576575    if (NSView *documentView = scrollView->documentView())
    577576        return documentView;
    578 #endif
    579    
     577
    580578    // Use a fake flipped view.
    581579    static NSView *flippedView = [[WebCoreFlippedView alloc] init];
  • trunk/Source/WebCore/platform/mac/WebCoreNSCellExtras.h

    r122400 r147860  
    2626#import <AppKit/AppKit.h>
    2727
    28 #define BUTTON_CELL_DRAW_WITH_FRAME_DRAWS_FOCUS_RING (__MAC_OS_X_VERSION_MIN_REQUIRED <= 1070 || PLATFORM(CHROMIUM))
     28#define BUTTON_CELL_DRAW_WITH_FRAME_DRAWS_FOCUS_RING (__MAC_OS_X_VERSION_MIN_REQUIRED <= 1070)
    2929
    3030#if !BUTTON_CELL_DRAW_WITH_FRAME_DRAWS_FOCUS_RING
Note: See TracChangeset for help on using the changeset viewer.