Commit 6ca63d3a authored by jbroman@chromium.org's avatar jbroman@chromium.org

Remove unused Mac platform code.

Most of ColorMac.h is unused (except for one function, which is only
used in one file, but seems general enough to remain).

EmptyProtocolDefinitions.h is included only in one source file, which
does not refer to either of the protocol definitions it provides.

Review URL: https://codereview.chromium.org/336523003

git-svn-id: svn://svn.chromium.org/blink/trunk@176094 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent d42c98a2
...@@ -216,8 +216,9 @@ Color RenderThemeChromiumMac::platformInactiveListBoxSelectionForegroundColor() ...@@ -216,8 +216,9 @@ Color RenderThemeChromiumMac::platformInactiveListBoxSelectionForegroundColor()
Color RenderThemeChromiumMac::platformFocusRingColor() const Color RenderThemeChromiumMac::platformFocusRingColor() const
{ {
static const RGBA32 oldAquaFocusRingColor = 0xFF7DADD9;
if (usesTestModeFocusRingColor()) if (usesTestModeFocusRingColor())
return oldAquaFocusRingColor(); return oldAquaFocusRingColor;
return systemColor(CSSValueWebkitFocusRingColor); return systemColor(CSSValueWebkitFocusRingColor);
} }
......
...@@ -35,15 +35,8 @@ OBJC_CLASS NSColor; ...@@ -35,15 +35,8 @@ OBJC_CLASS NSColor;
namespace WebCore { namespace WebCore {
// These functions assume NSColors are in DeviceRGB colorspace // This function assumes NSColors are in DeviceRGB colorspace
Color PLATFORM_EXPORT colorFromNSColor(NSColor *); PLATFORM_EXPORT NSColor* nsColor(const Color&);
NSColor* PLATFORM_EXPORT nsColor(const Color&);
bool PLATFORM_EXPORT usesTestModeFocusRingColor();
void PLATFORM_EXPORT setUsesTestModeFocusRingColor(bool);
// Focus ring color used for testing purposes.
RGBA32 PLATFORM_EXPORT oldAquaFocusRingColor();
} }
......
...@@ -33,39 +33,6 @@ namespace WebCore { ...@@ -33,39 +33,6 @@ namespace WebCore {
// NSColor calls don't throw, so no need to block Cocoa exceptions in this file // NSColor calls don't throw, so no need to block Cocoa exceptions in this file
static bool useOldAquaFocusRingColor;
RGBA32 oldAquaFocusRingColor()
{
return 0xFF7DADD9;
}
void setUsesTestModeFocusRingColor(bool newValue)
{
useOldAquaFocusRingColor = newValue;
}
bool usesTestModeFocusRingColor()
{
return useOldAquaFocusRingColor;
}
static RGBA32 makeRGBAFromNSColor(NSColor *c)
{
CGFloat redComponent;
CGFloat greenComponent;
CGFloat blueComponent;
CGFloat alpha;
[c getRed:&redComponent green:&greenComponent blue:&blueComponent alpha:&alpha];
return makeRGBA(255 * redComponent, 255 * greenComponent, 255 * blueComponent, 255 * alpha);
}
Color colorFromNSColor(NSColor *c)
{
return Color(makeRGBAFromNSColor(c));
}
NSColor *nsColor(const Color& color) NSColor *nsColor(const Color& color)
{ {
RGBA32 c = color.rgb(); RGBA32 c = color.rgb();
......
/*
* Copyright (C) 2008, 2010 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#if defined(__OBJC__)
#import <AvailabilityMacros.h>
#define EMPTY_PROTOCOL(NAME) \
@protocol NAME <NSObject> \
@end
#if __MAC_OS_X_VERSION_MAX_ALLOWED == 1060
EMPTY_PROTOCOL(NSURLConnectionDelegate)
EMPTY_PROTOCOL(NSURLDownloadDelegate)
#endif
#undef EMPTY_PROTOCOL
#endif /* defined(__OBJC__) */
...@@ -32,7 +32,6 @@ ...@@ -32,7 +32,6 @@
#include "platform/geometry/FloatRect.h" #include "platform/geometry/FloatRect.h"
#include "platform/geometry/IntRect.h" #include "platform/geometry/IntRect.h"
#include "platform/mac/BlockExceptions.h" #include "platform/mac/BlockExceptions.h"
#include "platform/mac/EmptyProtocolDefinitions.h"
#include "platform/mac/NSScrollerImpDetails.h" #include "platform/mac/NSScrollerImpDetails.h"
#include "platform/scroll/ScrollView.h" #include "platform/scroll/ScrollView.h"
#include "platform/scroll/ScrollableArea.h" #include "platform/scroll/ScrollableArea.h"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment