+2012-07-14 Mark Rowe <mrowe@apple.com>
+
+ Make it explicit which code paths iOS should use when doing checks based on OS X versions.
+
+ Rubber-stamped by David Kilzer.
+
+ * WebCore.exp.in:
+ * accessibility/AccessibilityList.h:
+ * accessibility/AccessibilityTable.h:
+ * accessibility/mac/AXObjectCacheMac.mm:
+ * editing/mac/EditorMac.mm:
+ * loader/MainResourceLoader.cpp:
+ * loader/MainResourceLoader.h:
+ * page/AlternativeTextClient.h:
+ * page/mac/SettingsMac.mm:
+ * platform/LocalizedStrings.cpp:
+ * platform/MemoryPressureHandler.cpp:
+ * platform/audio/mac/AudioBusMac.mm:
+ * platform/graphics/Gradient.h:
+ * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
+ * platform/graphics/ca/GraphicsLayerCA.cpp:
+ * platform/graphics/ca/PlatformCALayer.h:
+ * platform/graphics/ca/mac/PlatformCALayerMac.mm:
+ * platform/graphics/ca/mac/TileCache.mm:
+ * platform/graphics/cg/GraphicsContextCG.cpp:
+ * platform/graphics/cg/ImageBufferCG.cpp:
+ * platform/graphics/cg/ImageBufferDataCG.h:
+ * platform/graphics/cg/ImageCG.cpp:
+ * platform/graphics/cg/ImageSourceCG.cpp:
+ * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
+ * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
+ * platform/graphics/mac/ComplexTextController.cpp:
+ * platform/graphics/mac/ComplexTextControllerCoreText.mm:
+ * platform/graphics/mac/FontCacheMac.mm:
+ * platform/graphics/mac/FontCustomPlatformData.cpp:
+ * platform/graphics/mac/FontMac.mm:
+ * platform/graphics/mac/GraphicsContextMac.mm:
+ * platform/graphics/mac/SimpleFontDataMac.mm:
+ * platform/graphics/mac/WebLayer.h:
+ * platform/graphics/mac/WebLayer.mm:
+ * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
+ * platform/mac/DisplaySleepDisabler.cpp:
+ * platform/mac/DisplaySleepDisabler.h:
+ * platform/mac/HTMLConverter.h:
+ * platform/mac/HTMLConverter.mm:
+ * platform/mac/MemoryPressureHandlerMac.mm:
+ * platform/mac/SharedTimerMac.mm:
+ * platform/mac/SuddenTermination.mm:
+ * platform/mac/WebFontCache.mm:
+ * platform/network/Credential.h:
+ * platform/network/ResourceHandle.h:
+ * platform/network/cf/DNSCFNet.cpp:
+ * platform/network/cf/ProxyServerCFNet.cpp:
+ * platform/network/cf/ResourceRequest.h:
+ * platform/network/cf/SocketStreamHandleCFNet.cpp:
+ * platform/network/mac/AuthenticationMac.mm:
+ * platform/network/mac/CookieStorageMac.mm:
+ * platform/network/mac/ResourceHandleMac.mm:
+ * platform/network/mac/ResourceRequestMac.mm:
+ * platform/network/mac/WebCoreURLResponse.mm:
+ * platform/text/TextChecking.h:
+ * platform/text/cf/HyphenationCF.cpp:
+ * platform/text/mac/HyphenationMac.mm:
+ * rendering/RenderLayerBacking.cpp:
+ * rendering/RenderLayerCompositor.cpp:
+
2012-07-14 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r122614.
__ZNK7WebCore7IntSizecv7_NSSizeEv
#endif
-#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1060 && !PLATFORM(IOS)
+#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED == 1060
_wkGetNSEventMomentumPhase
#endif
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070 || PLATFORM(IOS)
+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
_wkCALayerEnumerateRectsBeingDrawnWithBlock
_wkCFURLRequestAllowAllPostCaching
_wkCGPathAddRoundedRect
_wkCreateCTTypesetterWithUniCharProviderAndOptions
#endif
-#if (__MAC_OS_X_VERSION_MIN_REQUIRED >= 1070 || PLATFORM(IOS)) && !PLATFORM(IOS_SIMULATOR)
+#if (PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070) && !PLATFORM(IOS_SIMULATOR)
_wkIOSurfaceContextCreate
_wkIOSurfaceContextCreateImage
#endif
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070 && !PLATFORM(IOS)
+#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
_wkAVAssetResolvedURL
_wkCopyDefaultSearchProviderDisplayName
_wkCreateVMPressureDispatchOnMainQueue
_wkRecommendedScrollerStyle
#endif
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 && !PLATFORM(IOS)
+#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
_wkExecutableWasLinkedOnOrBeforeLion
_wkFilterAddData
_wkFilterCreateInstance
__ZN7WebCore14ResourceHandle21currentStorageSessionEv
__ZN7WebCore14ResourceHandle29privateBrowsingStorageSessionEv
__ZN7WebCore26currentCFHTTPCookieStorageEv
-#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1060
+#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED == 1060
__ZN7WebCore14ResourceHandle24setDefaultStorageSessionEP21__CFURLStorageSession
#else
__ZN7WebCore14ResourceHandle24setDefaultStorageSessionEPK21__CFURLStorageSession
__ZNK7WebCore4KURL22protocolIsInHTTPFamilyEv
#endif
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
+#if PLATFORM(MAC) && !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
__ZN7WebCore27AlternativeTextUIController15addAlternativesERKN3WTF9RetainPtrI18NSTextAlternativesEE
__ZN7WebCore27AlternativeTextUIController22alternativesForContextEy
__ZN7WebCore27AlternativeTextUIController5clearEv
#ifndef AccessibilityList_h
#define AccessibilityList_h
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
+#if PLATFORM(MAC) && !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
#define ACCESSIBILITY_LISTS 0
#else
#define ACCESSIBILITY_LISTS 1
#include "AccessibilityRenderObject.h"
#include <wtf/Forward.h>
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
+#if PLATFORM(MAC) && !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
#define ACCESSIBILITY_TABLES 0
#else
#define ACCESSIBILITY_TABLES 1
macNotification = NSAccessibilityFocusedUIElementChangedNotification;
break;
case AXAutocorrectionOccured:
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
macNotification = @"AXAutocorrectionOccurred";
break;
#else
case AXRowCountChanged:
macNotification = NSAccessibilityRowCountChangedNotification;
break;
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
case AXRowExpanded:
macNotification = NSAccessibilityRowExpandedNotification;
break;
bool choosePlainText;
m_frame->editor()->client()->setInsertionPasteboard(NSGeneralPboard);
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
RefPtr<DocumentFragment> fragment = pasteboard->documentFragment(m_frame, range, allowPlainText, choosePlainText);
if (fragment && shouldInsertFragment(fragment, range, EditorInsertActionPasted))
pasteAsFragment(fragment, canSmartReplaceWithPasteboard(pasteboard), false);
#include "PluginDatabase.h"
#endif
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 && !PLATFORM(IOS)
+#if PLATFORM(MAC) && !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
#include "WebCoreSystemInterface.h"
#endif
, m_loadingMultipartContent(false)
, m_waitingForContentPolicy(false)
, m_timeOfLastDataReceived(0.0)
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 && !PLATFORM(IOS)
+#if PLATFORM(MAC) && !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
, m_filter(0)
#endif
{
MainResourceLoader::~MainResourceLoader()
{
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 && !PLATFORM(IOS)
+#if PLATFORM(MAC) && !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
ASSERT(!m_filter);
#endif
}
// like calling DOMWindow::print(), during which a half-canceled load could try to finish.
documentLoader()->mainReceivedError(error);
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 && !PLATFORM(IOS)
+#if PLATFORM(MAC) && !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
if (m_filter) {
wkFilterRelease(m_filter);
m_filter = 0;
}
#endif
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 && !PLATFORM(IOS)
+#if PLATFORM(MAC) && !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
if (r.url().protocolIs("https") && wkFilterIsManagedSession())
m_filter = wkFilterCreateInstance(r.nsURLResponse());
#endif
ASSERT(!defersLoading());
#endif
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 && !PLATFORM(IOS)
+#if PLATFORM(MAC) && !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
if (m_filter) {
ASSERT(!wkFilterWasBlocked(m_filter));
const char* blockedData = wkFilterAddData(m_filter, data, &length);
ResourceLoader::didReceiveData(data, length, encodedDataLength, allAtOnce);
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 && !PLATFORM(IOS)
+#if PLATFORM(MAC) && !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
if (WebFilterEvaluator *filter = m_filter) {
// If we got here, it means we know if we were blocked or not. If we were blocked, we're
// done loading the page altogether. Either way, we don't need the filter anymore.
RefPtr<MainResourceLoader> protect(this);
RefPtr<DocumentLoader> dl = documentLoader();
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 && !PLATFORM(IOS)
+#if PLATFORM(MAC) && !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
if (m_filter) {
int length;
const char* data = wkFilterDataComplete(m_filter, &length);
void MainResourceLoader::didFail(const ResourceError& error)
{
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 && !PLATFORM(IOS)
+#if PLATFORM(MAC) && !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
if (m_filter) {
wkFilterRelease(m_filter);
m_filter = 0;
#include "SubstituteData.h"
#include <wtf/Forward.h>
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 && !PLATFORM(IOS)
+#if PLATFORM(MAC) && !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
OBJC_CLASS WebFilterEvaluator;
#endif
bool m_waitingForContentPolicy;
double m_timeOfLastDataReceived;
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 && !PLATFORM(IOS)
+#if PLATFORM(MAC) && !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
WebFilterEvaluator *m_filter;
#endif
};
#include <wtf/Vector.h>
#include <wtf/text/WTFString.h>
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
+#if PLATFORM(MAC) && (PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080)
// Some platforms provide UI for suggesting alternative dictation text.
#define WTF_USE_DICTATION_ALTERNATIVES 1
-#endif // PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
+#endif // PLATFORM(MAC) && (PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080)
namespace WebCore {
setStandardFontFamily("Apple SD Gothic Neo", USCRIPT_HANGUL);
setSerifFontFamily("Apple SD Gothic Neo", USCRIPT_HANGUL);
#endif
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
setFixedFontFamily("Apple SD Gothic Neo", USCRIPT_HANGUL);
setSansSerifFontFamily("Apple SD Gothic Neo", USCRIPT_HANGUL);
#else
#endif
}
-#if !PLATFORM(MAC) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
+#if !PLATFORM(MAC) || PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
static String truncatedStringForLookupMenuItem(const String& original)
{
if (original.isEmpty())
String contextMenuItemTagSearchWeb()
{
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
+#if PLATFORM(MAC) && (PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070)
RetainPtr<CFStringRef> searchProviderName(AdoptCF, wkCopyDefaultSearchProviderDisplayName());
return formatLocalizedString(WEB_UI_STRING("Search with %@", "Search with search provider context menu item with provider name inserted"), searchProviderName.get());
#else
String contextMenuItemTagLookUpInDictionary(const String& selectedString)
{
-#if __MAC_OS_X_VERSION_MIN_REQUIRED <= 1060
+#if !PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED <= 1060
UNUSED_PARAM(selectedString);
return WEB_UI_STRING("Look Up in Dictionary", "Look Up in Dictionary context menu item");
#else
String imageTitle(const String& filename, const IntSize& size)
{
#if USE(CF)
-#if !PLATFORM(MAC) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
+#if !PLATFORM(MAC) || PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
RetainPtr<CFStringRef> filenameCFString(AdoptCF, filename.createCFString());
RetainPtr<CFLocaleRef> locale(AdoptCF, CFLocaleCopyCurrent());
RetainPtr<CFNumberFormatterRef> formatter(AdoptCF, CFNumberFormatterCreate(0, locale.get(), kCFNumberFormatterDecimalStyle));
{
}
-#if !PLATFORM(MAC) || __MAC_OS_X_VERSION_MIN_REQUIRED == 1060 || PLATFORM(IOS)
+#if !PLATFORM(MAC) || PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED == 1060
void MemoryPressureHandler::install() { }
void MemoryPressureHandler::uninstall() { }
NSBundle *bundle = [NSBundle bundleForClass:[WebCoreAudioBundleClass class]];
NSURL *audioFileURL = [bundle URLForResource:[NSString stringWithUTF8String:name] withExtension:@"wav" subdirectory:@"audio"];
-#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1060
+#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED == 1060
NSDataReadingOptions options = NSDataReadingMapped;
#else
NSDataReadingOptions options = NSDataReadingMappedIfSafe;
typedef struct CGContext* CGContextRef;
-#define USE_CG_SHADING (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED == 1050)
+#define USE_CG_SHADING (PLATFORM(MAC) && !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED == 1050)
#if USE_CG_SHADING
typedef struct CGShading* CGShadingRef;
[options.get() setObject:[NSNumber numberWithInt:AVAssetReferenceRestrictionForbidRemoteReferenceToLocal | AVAssetReferenceRestrictionForbidLocalReferenceToRemote] forKey:AVURLAssetReferenceRestrictionsKey];
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
RetainPtr<NSMutableDictionary> headerFields(AdoptNS, [[NSMutableDictionary alloc] init]);
String referrer = player()->referrer();
static inline bool supportsAcceleratedFilterAnimations()
{
// <rdar://problem/10907251> - WebKit2 doesn't support CA animations of CI filters on Lion and below
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
+#if PLATFORM(MAC) && (PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080)
return true;
#else
return false;
int numAnimations = isMatrixAnimation ? 1 : operations->size();
bool reverseAnimationList = true;
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070 && !PLATFORM(WIN)
+#if !PLATFORM(IOS) && !PLATFORM(WIN) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
// Old versions of Core Animation apply animations in reverse order (<rdar://problem/7095638>) so we need to flip the list.
// to be non-additive. For binary compatibility, the current version of Core Animation preserves this behavior for applications linked
// on or before Snow Leopard.
FloatSize GraphicsLayerCA::constrainedSize() const
{
FloatSize constrainedSize = m_size;
-#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1060
+#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED == 1060
float tileColumns = ceilf(m_size.width() / kTiledLayerTileSize);
float tileRows = ceilf(m_size.height() / kTiledLayerTileSize);
double numTiles = tileColumns * tileRows;
void printTree() const;
#endif
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
+#if PLATFORM(MAC) && (PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070)
void synchronouslyDisplayTilesInRect(const FloatRect&);
#endif
@end
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
@interface CATiledLayer(GraphicsLayerCAPrivate)
- (void)displayInRect:(CGRect)r levelOfDetail:(int)lod options:(NSDictionary *)dict;
- (BOOL)canDrawConcurrently;
@interface CALayer(Private)
- (void)setContentsChanged;
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
- (void)setAcceleratesDrawing:(BOOL)flag;
- (BOOL)acceleratesDrawing;
#endif
bool PlatformCALayer::acceleratesDrawing() const
{
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
return [m_layer.get() acceleratesDrawing];
#else
return false;
void PlatformCALayer::setAcceleratesDrawing(bool acceleratesDrawing)
{
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
BEGIN_BLOCK_OBJC_EXCEPTIONS
[m_layer.get() setAcceleratesDrawing:acceleratesDrawing];
END_BLOCK_OBJC_EXCEPTIONS
float PlatformCALayer::contentsScale() const
{
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
return [m_layer.get() contentsScale];
#else
return 1;
void PlatformCALayer::setContentsScale(float value)
{
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
BEGIN_BLOCK_OBJC_EXCEPTIONS
[m_layer.get() setContentsScale:value];
END_BLOCK_OBJC_EXCEPTIONS
return [tileCacheLayer tiledBacking];
}
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
void PlatformCALayer::synchronouslyDisplayTilesInRect(const FloatRect& rect)
{
if (m_layerType != LayerTypeWebTiledLayer)
using namespace std;
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
@interface CALayer (WebCALayerDetails)
- (void)setAcceleratesDrawing:(BOOL)flag;
@end
if (m_scale == scale && m_deviceScaleFactor == deviceScaleFactor)
return;
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
Vector<FloatRect> dirtyRects;
m_deviceScaleFactor = deviceScaleFactor;
void TileCache::setAcceleratesDrawing(bool acceleratesDrawing)
{
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
if (m_acceleratesDrawing == acceleratesDrawing)
return;
[layer.get() setName:@"Tile"];
#endif
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
[layer.get() setContentsScale:m_deviceScaleFactor];
[layer.get() setAcceleratesDrawing:m_acceleratesDrawing];
#endif
#if PLATFORM(MAC) || (PLATFORM(CHROMIUM) && OS(DARWIN))
-#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
// Building on 10.6 or later: kCGInterpolationMedium is defined in the CGInterpolationQuality enum.
#define HAVE_CG_INTERPOLATION_MEDIUM 1
#endif
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
// Targeting 10.6 or later: use kCGInterpolationMedium.
#define WTF_USE_CG_INTERPOLATION_MEDIUM 1
#endif
blurRadius = min(blurRadius, narrowPrecisionToCGFloat(1000.0));
-#if __MAC_OS_X_VERSION_MIN_REQUIRED <= 1070
+#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED <= 1070
if (!isAcceleratedContext()) {
// Work around <rdar://problem/5539388> by ensuring that the offsets will get truncated
// to the desired integer. Also see: <rdar://problem/10056277>
void GraphicsContext::setAllowsFontSmoothing(bool allowsFontSmoothing)
{
UNUSED_PARAM(allowsFontSmoothing);
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
CGContextRef context = platformContext();
CGContextSetAllowsFontSmoothing(context, allowsFontSmoothing);
#endif
#include <IOSurface/IOSurface.h>
#endif
-#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1070
+#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED == 1070
#include <wtf/CurrentTime.h>
#endif
m_context->scale(FloatSize(1, -1));
m_context->translate(0, -size.height());
m_context->setIsAcceleratedContext(accelerateRendering);
-#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1070
+#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED == 1070
m_data.m_lastFlushTime = currentTimeMS();
#endif
success = true;
GraphicsContext* ImageBuffer::context() const
{
-#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1070
+#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED == 1070
// Force a flush if last flush was more than 20ms ago
if (m_context->isAcceleratedContext()) {
double elapsedTime = currentTimeMS() - m_data.m_lastFlushTime;
#if USE(IOSURFACE_CANVAS_BACKING_STORE)
else {
image = wkIOSurfaceContextCreateImage(context()->platformContext());
-#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1070
+#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED == 1070
m_data.m_lastFlushTime = currentTimeMS();
#endif
}
{
if (m_context->isAcceleratedContext()) {
CGContextFlush(context()->platformContext());
-#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1070
+#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED == 1070
m_data.m_lastFlushTime = currentTimeMS();
#endif
}
{
if (m_context->isAcceleratedContext()) {
CGContextFlush(context()->platformContext());
-#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1070
+#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED == 1070
m_data.m_lastFlushTime = currentTimeMS();
#endif
}
#include <wtf/RetainPtr.h>
#include <wtf/Uint8ClampedArray.h>
-#if (PLATFORM(MAC) && USE(CA) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070)
+#if (PLATFORM(MAC) && USE(CA) && (PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070))
#define WTF_USE_IOSURFACE_CANVAS_BACKING_STORE 1
#endif
Checked<unsigned, RecordOverflow> m_bytesPerRow;
CGColorSpaceRef m_colorSpace;
RetainPtr<IOSurfaceRef> m_surface;
-#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1070
+#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED == 1070
mutable double m_lastFlushTime;
#endif
// 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 __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
+#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())
if (!options) {
const unsigned numOptions = 3;
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED <= 1070
+#if PLATFORM(MAC) && !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED <= 1070
// Lion and Snow Leopard only return Orientation when kCGImageSourceSkipMetaData is false,
// and incorrectly return cached metadata if an image is queried once with kCGImageSourceSkipMetaData true
// and then subsequently with kCGImageSourceSkipMetaData false.
CGFontRef cgFont = 0;
loadFont(nsFont, size, m_font, cgFont);
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
// FIXME: Chromium: The following code isn't correct for the Chromium port since the sandbox might
// have blocked font loading, in which case we'll only have the real loaded font file after the call to loadFont().
{
CTFontSymbolicTraits traits = CTFontGetSymbolicTraits(toCTFontRef(m_font));
m_isColorBitmapFont = traits & kCTFontColorGlyphsTrait;
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 && !PLATFORM(IOS)
+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
m_isCompositeFontReference = traits & kCTFontCompositeTrait;
#endif
}
#endif
m_cgFont.adoptCF(cgFont);
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
{
CTFontSymbolicTraits traits = CTFontGetSymbolicTraits(toCTFontRef(m_font));
m_isColorBitmapFont = traits & kCTFontColorGlyphsTrait;
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
m_isCompositeFontReference = traits & kCTFontCompositeTrait;
#endif
}
}
return systemVersion >= 0x1060;
-#elif __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
+#elif PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
return true;
#else
return false;
bool MediaPlayerPrivateGStreamer::supportsFullscreen() const
{
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
+#if PLATFORM(MAC) && !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
// See <rdar://problem/7389945>
return false;
#else
#include <wtf/StdLibExtras.h>
#include <wtf/unicode/CharacterNames.h>
-#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
+#if PLATFORM(MAC) && !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
// Undefined when compiling agains the 10.5 SDK.
#define kCTVersionNumber10_6 0x00030000
#endif
#include <CoreText/CoreText.h>
#endif
-#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
+#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[]);
static CFDictionaryRef ltrTypesetterOptions = CFDictionaryCreate(kCFAllocatorDefault, optionKeys, ltrOptionValues, WTF_ARRAY_LENGTH(optionKeys), &kCFCopyStringDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
static CFDictionaryRef rtlTypesetterOptions = CFDictionaryCreate(kCFAllocatorDefault, optionKeys, rtlOptionValues, WTF_ARRAY_LENGTH(optionKeys), &kCFCopyStringDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
ProviderInfo info = { cp, length, stringAttributes.get() };
RetainPtr<CTTypesetterRef> typesetter(AdoptCF, wkCreateCTTypesetterWithUniCharProviderAndOptions(&provideStringAndAttributes, 0, &info, m_run.ltr() ? ltrTypesetterOptions : rtlTypesetterOptions));
#else
fontCache()->invalidate();
}
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
+#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());
void FontCache::platformInit()
{
wkSetUpFontCache();
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
+#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.
FontCustomPlatformData::~FontCustomPlatformData()
{
-#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
+#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
if (m_atsContainer)
ATSFontDeactivate(m_atsContainer, NULL, kATSOptionFlagsDefault);
#endif
RetainPtr<CGFontRef> cgFontRef;
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
RetainPtr<CFDataRef> bufferData(AdoptCF, buffer->createCFData());
RetainPtr<CGDataProviderRef> dataProvider(AdoptCF, CGDataProviderCreateWithCFData(bufferData.get()));
ATSFontDeactivate(containerRef, NULL, kATSOptionFlagsDefault);
return 0;
}
-#endif // __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
+#endif // PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
FontCustomPlatformData* fontCustomPlatformData = new FontCustomPlatformData(containerRef, cgFontRef.leakRef());
#if USE(SKIA_ON_MAC_CHROMIUM)
isCached = true;
}
return result;
-#elif __MAC_OS_X_VERSION_MIN_REQUIRED == 1060
+#elif !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED == 1060
return true;
#else
return false;
} else
CGContextShowGlyphsWithAdvances(context, glyphs, advances, count);
}
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
else {
if (!count)
return;
patternColor = grammarPatternColor.get();
break;
}
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
+#if PLATFORM(MAC) && (PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070)
// To support correction panel.
case DocumentMarkerAutocorrectionReplacementLineStyle:
case DocumentMarkerDictationAlternativesLineStyle:
}
#if !ERROR_DISABLED
-#if defined(__LP64__) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
+#if defined(__LP64__) || PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
static NSString* pathFromFont(NSFont*)
{
// FMGetATSFontRefFromFont is not available. As pathFromFont is only used for debugging purposes,
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 __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
+#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
class PlatformCALayerClient;
}
-#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
+#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
@interface CALayer(WebLayerInternal)
- (CGAffineTransform)contentsTransform;
- (void)setContentsTransform:(CGAffineTransform)t;
AffineTransform transform = CGContextGetCTM(context);
ThemeMac::setFocusRingClipRect(transform.mapRect(clipBounds));
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
__block GraphicsContext* ctx = &graphicsContext;
wkCALayerEnumerateRectsBeingDrawnWithBlock(layer, context, ^(CGRect rect){
bool GraphicsContext3D::systemAllowsMultisamplingOnATICards() const
{
#if PLATFORM(MAC)
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
return true;
#else
ASSERT(isMainThread());
#include <IOKit/pwr_mgt/IOPMLib.h>
#include <wtf/RetainPtr.h>
-#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
+#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
#include <wtf/UnusedParam.h>
#include <CoreServices/CoreServices.h>
#endif
DisplaySleepDisabler::DisplaySleepDisabler(const char* reason)
: m_disableDisplaySleepAssertion(0)
-#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
+#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
, m_systemActivityTimer(this, &DisplaySleepDisabler::systemActivityTimerFired)
#endif
{
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
+#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
RetainPtr<CFStringRef> reasonCF(AdoptCF, CFStringCreateWithCString(kCFAllocatorDefault, reason, kCFStringEncodingUTF8));
IOPMAssertionCreateWithName(kIOPMAssertionTypeNoDisplaySleep, kIOPMAssertionLevelOn, reasonCF.get(), &m_disableDisplaySleepAssertion);
#else
IOPMAssertionRelease(m_disableDisplaySleepAssertion);
}
-#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
+#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
void DisplaySleepDisabler::systemActivityTimerFired(Timer<DisplaySleepDisabler>*)
{
UpdateSystemActivity(OverallAct);
#include <wtf/Noncopyable.h>
#include <wtf/PassOwnPtr.h>
-#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
+#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
#include "Timer.h"
#endif
private:
DisplaySleepDisabler(const char* reason);
-#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
+#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
void systemActivityTimerFired(Timer<DisplaySleepDisabler>*);
#endif
uint32_t m_disableDisplaySleepAssertion;
-#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
+#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
Timer<DisplaySleepDisabler> m_systemActivityTimer;
#endif
};
} _flags;
}
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
- (id)init;
- (id)initWithDOMRange:(DOMRange *)domRange;
static NSFileWrapper *fileWrapperForURL(DocumentLoader *, NSURL *);
static NSFileWrapper *fileWrapperForElement(Element*);
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
// Additional control Unicode characters
const unichar WebNextLineCharacter = 0x0085;
@implementation WebHTMLConverter
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
static NSFont *_fontForNameAndSize(NSString *fontName, CGFloat size, NSMutableDictionary *cache)
{
return (0 == _errorCode) ? [[_attrStr retain] autorelease] : nil;
}
-#endif // __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
+#endif // PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
// This function uses TextIterator, which makes offsets in its result compatible with HTML editing.
+ (NSAttributedString *)editingAttributedStringFromRange:(Range*)range
#import <wtf/CurrentTime.h>
#import <wtf/FastMalloc.h>
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070 && !PLATFORM(IOS)
+#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
#import "WebCoreSystemInterface.h"
#import <notify.h>
#endif
namespace WebCore {
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
#if !PLATFORM(IOS)
static dispatch_source_t _cache_event_source = 0;
#include <stdio.h>
// On Snow Leopard and newer we'll ask IOKit to deliver notifications on a queue.
-#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
+#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
#define IOKIT_WITHOUT_LIBDISPATCH 1
#endif
static void (*sharedTimerFiredFunction)();
static void timerFired(CFRunLoopTimerRef, void*);
-#if !defined(IOKIT_WITHOUT_LIBDISPATCH) && __MAC_OS_X_VERSION_MAX_ALLOWED == 1060
+#if !defined(IOKIT_WITHOUT_LIBDISPATCH) && !PLATFORM(IOS) && __MAC_OS_X_VERSION_MAX_ALLOWED == 1060
extern "C" void IONotificationPortSetDispatchQueue(IONotificationPortRef notify, dispatch_queue_t queue);
#endif
#import "config.h"
#import "SuddenTermination.h"
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
+#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
namespace WebCore {
// Workaround for <rdar://problem/5781372>.
static inline void fixUpWeight(NSInteger& weight, NSString *fontName)
{
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
UNUSED_PARAM(weight);
UNUSED_PARAM(fontName);
#else
#include "PlatformString.h"
-#define CERTIFICATE_CREDENTIALS_SUPPORTED ((PLATFORM(MAC) || PLATFORM(IOS)) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060)
+#define CERTIFICATE_CREDENTIALS_SUPPORTED (PLATFORM(MAC) && (PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060))
#if CERTIFICATE_CREDENTIALS_SUPPORTED
#include <Security/SecBase.h>
typedef struct OpaqueCFHTTPCookieStorage* CFHTTPCookieStorageRef;
#endif
-#if USE(CFURLSTORAGESESSIONS) && PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED <= 1060
+#if USE(CFURLSTORAGESESSIONS) && PLATFORM(MAC) && !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED <= 1060
typedef struct __CFURLStorageSession* CFURLStorageSessionRef;
#elif USE(CFURLSTORAGESESSIONS)
typedef const struct __CFURLStorageSession* CFURLStorageSessionRef;
#include <CFNetwork/CFNetwork.h>
#endif
-#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
+#if !PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
#include <SystemConfiguration/SystemConfiguration.h>
#endif
// as it doesn't necessarily look up the actual external IP. Also, if DNS returns a fake internal address,
// local caches may keep it even after re-connecting to another network.
-#if !PLATFORM(MAC) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
+#if !PLATFORM(MAC) || PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
RetainPtr<CFDictionaryRef> proxySettings(AdoptCF, CFNetworkCopySystemProxySettings());
#else
RetainPtr<CFDictionaryRef> proxySettings(AdoptCF, SCDynamicStoreCopyProxies(0));
namespace WebCore {
-#if !PLATFORM(MAC) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
+#if !PLATFORM(MAC) || PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
static void processProxyServers(Vector<ProxyServer>& proxyServers, CFArrayRef proxies, CFURLRef url);
OBJC_CLASS NSURLRequest;
-#if USE(CFURLSTORAGESESSIONS) && PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED <= 1060
+#if USE(CFURLSTORAGESESSIONS) && PLATFORM(MAC) && !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED <= 1060
typedef struct __CFURLStorageSession* CFURLStorageSessionRef;
#elif USE(CFURLSTORAGESESSIONS)
typedef const struct __CFURLStorageSession* CFURLStorageSessionRef;
#include <wtf/MainThread.h>
#include <wtf/text/WTFString.h>
-#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
+#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
#include <SystemConfiguration/SystemConfiguration.h>
#endif
void SocketStreamHandle::chooseProxy()
{
-#if !PLATFORM(MAC) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
+#if !PLATFORM(MAC) || PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
RetainPtr<CFDictionaryRef> proxyDictionary(AdoptCF, CFNetworkCopySystemProxySettings());
#else
// We don't need proxy information often, so there is no need to set up a permanent dynamic store session.
#else
-#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
+#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
// There is no constant in headers, but NTLM is supported.
NSString * const NSURLAuthenticationMethodNTLM = @"NSURLAuthenticationMethodNTLM";
#endif
void setCookieStoragePrivateBrowsingEnabled(bool enabled)
{
-#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1060 && USE(CFURLSTORAGESESSIONS)
+#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED == 1060 && USE(CFURLSTORAGESESSIONS)
// Don't call wkSetCookieStoragePrivateBrowsingEnabled() when cookie storage is set up via sessions.
// That would make NSURLConnect use global private browsing cookie storage regardless of request session.
// The global private cookie storage has different semantics - it makes new cookies non-persistent,
nsRequest = mutableRequest;
}
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
ASSERT([NSURLConnection instancesRespondToSelector:@selector(_initWithRequest:delegate:usesCache:maxContentLength:startImmediately:connectionProperties:)]);
static bool supportsSettingConnectionProperties = true;
#else
// we make sure that is actually present
ASSERT(challenge.nsURLAuthenticationChallenge());
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
// Proxy authentication is handled by CFNetwork internally. We can get here if the user cancels
// CFNetwork authentication dialog, and we shouldn't ask the client to display another one in that case.
if (challenge.protectionSpace().isProxy()) {
m_httpMethod = method;
m_allowCookies = [m_nsRequest.get() HTTPShouldHandleCookies];
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
if (ResourceRequest::httpPipeliningEnabled())
m_priority = toResourceLoadPriority(wkGetHTTPPipeliningPriority([m_nsRequest.get() _CFURLRequest]));
#endif
nsRequest = [[NSMutableURLRequest alloc] initWithURL:url()];
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
if (ResourceRequest::httpPipeliningEnabled())
wkSetHTTPPipeliningPriority([nsRequest _CFURLRequest], toHTTPPipeliningPriority(m_priority));
#endif
[nsRequest setCachePolicy:(NSURLRequestCachePolicy)cachePolicy()];
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
wkCFURLRequestAllowAllPostCaching([nsRequest _CFURLRequest]);
#endif
}
}
-#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
+#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
// Workaround for <rdar://problem/5539824>
if (CFStringCompare(result.get(), CFSTR("text/xml"), 0) == kCFCompareEqualTo)
result = CFSTR("application/xml");
#define WTF_USE_GRAMMAR_CHECKING 1
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
+#if PLATFORM(MAC) && (PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060)
#define WTF_USE_UNIFIED_TEXT_CHECKING 1
#define WTF_USE_AUTOMATIC_TEXT_REPLACEMENT 1
#endif
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
+#if PLATFORM(MAC) && (PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070)
// Some platforms provide UI for suggesting autocorrection.
#define WTF_USE_AUTOCORRECTION_PANEL 1
// Some platforms use spelling and autocorrection markers to provide visual cue.
// On such platform, if word with marker is edited, we need to remove the marker.
#define WTF_USE_MARKER_REMOVAL_UPON_EDITING 1
-#endif // #if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
+#endif // #if PLATFORM(MAC) && (PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070)
enum TextCheckingType {
TextCheckingTypeSpelling = 1 << 1,
#include "config.h"
#include "Hyphenation.h"
-#if (!PLATFORM(MAC) && !PLATFORM(CHROMIUM)) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
+#if (!PLATFORM(MAC) && !PLATFORM(CHROMIUM)) || PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
#include "AtomicStringKeyedMRUCache.h"
#include "TextBreakIteratorInternalICU.h"
} // namespace WebCore
-#endif // !PLATFORM(MAC) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
+#endif // (!PLATFORM(MAC) && !PLATFORM(CHROMIUM)) || PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
#import "config.h"
#import "Hyphenation.h"
-#if __MAC_OS_X_VERSION_MIN_REQUIRED <= 1060
+#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED <= 1060
#import "AtomicStringKeyedMRUCache.h"
#import "TextBreakIteratorInternalICU.h"
} // namespace WebCore
-#endif // __MAC_OS_X_VERSION_MIN_REQUIRED <= 1060
+#endif // !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED <= 1060
if (renderer()->isVideo() && toRenderVideo(renderer())->shouldDisplayVideo())
return hasBoxDecorationsOrBackground(renderer());
#endif
-#if PLATFORM(MAC) && USE(CA) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
+#if PLATFORM(MAC) && USE(CA) && (PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070)
#elif ENABLE(WEBGL) || ENABLE(ACCELERATED_2D_CANVAS)
if (isAcceleratedCanvas(renderer()))
return hasBoxDecorationsOrBackground(renderer());
if (AnimationController* animController = renderer->animation()) {
return (animController->isRunningAnimationOnRenderer(renderer, CSSPropertyOpacity) && inCompositingMode())
#if ENABLE(CSS_FILTERS)
-#if !PLATFORM(MAC) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
+#if !PLATFORM(MAC) || (!PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080)
// <rdar://problem/10907251> - WebKit2 doesn't support CA animations of CI filters on Lion and below
|| animController->isRunningAnimationOnRenderer(renderer, CSSPropertyWebkitFilter)
-#endif // !PLATFORM(MAC) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
+#endif // !PLATFORM(MAC) || (!PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080)
#endif // CSS_FILTERS
|| animController->isRunningAnimationOnRenderer(renderer, CSSPropertyWebkitTransform);
}