Commit 6690896b authored by rniwa@webkit.org's avatar rniwa@webkit.org

Remove code for 10.5 and earlier from Source/WebCore

https://bugs.webkit.org/show_bug.cgi?id=113754

Reviewed by Benjamin Poulain.

Removed the code for 10.5 and removed if-def for 10.6.

* WebCore.xcodeproj/project.pbxproj:
* page/ContextMenuController.cpp:
(WebCore::ContextMenuController::populate):
* platform/LocalizedStrings.cpp:
(WebCore::imageTitle):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::setAllowsFontSmoothing):
* platform/graphics/cg/ImageCG.cpp:
(WebCore::Image::drawPattern):
* platform/graphics/cg/ImageSourceCG.cpp:
(WebCore::ImageSource::clear):
* platform/graphics/cg/PathCG.cpp:
(WebCore::Path::boundingRect):
* platform/graphics/cocoa/FontPlatformDataCocoa.mm:
(WebCore):
(WebCore::FontPlatformData::ctFont):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::supportsFullscreen):
* platform/graphics/mac/ComplexTextControllerCoreText.mm:
* platform/graphics/mac/FontCacheMac.mm:
(WebCore):
(WebCore::fontCacheRegisteredFontsChangedNotificationCallback):
(WebCore::FontCache::platformInit):
* platform/graphics/mac/FontCustomPlatformData.cpp:
(WebCore::FontCustomPlatformData::~FontCustomPlatformData):
(WebCore::createFontCustomPlatformData):
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::MediaPlayerPrivateQTKit::createQTMovie):
(WebCore::MediaPlayerPrivateQTKit::supportsFullscreen):
(WebCore::MediaPlayerPrivateQTKit::setClosedCaptionsVisible):
(WebCore::MediaPlayerPrivateQTKit::cacheMovieScale):
* platform/graphics/mac/SimpleFontDataMac.mm:
(WebCore::SimpleFontData::platformInit):
* platform/graphics/mac/WebLayer.h:
* platform/mac/CursorMac.mm:
(WebCore::Cursor::ensurePlatformCursor):
* platform/mac/DisplaySleepDisabler.cpp:
(WebCore::DisplaySleepDisabler::DisplaySleepDisabler):
(WebCore):
* platform/mac/DisplaySleepDisabler.h:
(DisplaySleepDisabler):
* platform/mac/EmptyProtocolDefinitions.h:
* platform/mac/HTMLConverter.h:
* platform/mac/HTMLConverter.mm:
* platform/mac/PopupMenuMac.mm:
(WebCore::PopupMenuMac::populate):
* platform/mac/ScrollElasticityController.mm:
(systemUptime):
* platform/mac/SharedTimerMac.mm:
(PowerObserver):
(WebCore::PowerObserver::PowerObserver):
(WebCore::PowerObserver::~PowerObserver):
(WebCore::PowerObserver::didReceiveSystemPowerNotification):
* platform/mac/SuddenTermination.mm:
* platform/mac/WebCoreFullScreenWindow.mm:
(-[WebCoreFullScreenWindow initWithContentRect:styleMask:backing:defer:]):
* platform/mac/WebFontCache.mm:
(+[WebFontCache getTraits:inFamily:]):
(+[WebFontCache internalFontWithFamily:traits:weight:size:]):
* platform/mac/WebVideoFullscreenController.mm:
(SOFT_LINK_POINTER):
(-[WebVideoFullscreenController updateMenuAndDockForFullscreen]):
* platform/mac/WebVideoFullscreenHUDWindowController.mm:
(createControlWithMediaUIControlType):
(-[WebVideoFullscreenHUDWindowController windowDidLoad]):
* platform/network/Credential.h:
* platform/network/cf/DNSCFNet.cpp:
(WebCore::DNSResolveQueue::platformProxyIsEnabledInSystemPreferences):
* platform/network/cf/ProxyServerCFNet.cpp:
(WebCore):
(WebCore::proxyServersForURL):
* platform/network/cf/SocketStreamHandleCFNet.cpp:
(WebCore::SocketStreamHandle::chooseProxy):
* platform/network/mac/AuthenticationMac.mm:
(WebCore):
* platform/network/mac/WebCoreURLResponse.mm:
(WebCore::adjustMIMETypeIfNecessary):
* platform/text/TextChecking.h:
(WebCore):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147710 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 600d5c7d
2013-04-04 Ryosuke Niwa <rniwa@webkit.org>
Remove code for 10.5 and earlier from Source/WebCore
https://bugs.webkit.org/show_bug.cgi?id=113754
Reviewed by Benjamin Poulain.
Removed the code for 10.5 and removed if-def for 10.6.
* WebCore.xcodeproj/project.pbxproj:
* page/ContextMenuController.cpp:
(WebCore::ContextMenuController::populate):
* platform/LocalizedStrings.cpp:
(WebCore::imageTitle):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::setAllowsFontSmoothing):
* platform/graphics/cg/ImageCG.cpp:
(WebCore::Image::drawPattern):
* platform/graphics/cg/ImageSourceCG.cpp:
(WebCore::ImageSource::clear):
* platform/graphics/cg/PathCG.cpp:
(WebCore::Path::boundingRect):
* platform/graphics/cocoa/FontPlatformDataCocoa.mm:
(WebCore):
(WebCore::FontPlatformData::ctFont):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::supportsFullscreen):
* platform/graphics/mac/ComplexTextControllerCoreText.mm:
* platform/graphics/mac/FontCacheMac.mm:
(WebCore):
(WebCore::fontCacheRegisteredFontsChangedNotificationCallback):
(WebCore::FontCache::platformInit):
* platform/graphics/mac/FontCustomPlatformData.cpp:
(WebCore::FontCustomPlatformData::~FontCustomPlatformData):
(WebCore::createFontCustomPlatformData):
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::MediaPlayerPrivateQTKit::createQTMovie):
(WebCore::MediaPlayerPrivateQTKit::supportsFullscreen):
(WebCore::MediaPlayerPrivateQTKit::setClosedCaptionsVisible):
(WebCore::MediaPlayerPrivateQTKit::cacheMovieScale):
* platform/graphics/mac/SimpleFontDataMac.mm:
(WebCore::SimpleFontData::platformInit):
* platform/graphics/mac/WebLayer.h:
* platform/mac/CursorMac.mm:
(WebCore::Cursor::ensurePlatformCursor):
* platform/mac/DisplaySleepDisabler.cpp:
(WebCore::DisplaySleepDisabler::DisplaySleepDisabler):
(WebCore):
* platform/mac/DisplaySleepDisabler.h:
(DisplaySleepDisabler):
* platform/mac/EmptyProtocolDefinitions.h:
* platform/mac/HTMLConverter.h:
* platform/mac/HTMLConverter.mm:
* platform/mac/PopupMenuMac.mm:
(WebCore::PopupMenuMac::populate):
* platform/mac/ScrollElasticityController.mm:
(systemUptime):
* platform/mac/SharedTimerMac.mm:
(PowerObserver):
(WebCore::PowerObserver::PowerObserver):
(WebCore::PowerObserver::~PowerObserver):
(WebCore::PowerObserver::didReceiveSystemPowerNotification):
* platform/mac/SuddenTermination.mm:
* platform/mac/WebCoreFullScreenWindow.mm:
(-[WebCoreFullScreenWindow initWithContentRect:styleMask:backing:defer:]):
* platform/mac/WebFontCache.mm:
(+[WebFontCache getTraits:inFamily:]):
(+[WebFontCache internalFontWithFamily:traits:weight:size:]):
* platform/mac/WebVideoFullscreenController.mm:
(SOFT_LINK_POINTER):
(-[WebVideoFullscreenController updateMenuAndDockForFullscreen]):
* platform/mac/WebVideoFullscreenHUDWindowController.mm:
(createControlWithMediaUIControlType):
(-[WebVideoFullscreenHUDWindowController windowDidLoad]):
* platform/network/Credential.h:
* platform/network/cf/DNSCFNet.cpp:
(WebCore::DNSResolveQueue::platformProxyIsEnabledInSystemPreferences):
* platform/network/cf/ProxyServerCFNet.cpp:
(WebCore):
(WebCore::proxyServersForURL):
* platform/network/cf/SocketStreamHandleCFNet.cpp:
(WebCore::SocketStreamHandle::chooseProxy):
* platform/network/mac/AuthenticationMac.mm:
(WebCore):
* platform/network/mac/WebCoreURLResponse.mm:
(WebCore::adjustMIMETypeIfNecessary):
* platform/text/TextChecking.h:
(WebCore):
2013-04-04 Ryosuke Niwa <rniwa@webkit.org>
Qt build fix attempt after r147684.
......@@ -1264,18 +1264,15 @@
45BAC2B01360BBAB005DA258 /* IconURL.h in Headers */ = {isa = PBXBuildFile; fileRef = 45BAC2AF1360BBAB005DA258 /* IconURL.h */; settings = {ATTRIBUTES = (Private, ); }; };
45FEA5CF156DDE8C00654101 /* Decimal.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 45FEA5CD156DDE8C00654101 /* Decimal.cpp */; };
45FEA5D0156DDE8C00654101 /* Decimal.h in Headers */ = {isa = PBXBuildFile; fileRef = 45FEA5CE156DDE8C00654101 /* Decimal.h */; settings = {ATTRIBUTES = (Private, ); }; };
4614A1FE0B23A8D600446E1C /* copyCursor.png in Resources */ = {isa = PBXBuildFile; fileRef = 4614A1FD0B23A8D600446E1C /* copyCursor.png */; };
46700ED1127B96CB00F5D5D6 /* FileWriterSync.h in Headers */ = {isa = PBXBuildFile; fileRef = 46700ECF127B96CB00F5D5D6 /* FileWriterSync.h */; };
4689F1AF1267BAE100E8D380 /* FileMetadata.h in Headers */ = {isa = PBXBuildFile; fileRef = 4689F1AE1267BAE100E8D380 /* FileMetadata.h */; };
46BC724F129B104C0071C07E /* FileWriterBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 46BC724C129B104C0071C07E /* FileWriterBase.h */; };
46BC7250129B104C0071C07E /* FileWriterBaseCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 46BC724D129B104C0071C07E /* FileWriterBaseCallback.h */; };
46BD16E30B279473001F0839 /* noneCursor.png in Resources */ = {isa = PBXBuildFile; fileRef = 46BD16E20B279473001F0839 /* noneCursor.png */; };
46D4F2490AF97E810035385A /* cellCursor.png in Resources */ = {isa = PBXBuildFile; fileRef = 46D4F2460AF97E810035385A /* cellCursor.png */; };
46D4F24A0AF97E810035385A /* contextMenuCursor.png in Resources */ = {isa = PBXBuildFile; fileRef = 46D4F2470AF97E810035385A /* contextMenuCursor.png */; };
46D4F24B0AF97E810035385A /* verticalTextCursor.png in Resources */ = {isa = PBXBuildFile; fileRef = 46D4F2480AF97E810035385A /* verticalTextCursor.png */; };
46DA844E1224A0710060D006 /* JSFileWriter.h in Headers */ = {isa = PBXBuildFile; fileRef = 46DA844C1224A0710060D006 /* JSFileWriter.h */; };
46F9D5DD0B0D60170028EE36 /* aliasCursor.png in Resources */ = {isa = PBXBuildFile; fileRef = 46F9D5DA0B0D60170028EE36 /* aliasCursor.png */; };
46F9D5DE0B0D60170028EE36 /* noDropCursor.png in Resources */ = {isa = PBXBuildFile; fileRef = 46F9D5DB0B0D60170028EE36 /* noDropCursor.png */; };
46F9D5DF0B0D60170028EE36 /* progressCursor.png in Resources */ = {isa = PBXBuildFile; fileRef = 46F9D5DC0B0D60170028EE36 /* progressCursor.png */; };
490707E61219C04300D90E51 /* ANGLEWebKitBridge.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 490707E41219C04300D90E51 /* ANGLEWebKitBridge.cpp */; };
490707E71219C04300D90E51 /* ANGLEWebKitBridge.h in Headers */ = {isa = PBXBuildFile; fileRef = 490707E51219C04300D90E51 /* ANGLEWebKitBridge.h */; };
......@@ -8602,18 +8599,15 @@
45BAC2AF1360BBAB005DA258 /* IconURL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IconURL.h; sourceTree = "<group>"; };
45FEA5CD156DDE8C00654101 /* Decimal.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Decimal.cpp; sourceTree = "<group>"; };
45FEA5CE156DDE8C00654101 /* Decimal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Decimal.h; sourceTree = "<group>"; };
4614A1FD0B23A8D600446E1C /* copyCursor.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = copyCursor.png; sourceTree = "<group>"; };
46700ECF127B96CB00F5D5D6 /* FileWriterSync.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FileWriterSync.h; path = Modules/filesystem/FileWriterSync.h; sourceTree = "<group>"; };
4689F1AE1267BAE100E8D380 /* FileMetadata.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FileMetadata.h; path = platform/FileMetadata.h; sourceTree = "<group>"; };
46BC724C129B104C0071C07E /* FileWriterBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FileWriterBase.h; path = Modules/filesystem/FileWriterBase.h; sourceTree = "<group>"; };
46BC724D129B104C0071C07E /* FileWriterBaseCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FileWriterBaseCallback.h; path = Modules/filesystem/FileWriterBaseCallback.h; sourceTree = "<group>"; };
46BD16E20B279473001F0839 /* noneCursor.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = noneCursor.png; sourceTree = "<group>"; };
46D4F2460AF97E810035385A /* cellCursor.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = cellCursor.png; sourceTree = "<group>"; };
46D4F2470AF97E810035385A /* contextMenuCursor.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = contextMenuCursor.png; sourceTree = "<group>"; };
46D4F2480AF97E810035385A /* verticalTextCursor.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = verticalTextCursor.png; sourceTree = "<group>"; };
46DA844C1224A0710060D006 /* JSFileWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSFileWriter.h; sourceTree = "<group>"; };
46F9D5DA0B0D60170028EE36 /* aliasCursor.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = aliasCursor.png; sourceTree = "<group>"; };
46F9D5DB0B0D60170028EE36 /* noDropCursor.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = noDropCursor.png; sourceTree = "<group>"; };
46F9D5DC0B0D60170028EE36 /* progressCursor.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = progressCursor.png; sourceTree = "<group>"; };
490707E41219C04300D90E51 /* ANGLEWebKitBridge.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ANGLEWebKitBridge.cpp; sourceTree = "<group>"; };
490707E51219C04300D90E51 /* ANGLEWebKitBridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ANGLEWebKitBridge.h; sourceTree = "<group>"; };
......@@ -14751,8 +14745,6 @@
CD0DBB3E142274E600280263 /* audio */,
46F9D5DA0B0D60170028EE36 /* aliasCursor.png */,
46D4F2460AF97E810035385A /* cellCursor.png */,
46D4F2470AF97E810035385A /* contextMenuCursor.png */,
4614A1FD0B23A8D600446E1C /* copyCursor.png */,
93153BDD141959F400FCF5BE /* deleteButton.png */,
93153BCC1417FBBF00FCF5BE /* deleteButton@2x.png */,
93153BDF14195A2800FCF5BE /* deleteButtonPressed.png */,
......@@ -14767,7 +14759,6 @@
93153BE114195A5700FCF5BE /* missingImage.png */,
93153BD914181F7A00FCF5BE /* missingImage@2x.png */,
85136C8D0AED665800F90A3D /* moveCursor.png */,
46F9D5DB0B0D60170028EE36 /* noDropCursor.png */,
46BD16E20B279473001F0839 /* noneCursor.png */,
85136C8E0AED665800F90A3D /* northEastResizeCursor.png */,
85136C8F0AED665900F90A3D /* northEastSouthWestResizeCursor.png */,
......@@ -26580,8 +26571,6 @@
files = (
46F9D5DD0B0D60170028EE36 /* aliasCursor.png in Resources */,
46D4F2490AF97E810035385A /* cellCursor.png in Resources */,
46D4F24A0AF97E810035385A /* contextMenuCursor.png in Resources */,
4614A1FE0B23A8D600446E1C /* copyCursor.png in Resources */,
93153BDE141959F400FCF5BE /* deleteButton.png in Resources */,
93153BCD1417FBBF00FCF5BE /* deleteButton@2x.png in Resources */,
93153BE014195A2800FCF5BE /* deleteButtonPressed.png in Resources */,
......@@ -26597,7 +26586,6 @@
93153BE214195A5700FCF5BE /* missingImage.png in Resources */,
93153BDA14181F7A00FCF5BE /* missingImage@2x.png in Resources */,
85136C9D0AED665900F90A3D /* moveCursor.png in Resources */,
46F9D5DE0B0D60170028EE36 /* noDropCursor.png in Resources */,
46BD16E30B279473001F0839 /* noneCursor.png in Resources */,
85136C9E0AED665900F90A3D /* northEastResizeCursor.png in Resources */,
85136C9F0AED665900F90A3D /* northEastSouthWestResizeCursor.png in Resources */,
......@@ -956,7 +956,7 @@ void ContextMenuController::populate()
appendItem(IgnoreGrammarItem, m_contextMenu.get());
appendItem(*separatorItem(), m_contextMenu.get());
haveContextMenuItemsForMisspellingOrGrammer = true;
#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
#if PLATFORM(MAC)
} else {
// If the string was autocorrected, generate a contextual menu item allowing it to be changed back.
String replacedString = m_hitTestResult.replacedString();
......
......@@ -785,7 +785,6 @@ String htmlSelectMultipleItems(size_t count)
String imageTitle(const String& filename, const IntSize& size)
{
#if USE(CF)
#if !PLATFORM(MAC) || PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
RetainPtr<CFLocaleRef> locale = adoptCF(CFLocaleCopyCurrent());
RetainPtr<CFNumberFormatterRef> formatter(AdoptCF, CFNumberFormatterCreate(0, locale.get(), kCFNumberFormatterDecimalStyle));
......@@ -798,10 +797,6 @@ String imageTitle(const String& filename, const IntSize& size)
RetainPtr<CFStringRef> heightString(AdoptCF, CFNumberFormatterCreateStringWithNumber(0, formatter.get(), height.get()));
return formatLocalizedString(WEB_UI_STRING("%@ %@×%@ pixels", "window title for a standalone image (uses multiplication symbol, not x)"), filename.createCFString().get(), widthString.get(), heightString.get());
#else
RetainPtr<CFStringRef> filenameCFString(AdoptCF, filename.createCFString());
return formatLocalizedString(WEB_UI_STRING("%@ %d×%d pixels", "window title for a standalone image (uses multiplication symbol, not x)"), filenameCFString.get(), size.width(), size.height());
#endif
#else
return formatLocalizedString(WEB_UI_STRING("<filename> %d×%d pixels", "window title for a standalone image (uses multiplication symbol, not x)"), size.width(), size.height()).replace("<filename>", filename);
#endif
......
......@@ -1492,7 +1492,7 @@ InterpolationQuality GraphicsContext::imageInterpolationQuality() const
void GraphicsContext::setAllowsFontSmoothing(bool allowsFontSmoothing)
{
UNUSED_PARAM(allowsFontSmoothing);
#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
#if PLATFORM(MAC)
CGContextRef context = platformContext();
CGContextSetAllowsFontSmoothing(context, allowsFontSmoothing);
#endif
......
......@@ -119,11 +119,7 @@ void Image::drawPattern(GraphicsContext* ctxt, const FloatRect& tileRect, const
// FIXME: We cannot use CGContextDrawTiledImage with scaled tiles on Leopard, because it suffers from rounding errors. Snow Leopard is ok.
float scaledTileWidth = tileRect.width() * narrowPrecisionToFloat(patternTransform.a());
float w = CGImageGetWidth(tileImage);
#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
if (w == size().width() && h == size().height() && scaledTileWidth == tileRect.width() && scaledTileHeight == tileRect.height())
#else
if (w == size().width() && h == size().height())
#endif
CGContextDrawTiledImage(context, FloatRect(adjustedX, adjustedY, scaledTileWidth, scaledTileHeight), subImage.get());
else {
......
......@@ -84,21 +84,11 @@ ImageSource::~ImageSource()
void ImageSource::clear(bool destroyAllFrames, size_t, SharedBuffer* data, bool allDataReceived)
{
#if !PLATFORM(MAC) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
// Recent versions of ImageIO discard previously decoded image frames if the client
// application no longer holds references to them, so there's no need to throw away
// the decoder unless we're explicitly asked to destroy all of the frames.
if (!destroyAllFrames)
return;
#else
// Older versions of ImageIO hold references to previously decoded image frames.
// There is no API to selectively release some of the frames it is holding, and
// if we don't release the frames we use too much memory on large images.
// Destroying the decoder is the only way to release previous frames.
UNUSED_PARAM(destroyAllFrames);
#endif
if (m_decoder) {
CFRelease(m_decoder);
......
......@@ -193,12 +193,7 @@ FloatRect Path::boundingRect() const
// CGPathGetBoundingBox includes the path's control points, CGPathGetPathBoundingBox
// does not, but only exists on 10.6 and above.
CGRect bound = CGRectZero;
#if !PLATFORM(MAC) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
bound = CGPathGetPathBoundingBox(m_path);
#else
bound = CGPathGetBoundingBox(m_path);
#endif
CGRect bound = CGPathGetPathBoundingBox(m_path);
return CGRectIsNull(bound) ? CGRectZero : bound;
}
......
......@@ -242,16 +242,6 @@ static CTFontDescriptorRef cascadeToLastResortAndDisableSwashesFontDescriptor()
return descriptor;
}
// Adding a cascade list breaks the font on Leopard
static bool canSetCascadeListForCustomFont()
{
#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
return true;
#else
return false;
#endif
}
CTFontRef FontPlatformData::ctFont() const
{
if (m_CTFont)
......@@ -259,7 +249,7 @@ CTFontRef FontPlatformData::ctFont() const
#if PLATFORM(CHROMIUM)
if (m_inMemoryFont) {
m_CTFont.adoptCF(CTFontCreateWithGraphicsFont(m_inMemoryFont->cgFont(), m_size, 0, canSetCascadeListForCustomFont() ? cascadeToLastResortFontDescriptor() : 0));
m_CTFont.adoptCF(CTFontCreateWithGraphicsFont(m_inMemoryFont->cgFont(), m_size, 0, cascadeToLastResortFontDescriptor()));
return m_CTFont.get();
}
#endif
......@@ -275,7 +265,7 @@ CTFontRef FontPlatformData::ctFont() const
fontDescriptor = cascadeToLastResortFontDescriptor();
m_CTFont.adoptCF(CTFontCreateCopyWithAttributes(m_CTFont.get(), m_size, 0, fontDescriptor));
} else
m_CTFont.adoptCF(CTFontCreateWithGraphicsFont(m_cgFont.get(), m_size, 0, canSetCascadeListForCustomFont() ? cascadeToLastResortFontDescriptor() : 0));
m_CTFont.adoptCF(CTFontCreateWithGraphicsFont(m_cgFont.get(), m_size, 0, cascadeToLastResortFontDescriptor()));
if (m_widthVariant != RegularWidth) {
int featureTypeValue = kTextSpacingType;
......
......@@ -349,12 +349,7 @@ void MediaPlayerPrivateGStreamerBase::exitFullscreen()
bool MediaPlayerPrivateGStreamerBase::supportsFullscreen() const
{
#if PLATFORM(MAC) && !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
// See <rdar://problem/7389945>
return false;
#else
return true;
#endif
}
PlatformMedia MediaPlayerPrivateGStreamerBase::platformMedia() const
......
......@@ -33,15 +33,6 @@
#include <ApplicationServices/ApplicationServices.h>
#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
// The following symbols are SPI in 10.5.
extern "C" {
void CTRunGetAdvances(CTRunRef run, CFRange range, CGSize buffer[]);
const CGSize* CTRunGetAdvancesPtr(CTRunRef run);
extern const CFStringRef kCTTypesetterOptionForcedEmbeddingLevel;
}
#endif
@interface WebCascadeList : NSArray {
@private
const WebCore::Font* _font;
......
......@@ -52,30 +52,17 @@ static void invalidateFontCache(void*)
fontCache()->invalidate();
}
#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
static void fontCacheRegisteredFontsChangedNotificationCallback(CFNotificationCenterRef, void* observer, CFStringRef name, const void *, CFDictionaryRef)
{
ASSERT_UNUSED(observer, observer == fontCache());
ASSERT_UNUSED(name, CFEqual(name, kCTFontManagerRegisteredFontsChangedNotification));
invalidateFontCache(0);
}
#else
static void fontCacheATSNotificationCallback(ATSFontNotificationInfoRef, void*)
{
invalidateFontCache(0);
}
#endif
void FontCache::platformInit()
{
wkSetUpFontCache();
#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
CFNotificationCenterAddObserver(CFNotificationCenterGetLocalCenter(), this, fontCacheRegisteredFontsChangedNotificationCallback, kCTFontManagerRegisteredFontsChangedNotification, 0, CFNotificationSuspensionBehaviorDeliverImmediately);
#else
// kCTFontManagerRegisteredFontsChangedNotification does not exist on Leopard and earlier.
// FIXME: Passing kATSFontNotifyOptionReceiveWhileSuspended may be an overkill and does not seem to work anyway.
ATSFontNotificationSubscribe(fontCacheATSNotificationCallback, kATSFontNotifyOptionReceiveWhileSuspended, 0, 0);
#endif
}
static int toAppKitFontWeight(FontWeight fontWeight)
......
......@@ -78,10 +78,6 @@ private:
FontCustomPlatformData::~FontCustomPlatformData()
{
#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
if (m_atsContainer)
ATSFontDeactivate(m_atsContainer, NULL, kATSOptionFlagsDefault);
#endif
#if USE(SKIA_ON_MAC_CHROMIUM)
SkSafeUnref(m_typeface);
#endif
......@@ -117,47 +113,12 @@ FontCustomPlatformData* createFontCustomPlatformData(SharedBuffer* buffer)
ATSFontContainerRef containerRef = 0;
RetainPtr<CGFontRef> cgFontRef;
#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
RetainPtr<CFDataRef> bufferData(AdoptCF, buffer->createCFData());
RetainPtr<CGDataProviderRef> dataProvider(AdoptCF, CGDataProviderCreateWithCFData(bufferData.get()));
cgFontRef.adoptCF(CGFontCreateWithDataProvider(dataProvider.get()));
RetainPtr<CGFontRef> cgFontRef = adoptCF(CGFontCreateWithDataProvider(dataProvider.get()));
if (!cgFontRef)
return 0;
#else
// Use ATS to activate the font.
// The value "3" means that the font is private and can't be seen by anyone else.
ATSFontActivateFromMemory((void*)buffer->data(), buffer->size(), 3, kATSFontFormatUnspecified, NULL, kATSOptionFlagsDefault, &containerRef);
if (!containerRef)
return 0;
ItemCount fontCount;
ATSFontFindFromContainer(containerRef, kATSOptionFlagsDefault, 0, NULL, &fontCount);
// We just support the first font in the list.
if (fontCount == 0) {
ATSFontDeactivate(containerRef, NULL, kATSOptionFlagsDefault);
return 0;
}
ATSFontRef fontRef = 0;
ATSFontFindFromContainer(containerRef, kATSOptionFlagsDefault, 1, &fontRef, NULL);
if (!fontRef) {
ATSFontDeactivate(containerRef, NULL, kATSOptionFlagsDefault);
return 0;
}
cgFontRef.adoptCF(CGFontCreateWithPlatformFont(&fontRef));
// Workaround for <rdar://problem/5675504>.
if (cgFontRef && !CGFontGetNumberOfGlyphs(cgFontRef.get()))
cgFontRef = 0;
if (!cgFontRef) {
ATSFontDeactivate(containerRef, NULL, kATSOptionFlagsDefault);
return 0;
}
#endif // PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
FontCustomPlatformData* fontCustomPlatformData = new FontCustomPlatformData(containerRef, cgFontRef.leakRef());
#if USE(SKIA_ON_MAC_CHROMIUM)
......
......@@ -271,7 +271,6 @@ void MediaPlayerPrivateQTKit::createQTMovie(const String& url)
NSMutableDictionary *movieAttributes = commonMovieAttributes();
[movieAttributes setValue:cocoaURL forKey:QTMovieURLAttribute];
#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
CFDictionaryRef proxySettings = CFNetworkCopySystemProxySettings();
CFArrayRef proxiesForURL = CFNetworkCopyProxiesForURL((CFURLRef)cocoaURL, proxySettings);
BOOL willUseProxy = YES;
......@@ -300,8 +299,7 @@ void MediaPlayerPrivateQTKit::createQTMovie(const String& url)
CFRelease(proxiesForURL);
if (proxySettings)
CFRelease(proxySettings);
#endif
createQTMovie(cocoaURL, movieAttributes);
}
......@@ -880,12 +878,7 @@ bool MediaPlayerPrivateQTKit::hasAudio() const
bool MediaPlayerPrivateQTKit::supportsFullscreen() const
{
#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
return true;
#else
// See <rdar://problem/7389945>
return false;
#endif
}
void MediaPlayerPrivateQTKit::setVolume(float volume)
......@@ -907,11 +900,11 @@ void MediaPlayerPrivateQTKit::setClosedCaptionsVisible(bool closedCaptionsVisibl
if (metaDataAvailable()) {
wkQTMovieSetShowClosedCaptions(m_qtMovie.get(), closedCaptionsVisible);
#if USE(ACCELERATED_COMPOSITING) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
if (closedCaptionsVisible && m_qtVideoLayer) {
// Captions will be rendered upside down unless we flag the movie as flipped (again). See <rdar://7408440>.
[m_qtVideoLayer.get() setGeometryFlipped:YES];
}
#if USE(ACCELERATED_COMPOSITING)
if (closedCaptionsVisible && m_qtVideoLayer) {
// Captions will be rendered upside down unless we flag the movie as flipped (again). See <rdar://7408440>.
[m_qtVideoLayer.get() setGeometryFlipped:YES];
}
#endif
}
}
......@@ -1005,7 +998,6 @@ void MediaPlayerPrivateQTKit::cacheMovieScale()
NSSize initialSize = NSZeroSize;
NSSize naturalSize = [[m_qtMovie.get() attributeForKey:QTMovieNaturalSizeAttribute] sizeValue];
#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
// QTMovieCurrentSizeAttribute is not allowed with instances of QTMovie that have been
// opened with QTMovieOpenForPlaybackAttribute, so ask for the display transform attribute instead.
NSAffineTransform *displayTransform = [m_qtMovie.get() attributeForKey:@"QTMoviePreferredTransformAttribute"];
......@@ -1015,9 +1007,6 @@ void MediaPlayerPrivateQTKit::cacheMovieScale()
initialSize.width = naturalSize.width;
initialSize.height = naturalSize.height;
}
#else
initialSize = [[m_qtMovie.get() attributeForKey:QTMovieCurrentSizeAttribute] sizeValue];
#endif
if (naturalSize.width)
m_scaleFactor.setWidth(initialSize.width / naturalSize.width);
......
......@@ -225,15 +225,6 @@ void SimpleFontData::platformInit()
NSString *familyName = [m_platformData.font() familyName];
if ([familyName isEqualToString:@"Times"] || [familyName isEqualToString:@"Helvetica"] || [familyName isEqualToString:@"Courier"])
ascent += floorf(((ascent + descent) * 0.15f) + 0.5f);
#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
else if ([familyName isEqualToString:@"Geeza Pro"]) {
// Geeza Pro has glyphs that draw slightly above the ascent or far below the descent. Adjust
// those vertical metrics to better match reality, so that diacritics at the bottom of one line
// do not overlap diacritics at the top of the next line.
ascent *= 1.08f;
descent *= 2.f;
}
#endif
// Compute and store line spacing, before the line metrics hacks are applied.
m_fontMetrics.setLineSpacing(lroundf(ascent) + lroundf(descent) + lroundf(lineGap));
......
......@@ -36,13 +36,6 @@ namespace WebCore {
class PlatformCALayerClient;
}
#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
@interface CALayer(WebLayerInternal)
- (CGAffineTransform)contentsTransform;
- (void)setContentsTransform:(CGAffineTransform)t;
@end
#endif
@interface WebLayer : CALayer
{
}
......
......@@ -253,11 +253,7 @@ void Cursor::ensurePlatformCursor() const
break;
case Cursor::ContextMenu:
#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
m_platformCursor = [NSCursor contextualMenuCursor];
#else
m_platformCursor = createNamedCursor("contextMenuCursor", 3, 2);
#endif
break;
case Cursor::Alias:
......@@ -277,19 +273,11 @@ void Cursor::ensurePlatformCursor() const
break;
case Cursor::NoDrop:
#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
m_platformCursor = [NSCursor operationNotAllowedCursor];
#else
m_platformCursor = createNamedCursor("noDropCursor", 3, 1);
#endif
break;
case Cursor::Copy:
#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
m_platformCursor = [NSCursor dragCopyCursor];
#else
m_platformCursor = createNamedCursor("copyCursor", 3, 2);
#endif
break;
case Cursor::None:
......@@ -297,11 +285,7 @@ void Cursor::ensurePlatformCursor() const
break;
case Cursor::NotAllowed:
#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
m_platformCursor = [NSCursor operationNotAllowedCursor];
#else
m_platformCursor = createNamedCursor("notAllowedCursor", 11, 11);
#endif
break;
case Cursor::ZoomIn:
......
......@@ -29,22 +29,14 @@
#include <IOKit/pwr_mgt/IOPMLib.h>
#include <wtf/RetainPtr.h>
#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
#include <wtf/UnusedParam.h>
#include <CoreServices/CoreServices.h>
#endif
namespace WebCore {
static const double systemActivityInterval = 1;
DisplaySleepDisabler::DisplaySleepDisabler(const char* reason)
: m_disableDisplaySleepAssertion(0)
#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
, m_systemActivityTimer(this, &DisplaySleepDisabler::systemActivityTimerFired)
#endif
{
#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
#if !PLATFORM(IOS)
RetainPtr<CFStringRef> reasonCF(AdoptCF, CFStringCreateWithCString(kCFAllocatorDefault, reason, kCFStringEncodingUTF8));
IOPMAssertionCreateWithName(kIOPMAssertionTypeNoDisplaySleep, kIOPMAssertionLevelOn, reasonCF.get(), &m_disableDisplaySleepAssertion);
#else
......@@ -59,11 +51,4 @@ DisplaySleepDisabler::~DisplaySleepDisabler()
IOPMAssertionRelease(m_disableDisplaySleepAssertion);
}
#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
void DisplaySleepDisabler::systemActivityTimerFired(Timer<DisplaySleepDisabler>*)
{
UpdateSystemActivity(OverallAct);
}
#endif
}
......@@ -29,10 +29,6 @@
#include <wtf/Noncopyable.h>
#include <wtf/PassOwnPtr.h>
#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
#include "Timer.h"
#endif
namespace WebCore {
class DisplaySleepDisabler {
......@@ -43,15 +39,8 @@ public:
private:
DisplaySleepDisabler(const char* reason);
#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
void systemActivityTimerFired(Timer<DisplaySleepDisabler>*);
#endif
uint32_t m_disableDisplaySleepAssertion;
#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
Timer<DisplaySleepDisabler> m_systemActivityTimer;
#endif
};
}
......
......@@ -29,15 +29,6 @@
@protocol NAME <NSObject> \
@end
#if __MAC_OS_X_VERSION_MAX_ALLOWED == 1050
EMPTY_PROTOCOL(NSTableViewDataSource)
EMPTY_PROTOCOL(NSTableViewDelegate)
EMPTY_PROTOCOL(NSWindowDelegate)
EMPTY_PROTOCOL(NSAnimationDelegate)
#endif
#if __MAC_OS_X_VERSION_MAX_ALLOWED <= 1060
EMPTY_PROTOCOL(NSURLConnectionDelegate)
......
......@@ -79,12 +79,10 @@ namespace WebCore {
} _flags;
}
#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
- (id)init;
- (id)initWithDOMRange:(DOMRange *)domRange;
- (NSAttributedString *)attributedString;
#endif
+ (NSAttributedString *)editingAttributedStringFromRange:(WebCore::Range*)range;
@end
......
......@@ -53,8 +53,6 @@ using namespace HTMLNames;
static NSFileWrapper *fileWrapperForURL(DocumentLoader *, NSURL *);
static NSFileWrapper *fileWrapperForElement(Element*);
#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
// Additional control Unicode characters
const unichar WebNextLineCharacter = 0x0085;
......@@ -99,12 +97,8 @@ static NSFont *WebDefaultFont()
return defaultFont;
}
#endif