Diff
Modified: trunk/Source/WebCore/ChangeLog (147859 => 147860)
--- trunk/Source/WebCore/ChangeLog 2013-04-06 23:19:08 UTC (rev 147859)
+++ trunk/Source/WebCore/ChangeLog 2013-04-06 23:23:17 UTC (rev 147860)
@@ -1,3 +1,28 @@
+2013-04-06 Benjamin Poulain <bpoul...@apple.com>
+
+ Remove the chromium code from WebCore/platform/mac
+ https://bugs.webkit.org/show_bug.cgi?id=114104
+
+ 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:
+
2013-04-06 Benjamin Poulain <benja...@webkit.org>
Remove the Chromium code from Mac's FontPlatformData
Modified: trunk/Source/WebCore/platform/mac/NSScrollerImpDetails.h (147859 => 147860)
--- trunk/Source/WebCore/platform/mac/NSScrollerImpDetails.h 2013-04-06 23:19:08 UTC (rev 147859)
+++ trunk/Source/WebCore/platform/mac/NSScrollerImpDetails.h 2013-04-06 23:23:17 UTC (rev 147860)
@@ -110,9 +110,6 @@
namespace WebCore {
-#if PLATFORM(CHROMIUM)
-bool isScrollbarOverlayAPIAvailable();
-#else
static inline bool isScrollbarOverlayAPIAvailable()
{
#if USE(SCROLLBAR_PAINTER)
@@ -121,7 +118,6 @@
return false;
#endif
}
-#endif
NSScrollerStyle recommendedScrollerStyle();
Modified: trunk/Source/WebCore/platform/mac/NSScrollerImpDetails.mm (147859 => 147860)
--- trunk/Source/WebCore/platform/mac/NSScrollerImpDetails.mm 2013-04-06 23:19:08 UTC (rev 147859)
+++ trunk/Source/WebCore/platform/mac/NSScrollerImpDetails.mm 2013-04-06 23:23:17 UTC (rev 147860)
@@ -31,22 +31,6 @@
namespace WebCore {
-#if PLATFORM(CHROMIUM)
-bool isScrollbarOverlayAPIAvailable()
-{
- static bool apiAvailable;
- static bool shouldInitialize = true;
- if (shouldInitialize) {
- shouldInitialize = false;
- Class scrollerImpClass = NSClassFromString(@"NSScrollerImp");
- Class scrollerImpPairClass = NSClassFromString(@"NSScrollerImpPair");
- apiAvailable = [scrollerImpClass respondsToSelector:@selector(scrollerImpWithStyle:controlSize:horizontal:replacingScrollerImp:)]
- && [scrollerImpPairClass instancesRespondToSelector:@selector(scrollerStyle)];
- }
- return apiAvailable;
-}
-#endif
-
NSScrollerStyle recommendedScrollerStyle() {
if (Settings::usesOverlayScrollbars())
return NSScrollerStyleOverlay;
Modified: trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm (147859 => 147860)
--- trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm 2013-04-06 23:19:08 UTC (rev 147859)
+++ trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm 2013-04-06 23:23:17 UTC (rev 147860)
@@ -432,7 +432,6 @@
return aRect;
}
-#if !PLATFORM(CHROMIUM)
- (CALayer *)layer
{
if (!_scrollbar)
@@ -445,7 +444,6 @@
static CALayer *dummyLayer = [[CALayer alloc] init];
return dummyLayer;
}
-#endif
- (NSPoint)mouseLocationInScrollerForScrollerImp:(id)scrollerImp
{
@@ -642,7 +640,7 @@
static bool scrollAnimationEnabledForSystem()
{
NSString* scrollAnimationDefaultsKey =
-#if __MAC_OS_X_VERSION_MIN_REQUIRED <= 1070 || PLATFORM(CHROMIUM)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED <= 1070
@"AppleScrollAnimationEnabled";
#else
@"NSScrollAnimationEnabled";
Modified: trunk/Source/WebCore/platform/mac/ScrollElasticityController.mm (147859 => 147860)
--- trunk/Source/WebCore/platform/mac/ScrollElasticityController.mm 2013-04-06 23:19:08 UTC (rev 147859)
+++ trunk/Source/WebCore/platform/mac/ScrollElasticityController.mm 2013-04-06 23:23:17 UTC (rev 147860)
@@ -63,7 +63,7 @@
static const float rubberbandDirectionLockStretchRatio = 1;
static const float rubberbandMinimumRequiredDeltaBeforeStretch = 10;
-#if __MAC_OS_X_VERSION_MIN_REQUIRED <= 1070 || PLATFORM(CHROMIUM)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED <= 1070
static const float rubberbandStiffness = 20;
static const float rubberbandAmplitude = 0.31f;
static const float rubberbandPeriod = 1.6f;
Modified: trunk/Source/WebCore/platform/mac/ScrollbarThemeMac.h (147859 => 147860)
--- trunk/Source/WebCore/platform/mac/ScrollbarThemeMac.h 2013-04-06 23:19:08 UTC (rev 147859)
+++ trunk/Source/WebCore/platform/mac/ScrollbarThemeMac.h 2013-04-06 23:23:17 UTC (rev 147860)
@@ -41,9 +41,7 @@
virtual void updateEnabledState(ScrollbarThemeClient*);
-#if !PLATFORM(CHROMIUM)
virtual bool paint(ScrollbarThemeClient*, GraphicsContext*, const IntRect& damageRect);
-#endif
virtual int scrollbarThickness(ScrollbarControlSize = RegularScrollbar);
@@ -81,7 +79,7 @@
virtual bool shouldDragDocumentInsteadOfThumb(ScrollbarThemeClient*, const PlatformMouseEvent&);
int scrollbarPartToHIPressedState(ScrollbarPart);
-#if !PLATFORM(CHROMIUM) && USE(ACCELERATED_COMPOSITING) && ENABLE(RUBBER_BANDING)
+#if USE(ACCELERATED_COMPOSITING) && ENABLE(RUBBER_BANDING)
virtual void setUpOverhangAreasLayerContents(GraphicsLayer*, const Color&) OVERRIDE;
virtual void setUpContentShadowLayer(GraphicsLayer*) OVERRIDE;
#endif
Modified: trunk/Source/WebCore/platform/mac/ScrollbarThemeMac.mm (147859 => 147860)
--- trunk/Source/WebCore/platform/mac/ScrollbarThemeMac.mm 2013-04-06 23:19:08 UTC (rev 147859)
+++ trunk/Source/WebCore/platform/mac/ScrollbarThemeMac.mm 2013-04-06 23:23:17 UTC (rev 147860)
@@ -113,13 +113,11 @@
namespace WebCore {
-#if !PLATFORM(CHROMIUM)
ScrollbarTheme* ScrollbarTheme::nativeTheme()
{
DEFINE_STATIC_LOCAL(ScrollbarThemeMac, theme, ());
return &theme;
}
-#endif
// FIXME: Get these numbers from CoreUI.
static int cRealButtonLength[] = { 28, 21 };
@@ -478,7 +476,6 @@
[scrollbarMap()->get(scrollbar).get() setEnabled:scrollbar->enabled()];
}
-#if !PLATFORM(CHROMIUM)
static void scrollbarPainterPaint(ScrollbarPainter scrollbarPainter, bool enabled, double value, CGFloat proportion, CGRect frameRect)
{
[scrollbarPainter setEnabled:enabled];
@@ -597,9 +594,8 @@
return true;
}
-#endif
-#if !PLATFORM(CHROMIUM) && USE(ACCELERATED_COMPOSITING) && ENABLE(RUBBER_BANDING)
+#if USE(ACCELERATED_COMPOSITING) && ENABLE(RUBBER_BANDING)
static RetainPtr<CGColorRef> linenBackgroundColor()
{
NSImage *image = [NSColor _linenPatternImage];
Modified: trunk/Source/WebCore/platform/mac/ThemeMac.mm (147859 => 147860)
--- trunk/Source/WebCore/platform/mac/ThemeMac.mm 2013-04-06 23:19:08 UTC (rev 147859)
+++ trunk/Source/WebCore/platform/mac/ThemeMac.mm 2013-04-06 23:23:17 UTC (rev 147860)
@@ -572,11 +572,9 @@
// If the ScrollView doesn't have an NSView, we will return a fake NSView whose sole purpose is to tell AppKit that it's flipped.
NSView *ThemeMac::ensuredView(ScrollView* scrollView)
{
-#if !PLATFORM(CHROMIUM)
if (NSView *documentView = scrollView->documentView())
return documentView;
-#endif
-
+
// Use a fake flipped view.
static NSView *flippedView = [[WebCoreFlippedView alloc] init];
[flippedView setFrameSize:NSSizeFromCGSize(scrollView->totalContentsSize())];
Modified: trunk/Source/WebCore/platform/mac/WebCoreNSCellExtras.h (147859 => 147860)
--- trunk/Source/WebCore/platform/mac/WebCoreNSCellExtras.h 2013-04-06 23:19:08 UTC (rev 147859)
+++ trunk/Source/WebCore/platform/mac/WebCoreNSCellExtras.h 2013-04-06 23:23:17 UTC (rev 147860)
@@ -25,7 +25,7 @@
#import <AppKit/AppKit.h>
-#define BUTTON_CELL_DRAW_WITH_FRAME_DRAWS_FOCUS_RING (__MAC_OS_X_VERSION_MIN_REQUIRED <= 1070 || PLATFORM(CHROMIUM))
+#define BUTTON_CELL_DRAW_WITH_FRAME_DRAWS_FOCUS_RING (__MAC_OS_X_VERSION_MIN_REQUIRED <= 1070)
#if !BUTTON_CELL_DRAW_WITH_FRAME_DRAWS_FOCUS_RING