<http://webkit.org/b/91015> Remove BUILDING_ON / TARGETING macros in favor of system...
authormrowe@apple.com <mrowe@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 12 Jul 2012 02:00:04 +0000 (02:00 +0000)
committermrowe@apple.com <mrowe@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 12 Jul 2012 02:00:04 +0000 (02:00 +0000)
This removal was handled by a script that translates the relevant macros in to the equivalent checks
using the system availability macros.

Reviewed by Filip Pizlo.

Source/WebCore:

* 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/ContextMenuController.cpp:
* 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.cpp:
* platform/graphics/cg/ImageBufferDataCG.h:
* platform/graphics/cg/ImageCG.cpp:
* platform/graphics/cg/ImageSourceCG.cpp:
* platform/graphics/cg/PathCG.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/MediaPlayerPrivateQTKit.mm:
* platform/graphics/mac/SimpleFontDataMac.mm:
* platform/graphics/mac/WebLayer.h:
* platform/graphics/mac/WebLayer.mm:
* platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
* platform/mac/CursorMac.mm:
* platform/mac/DisplaySleepDisabler.cpp:
* platform/mac/DisplaySleepDisabler.h:
* platform/mac/EmptyProtocolDefinitions.h:
* platform/mac/HTMLConverter.h:
* platform/mac/HTMLConverter.mm:
* platform/mac/MemoryPressureHandlerMac.mm:
* platform/mac/NSScrollerImpDetails.h:
* platform/mac/PlatformEventFactoryMac.mm:
* platform/mac/PopupMenuMac.mm:
* platform/mac/ScrollAnimatorMac.mm:
* platform/mac/ScrollElasticityController.mm:
* platform/mac/SharedTimerMac.mm:
* platform/mac/SuddenTermination.mm:
* platform/mac/WebCoreFullScreenWindow.mm:
* platform/mac/WebCoreNSCellExtras.h:
* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:
* platform/mac/WebFontCache.mm:
* platform/mac/WebVideoFullscreenController.mm:
* platform/mac/WebVideoFullscreenHUDWindowController.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/ResourceRequestCFNet.cpp:
* 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:
* rendering/RenderThemeMac.mm:

Source/WebKit/chromium:

* src/mac/WebInputEventFactory.mm:

Source/WebKit/mac:

* DefaultDelegates/WebDefaultContextMenuDelegate.mm:
* Misc/WebKitErrors.m:
* Misc/WebNSControlExtras.m:
* Misc/WebNSFileManagerExtras.mm:
* Plugins/Hosted/WebHostedNetscapePluginView.mm:
* Plugins/WebBaseNetscapePluginView.mm:
* Plugins/WebNetscapePluginView.mm:
* WebCoreSupport/WebChromeClient.mm:
* WebCoreSupport/WebEditorClient.mm:
* WebCoreSupport/WebFrameLoaderClient.mm:
* WebCoreSupport/WebSystemInterface.mm:
* WebView/WebClipView.mm:
* WebView/WebDynamicScrollBarsView.mm:
* WebView/WebFrameView.mm:
* WebView/WebFullScreenController.mm:
* WebView/WebHTMLView.mm:
* WebView/WebHTMLViewInternal.h:
* WebView/WebPDFDocumentExtras.mm:
* WebView/WebPreferences.mm:
* WebView/WebResourceInternal.h:
* WebView/WebScriptDebugDelegate.h:
* WebView/WebView.mm:
* WebView/WebViewPrivate.h:

Source/WebKit2:

* Shared/DictionaryPopupInfo.cpp:
* Shared/DictionaryPopupInfo.h:
* Shared/mac/PasteboardTypes.mm:
* Shared/mac/WebEventFactory.mm:
* UIProcess/API/mac/PDFViewController.mm:
* UIProcess/API/mac/PageClientImpl.mm:
* UIProcess/API/mac/WKView.mm:
* UIProcess/Launcher/mac/DynamicLinkerEnvironmentExtractor.h:
* UIProcess/Launcher/mac/DynamicLinkerEnvironmentExtractor.mm:
* UIProcess/Launcher/mac/EnvironmentVariables.cpp:
* UIProcess/Launcher/mac/EnvironmentVariables.h:
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
* UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
* UIProcess/WebPageProxy.cpp:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/mac/TextCheckerMac.mm:
* UIProcess/mac/WKFullScreenWindowController.mm:
* UIProcess/mac/WebContextMac.mm:
* UIProcess/mac/WebPageProxyMac.mm:
* WebKit2Prefix.h:
* WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
* WebProcess/Plugins/Netscape/mac/NetscapeSandboxFunctions.mm:
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
* WebProcess/WebCoreSupport/WebEditorClient.h:
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
* WebProcess/WebPage/WebPage.cpp:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/WebPageMac.mm:
* WebProcess/com.apple.WebProcess.sb.in:
* WebProcess/mac/KeychainItemShimMethods.mm:
* WebProcess/mac/SecItemShimMethods.mm:
* WebProcess/mac/WebProcessMac.mm:
* WebProcess/mac/WebProcessMainMac.mm:
* WebProcess/mac/WebProcessShim.mm:

Source/WTF:

* wtf/Assertions.cpp:
* wtf/FastMalloc.cpp:
* wtf/Platform.h:
* wtf/ThreadingPthreads.cpp:
* wtf/unicode/icu/CollatorICU.cpp:

Tools:

* DumpRenderTree/cf/WebArchiveDumpSupport.cpp:
* DumpRenderTree/mac/CheckedMalloc.cpp:
* DumpRenderTree/mac/DumpRenderTree.mm:
* DumpRenderTree/mac/DumpRenderTreeDraggingInfo.mm:
* DumpRenderTree/mac/LayoutTestControllerMac.mm:
* DumpRenderTree/mac/TextInputController.m:
* TestWebKitAPI/mac/InjectedBundleControllerMac.mm:
* WebKitTestRunner/InjectedBundle/mac/ActivateFonts.mm:
* WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@122400 268f45cc-cd09-0410-ab3c-d52691b4dbfc

158 files changed:
Source/WTF/ChangeLog
Source/WTF/wtf/Assertions.cpp
Source/WTF/wtf/FastMalloc.cpp
Source/WTF/wtf/Platform.h
Source/WTF/wtf/ThreadingPthreads.cpp
Source/WTF/wtf/unicode/icu/CollatorICU.cpp
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/accessibility/AccessibilityList.h
Source/WebCore/accessibility/AccessibilityTable.h
Source/WebCore/accessibility/mac/AXObjectCacheMac.mm
Source/WebCore/editing/mac/EditorMac.mm
Source/WebCore/loader/MainResourceLoader.cpp
Source/WebCore/loader/MainResourceLoader.h
Source/WebCore/page/AlternativeTextClient.h
Source/WebCore/page/ContextMenuController.cpp
Source/WebCore/page/mac/SettingsMac.mm
Source/WebCore/platform/LocalizedStrings.cpp
Source/WebCore/platform/MemoryPressureHandler.cpp
Source/WebCore/platform/audio/mac/AudioBusMac.mm
Source/WebCore/platform/graphics/Gradient.h
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm
Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
Source/WebCore/platform/graphics/ca/PlatformCALayer.h
Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm
Source/WebCore/platform/graphics/ca/mac/TileCache.mm
Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp
Source/WebCore/platform/graphics/cg/ImageBufferDataCG.cpp
Source/WebCore/platform/graphics/cg/ImageBufferDataCG.h
Source/WebCore/platform/graphics/cg/ImageCG.cpp
Source/WebCore/platform/graphics/cg/ImageSourceCG.cpp
Source/WebCore/platform/graphics/cg/PathCG.cpp
Source/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm
Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
Source/WebCore/platform/graphics/mac/ComplexTextController.cpp
Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm
Source/WebCore/platform/graphics/mac/FontCacheMac.mm
Source/WebCore/platform/graphics/mac/FontCustomPlatformData.cpp
Source/WebCore/platform/graphics/mac/FontMac.mm
Source/WebCore/platform/graphics/mac/GraphicsContextMac.mm
Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm
Source/WebCore/platform/graphics/mac/SimpleFontDataMac.mm
Source/WebCore/platform/graphics/mac/WebLayer.h
Source/WebCore/platform/graphics/mac/WebLayer.mm
Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGL.cpp
Source/WebCore/platform/mac/CursorMac.mm
Source/WebCore/platform/mac/DisplaySleepDisabler.cpp
Source/WebCore/platform/mac/DisplaySleepDisabler.h
Source/WebCore/platform/mac/EmptyProtocolDefinitions.h
Source/WebCore/platform/mac/HTMLConverter.h
Source/WebCore/platform/mac/HTMLConverter.mm
Source/WebCore/platform/mac/MemoryPressureHandlerMac.mm
Source/WebCore/platform/mac/NSScrollerImpDetails.h
Source/WebCore/platform/mac/PlatformEventFactoryMac.mm
Source/WebCore/platform/mac/PopupMenuMac.mm
Source/WebCore/platform/mac/ScrollAnimatorMac.mm
Source/WebCore/platform/mac/ScrollElasticityController.mm
Source/WebCore/platform/mac/SharedTimerMac.mm
Source/WebCore/platform/mac/SuddenTermination.mm
Source/WebCore/platform/mac/WebCoreFullScreenWindow.mm
Source/WebCore/platform/mac/WebCoreNSCellExtras.h
Source/WebCore/platform/mac/WebCoreSystemInterface.h
Source/WebCore/platform/mac/WebCoreSystemInterface.mm
Source/WebCore/platform/mac/WebFontCache.mm
Source/WebCore/platform/mac/WebVideoFullscreenController.mm
Source/WebCore/platform/mac/WebVideoFullscreenHUDWindowController.mm
Source/WebCore/platform/network/Credential.h
Source/WebCore/platform/network/ResourceHandle.h
Source/WebCore/platform/network/cf/DNSCFNet.cpp
Source/WebCore/platform/network/cf/ProxyServerCFNet.cpp
Source/WebCore/platform/network/cf/ResourceRequest.h
Source/WebCore/platform/network/cf/ResourceRequestCFNet.cpp
Source/WebCore/platform/network/cf/SocketStreamHandleCFNet.cpp
Source/WebCore/platform/network/mac/AuthenticationMac.mm
Source/WebCore/platform/network/mac/CookieStorageMac.mm
Source/WebCore/platform/network/mac/ResourceHandleMac.mm
Source/WebCore/platform/network/mac/ResourceRequestMac.mm
Source/WebCore/platform/network/mac/WebCoreURLResponse.mm
Source/WebCore/platform/text/TextChecking.h
Source/WebCore/platform/text/cf/HyphenationCF.cpp
Source/WebCore/platform/text/mac/HyphenationMac.mm
Source/WebCore/rendering/RenderLayerBacking.cpp
Source/WebCore/rendering/RenderLayerCompositor.cpp
Source/WebCore/rendering/RenderThemeMac.mm
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/src/mac/WebInputEventFactory.mm
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/DefaultDelegates/WebDefaultContextMenuDelegate.mm
Source/WebKit/mac/Misc/WebKitErrors.m
Source/WebKit/mac/Misc/WebNSControlExtras.m
Source/WebKit/mac/Misc/WebNSFileManagerExtras.mm
Source/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm
Source/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm
Source/WebKit/mac/Plugins/WebNetscapePluginView.mm
Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm
Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm
Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm
Source/WebKit/mac/WebView/WebClipView.mm
Source/WebKit/mac/WebView/WebDynamicScrollBarsView.mm
Source/WebKit/mac/WebView/WebFrameView.mm
Source/WebKit/mac/WebView/WebFullScreenController.mm
Source/WebKit/mac/WebView/WebHTMLView.mm
Source/WebKit/mac/WebView/WebHTMLViewInternal.h
Source/WebKit/mac/WebView/WebPDFDocumentExtras.mm
Source/WebKit/mac/WebView/WebPreferences.mm
Source/WebKit/mac/WebView/WebResourceInternal.h
Source/WebKit/mac/WebView/WebScriptDebugDelegate.h
Source/WebKit/mac/WebView/WebView.mm
Source/WebKit/mac/WebView/WebViewPrivate.h
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/DictionaryPopupInfo.cpp
Source/WebKit2/Shared/DictionaryPopupInfo.h
Source/WebKit2/Shared/mac/PasteboardTypes.mm
Source/WebKit2/Shared/mac/WebEventFactory.mm
Source/WebKit2/UIProcess/API/mac/PDFViewController.mm
Source/WebKit2/UIProcess/API/mac/PageClientImpl.mm
Source/WebKit2/UIProcess/API/mac/WKView.mm
Source/WebKit2/UIProcess/Launcher/mac/DynamicLinkerEnvironmentExtractor.h
Source/WebKit2/UIProcess/Launcher/mac/DynamicLinkerEnvironmentExtractor.mm
Source/WebKit2/UIProcess/Launcher/mac/EnvironmentVariables.cpp
Source/WebKit2/UIProcess/Launcher/mac/EnvironmentVariables.h
Source/WebKit2/UIProcess/Launcher/mac/ProcessLauncherMac.mm
Source/WebKit2/UIProcess/Plugins/mac/PluginProcessProxyMac.mm
Source/WebKit2/UIProcess/WebPageProxy.cpp
Source/WebKit2/UIProcess/WebPageProxy.h
Source/WebKit2/UIProcess/WebPageProxy.messages.in
Source/WebKit2/UIProcess/mac/TextCheckerMac.mm
Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm
Source/WebKit2/UIProcess/mac/WebContextMac.mm
Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm
Source/WebKit2/WebKit2Prefix.h
Source/WebKit2/WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp
Source/WebKit2/WebProcess/Plugins/Netscape/mac/NetscapeSandboxFunctions.mm
Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.h
Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm
Source/WebKit2/WebProcess/WebPage/WebPage.cpp
Source/WebKit2/WebProcess/WebPage/WebPage.h
Source/WebKit2/WebProcess/WebPage/WebPage.messages.in
Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm
Source/WebKit2/WebProcess/com.apple.WebProcess.sb.in
Source/WebKit2/WebProcess/mac/KeychainItemShimMethods.mm
Source/WebKit2/WebProcess/mac/SecItemShimMethods.mm
Source/WebKit2/WebProcess/mac/WebProcessMac.mm
Source/WebKit2/WebProcess/mac/WebProcessMainMac.mm
Source/WebKit2/WebProcess/mac/WebProcessShim.mm
Tools/ChangeLog
Tools/DumpRenderTree/cf/WebArchiveDumpSupport.cpp
Tools/DumpRenderTree/mac/CheckedMalloc.cpp
Tools/DumpRenderTree/mac/DumpRenderTree.mm
Tools/DumpRenderTree/mac/DumpRenderTreeDraggingInfo.mm
Tools/DumpRenderTree/mac/LayoutTestControllerMac.mm
Tools/DumpRenderTree/mac/TextInputController.m
Tools/TestWebKitAPI/mac/InjectedBundleControllerMac.mm
Tools/WebKitTestRunner/InjectedBundle/mac/ActivateFonts.mm
Tools/WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm

index 51d810c..ae40bb4 100644 (file)
@@ -1,3 +1,18 @@
+2012-07-11  Mark Rowe  <mrowe@apple.com>
+
+        <http://webkit.org/b/91015> Remove BUILDING_ON / TARGETING macros in favor of system availability macros
+
+        This removal was handled by a script that translates the relevant macros in to the equivalent checks
+        using the system availability macros.
+
+        Reviewed by Filip Pizlo.
+
+        * wtf/Assertions.cpp:
+        * wtf/FastMalloc.cpp:
+        * wtf/Platform.h:
+        * wtf/ThreadingPthreads.cpp:
+        * wtf/unicode/icu/CollatorICU.cpp:
+
 2012-07-11  Anders Carlsson  <andersca@apple.com>
 
         Add -Wtautological-compare and -Wsign-compare warning flags
index 8fe8a38..ae24c4a 100644 (file)
@@ -88,7 +88,7 @@ static void vprintf_stderr_common(const char* format, va_list args)
 
         CFStringGetCString(str, buffer, length, kCFStringEncodingUTF8);
 
-#if !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
         asl_log(0, 0, ASL_LEVEL_NOTICE, "%s", buffer);
 #endif
         fputs(buffer, stderr);
@@ -99,7 +99,7 @@ static void vprintf_stderr_common(const char* format, va_list args)
         return;
     }
 
-#if !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
     va_list copyOfArgs;
     va_copy(copyOfArgs, args);
     asl_vlog(0, 0, ASL_LEVEL_NOTICE, format, copyOfArgs);
index cc8521c..f40adbf 100644 (file)
@@ -4654,10 +4654,10 @@ extern "C" {
 malloc_introspection_t jscore_fastmalloc_introspection = { &FastMallocZone::enumerate, &FastMallocZone::goodSize, &FastMallocZone::check, &FastMallocZone::print,
     &FastMallocZone::log, &FastMallocZone::forceLock, &FastMallocZone::forceUnlock, &FastMallocZone::statistics
 
-#if !defined(BUILDING_ON_LEOPARD) || OS(IOS)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060 || OS(IOS)
     , 0 // zone_locked will not be called on the zone unless it advertises itself as version five or higher.
 #endif
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) || OS(IOS)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070 || OS(IOS)
     , 0, 0, 0, 0 // These members will not be used unless the zone advertises itself as version seven or higher.
 #endif
 
index 919f872..7c76237 100644 (file)
 #if CPU(X86_64)
 #define WTF_USE_PLUGIN_HOST_PROCESS 1
 #endif
-#if !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
 #define ENABLE_GESTURE_EVENTS 1
 #define ENABLE_RUBBER_BANDING 1
 #define WTF_USE_SCROLLBAR_PAINTER 1
 #if defined(ENABLE_VIDEO)
 #define ENABLE_VIDEO_TRACK 1
 #endif
-#if !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
 #define HAVE_LAYER_HOSTING_IN_WINDOW_SERVER 1
 #endif
 #define WTF_USE_APPKIT 1
 #define HAVE_SYS_TIMEB_H 1
 #define WTF_USE_ACCELERATE 1
 
-#ifndef TARGETING_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
 
 #define HAVE_DISPATCH_H 1
 #define HAVE_HOSTED_CORE_ANIMATION 1
 #define ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH 1
 #endif
 
-#if PLATFORM(MAC) && !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION)
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
 #define ENABLE_THREADED_SCROLLING 1
 #endif
 
 #define ENABLE_GC_VALIDATION 1
 #endif
 
-#if PLATFORM(MAC) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
 #define WTF_USE_AVFOUNDATION 1
 #endif
 
-#if PLATFORM(MAC) && !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION)
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
 #define WTF_USE_COREMEDIA 1
 #endif
 
 #define WTF_USE_REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR 1
 #endif
 
-#if PLATFORM(MAC) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
 #define HAVE_INVERTED_WHEEL_EVENTS 1
 #endif
 
index 510173d..2cfa874 100644 (file)
@@ -55,7 +55,7 @@
 #include <sys/time.h>
 #endif
 
-#if OS(MAC_OS_X) && !defined(BUILDING_ON_LEOPARD)
+#if OS(MAC_OS_X) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
 #include <objc/objc-auto.h>
 #endif
 
@@ -228,7 +228,7 @@ void initializeCurrentThreadInternal(const char* threadName)
     UNUSED_PARAM(threadName);
 #endif
 
-#if OS(MAC_OS_X) && !defined(BUILDING_ON_LEOPARD)
+#if OS(MAC_OS_X) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
     // All threads that potentially use APIs above the BSD layer must be registered with the Objective-C
     // garbage collector in case API implementations use garbage-collected memory.
     objc_registerThreadWithCollector();
index e507a20..8206402 100644 (file)
@@ -61,7 +61,7 @@ PassOwnPtr<Collator> Collator::userDefault()
 {
 #if OS(DARWIN) && USE(CF)
     // Mac OS X doesn't set UNIX locale to match user-selected one, so ICU default doesn't work.
-#if !defined(BUILDING_ON_LEOPARD) && !OS(IOS)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060 && !OS(IOS)
     RetainPtr<CFLocaleRef> currentLocale(AdoptCF, CFLocaleCopyCurrent());
     CFStringRef collationOrder = (CFStringRef)CFLocaleGetValue(currentLocale.get(), kCFLocaleCollatorIdentifier);
 #else
index b36a19a..16e8e8c 100644 (file)
@@ -1,3 +1,91 @@
+2012-07-11  Mark Rowe  <mrowe@apple.com>
+
+        <http://webkit.org/b/91015> Remove BUILDING_ON / TARGETING macros in favor of system availability macros
+
+        This removal was handled by a script that translates the relevant macros in to the equivalent checks
+        using the system availability macros.
+
+        Reviewed by Filip Pizlo.
+
+        * 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/ContextMenuController.cpp:
+        * 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.cpp:
+        * platform/graphics/cg/ImageBufferDataCG.h:
+        * platform/graphics/cg/ImageCG.cpp:
+        * platform/graphics/cg/ImageSourceCG.cpp:
+        * platform/graphics/cg/PathCG.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/MediaPlayerPrivateQTKit.mm:
+        * platform/graphics/mac/SimpleFontDataMac.mm:
+        * platform/graphics/mac/WebLayer.h:
+        * platform/graphics/mac/WebLayer.mm:
+        * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
+        * platform/mac/CursorMac.mm:
+        * platform/mac/DisplaySleepDisabler.cpp:
+        * platform/mac/DisplaySleepDisabler.h:
+        * platform/mac/EmptyProtocolDefinitions.h:
+        * platform/mac/HTMLConverter.h:
+        * platform/mac/HTMLConverter.mm:
+        * platform/mac/MemoryPressureHandlerMac.mm:
+        * platform/mac/NSScrollerImpDetails.h:
+        * platform/mac/PlatformEventFactoryMac.mm:
+        * platform/mac/PopupMenuMac.mm:
+        * platform/mac/ScrollAnimatorMac.mm:
+        * platform/mac/ScrollElasticityController.mm:
+        * platform/mac/SharedTimerMac.mm:
+        * platform/mac/SuddenTermination.mm:
+        * platform/mac/WebCoreFullScreenWindow.mm:
+        * platform/mac/WebCoreNSCellExtras.h:
+        * platform/mac/WebCoreSystemInterface.h:
+        * platform/mac/WebCoreSystemInterface.mm:
+        * platform/mac/WebFontCache.mm:
+        * platform/mac/WebVideoFullscreenController.mm:
+        * platform/mac/WebVideoFullscreenHUDWindowController.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/ResourceRequestCFNet.cpp:
+        * 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:
+        * rendering/RenderThemeMac.mm:
+
 2012-07-11  Robert Kroeger  <rjkroege@chromium.org>
 
         Suppress horizontal conversion of PlatformWheelEvents when hasPreciseScrollingDeltas is true
index 91c48ac..a8fe2a9 100644 (file)
@@ -1989,23 +1989,23 @@ __ZN7WebCore7IntSizeC1ERK7_NSSize
 __ZNK7WebCore7IntSizecv7_NSSizeEv
 #endif
 
-#if defined(BUILDING_ON_SNOW_LEOPARD) && !PLATFORM(IOS)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1060 && !PLATFORM(IOS)
 _wkGetNSEventMomentumPhase
 #endif
 
-#if !defined(BUILDING_ON_SNOW_LEOPARD) || PLATFORM(IOS)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070 || PLATFORM(IOS)
 _wkCALayerEnumerateRectsBeingDrawnWithBlock
 _wkCFURLRequestAllowAllPostCaching
 _wkCGPathAddRoundedRect
 _wkCreateCTTypesetterWithUniCharProviderAndOptions
 #endif
 
-#if (!defined(BUILDING_ON_SNOW_LEOPARD) || PLATFORM(IOS)) && !PLATFORM(IOS_SIMULATOR)
+#if (__MAC_OS_X_VERSION_MIN_REQUIRED >= 1070 || PLATFORM(IOS)) && !PLATFORM(IOS_SIMULATOR)
 _wkIOSurfaceContextCreate
 _wkIOSurfaceContextCreateImage
 #endif
 
-#if !defined(BUILDING_ON_SNOW_LEOPARD) && !PLATFORM(IOS)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070 && !PLATFORM(IOS)
 _wkAVAssetResolvedURL
 _wkCopyDefaultSearchProviderDisplayName
 _wkCreateVMPressureDispatchOnMainQueue
@@ -2014,7 +2014,7 @@ _wkExecutableWasLinkedOnOrBeforeSnowLeopard
 _wkRecommendedScrollerStyle
 #endif
 
-#if !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION) && !PLATFORM(IOS)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 && !PLATFORM(IOS)
 _wkExecutableWasLinkedOnOrBeforeLion
 _wkFilterAddData
 _wkFilterCreateInstance
@@ -2073,7 +2073,7 @@ __ZN7WebCore14ResourceHandle46setPrivateBrowsingStorageSessionIdentifierBaseERKN
 __ZN7WebCore14ResourceHandle21currentStorageSessionEv
 __ZN7WebCore14ResourceHandle29privateBrowsingStorageSessionEv
 __ZN7WebCore26currentCFHTTPCookieStorageEv
-#if defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1060
 __ZN7WebCore14ResourceHandle24setDefaultStorageSessionEP21__CFURLStorageSession
 #else
 __ZN7WebCore14ResourceHandle24setDefaultStorageSessionEPK21__CFURLStorageSession
@@ -2543,7 +2543,7 @@ __ZNK7WebCore4KURL7isValidEv
 __ZNK7WebCore4KURL22protocolIsInHTTPFamilyEv
 #endif
 
-#if PLATFORM(MAC) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION)
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
 __ZN7WebCore27AlternativeTextUIController15addAlternativesERKN3WTF9RetainPtrI18NSTextAlternativesEE
 __ZN7WebCore27AlternativeTextUIController22alternativesForContextEy
 __ZN7WebCore27AlternativeTextUIController5clearEv
index de5e96d..02bb5d4 100644 (file)
@@ -29,7 +29,7 @@
 #ifndef AccessibilityList_h
 #define AccessibilityList_h
 
-#if PLATFORM(MAC) && defined(BUILDING_ON_LEOPARD)
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
 #define ACCESSIBILITY_LISTS 0
 #else
 #define ACCESSIBILITY_LISTS 1
index 21814f2..a950830 100644 (file)
@@ -32,7 +32,7 @@
 #include "AccessibilityRenderObject.h"
 #include <wtf/Forward.h>
 
-#if PLATFORM(MAC) && defined(BUILDING_ON_LEOPARD)
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
 #define ACCESSIBILITY_TABLES 0
 #else
 #define ACCESSIBILITY_TABLES 1
index acbc25f..c75e8c1 100644 (file)
@@ -71,7 +71,7 @@ void AXObjectCache::postPlatformNotification(AccessibilityObject* obj, AXNotific
                 macNotification = NSAccessibilityFocusedUIElementChangedNotification;                
             break;
         case AXAutocorrectionOccured:
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
             macNotification = @"AXAutocorrectionOccurred";
             break;
 #else
@@ -107,7 +107,7 @@ void AXObjectCache::postPlatformNotification(AccessibilityObject* obj, AXNotific
         case AXRowCountChanged:
             macNotification = NSAccessibilityRowCountChangedNotification;
             break;
-#ifndef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
         case AXRowExpanded:
             macNotification = NSAccessibilityRowExpandedNotification;
             break;
index c42c623..a7866a3 100644 (file)
@@ -81,7 +81,7 @@ void Editor::pasteWithPasteboard(Pasteboard* pasteboard, bool allowPlainText)
     bool choosePlainText;
     
     m_frame->editor()->client()->setInsertionPasteboard(NSGeneralPboard);
-#if !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __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);
index 8b2204d..d0ff23c 100644 (file)
@@ -57,7 +57,7 @@
 #include "PluginDatabase.h"
 #endif
 
-#if PLATFORM(MAC) && !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION) && !PLATFORM(IOS)
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 && !PLATFORM(IOS)
 #include "WebCoreSystemInterface.h"
 #endif
 
@@ -76,7 +76,7 @@ MainResourceLoader::MainResourceLoader(Frame* frame)
     , m_loadingMultipartContent(false)
     , m_waitingForContentPolicy(false)
     , m_timeOfLastDataReceived(0.0)
-#if PLATFORM(MAC) && !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION) && !PLATFORM(IOS)
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 && !PLATFORM(IOS)
     , m_filter(0)
 #endif
 {
@@ -84,7 +84,7 @@ MainResourceLoader::MainResourceLoader(Frame* frame)
 
 MainResourceLoader::~MainResourceLoader()
 {
-#if PLATFORM(MAC) && !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION) && !PLATFORM(IOS)
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 && !PLATFORM(IOS)
     ASSERT(!m_filter);
 #endif
 }
@@ -134,7 +134,7 @@ void MainResourceLoader::didCancel(const ResourceError& error)
     // like calling DOMWindow::print(), during which a half-canceled load could try to finish.
     documentLoader()->mainReceivedError(error);
 
-#if PLATFORM(MAC) && !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION) && !PLATFORM(IOS)
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 && !PLATFORM(IOS)
     if (m_filter) {
         wkFilterRelease(m_filter);
         m_filter = 0;
@@ -413,7 +413,7 @@ void MainResourceLoader::didReceiveResponse(const ResourceResponse& r)
     }
 #endif
 
-#if PLATFORM(MAC) && !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION) && !PLATFORM(IOS)
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 && !PLATFORM(IOS)
     if (r.url().protocolIs("https") && wkFilterIsManagedSession())
         m_filter = wkFilterCreateInstance(r.nsURLResponse());
 #endif
@@ -443,7 +443,7 @@ void MainResourceLoader::didReceiveData(const char* data, int length, long long
     ASSERT(!defersLoading());
 #endif
 
-#if PLATFORM(MAC) && !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION) && !PLATFORM(IOS)
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 && !PLATFORM(IOS)
     if (m_filter) {
         ASSERT(!wkFilterWasBlocked(m_filter));
         const char* blockedData = wkFilterAddData(m_filter, data, &length);
@@ -469,7 +469,7 @@ void MainResourceLoader::didReceiveData(const char* data, int length, long long
 
     ResourceLoader::didReceiveData(data, length, encodedDataLength, allAtOnce);
 
-#if PLATFORM(MAC) && !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION) && !PLATFORM(IOS)
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 && !PLATFORM(IOS)
     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.
@@ -496,7 +496,7 @@ void MainResourceLoader::didFinishLoading(double finishTime)
     RefPtr<MainResourceLoader> protect(this);
     RefPtr<DocumentLoader> dl = documentLoader();
 
-#if PLATFORM(MAC) && !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION) && !PLATFORM(IOS)
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 && !PLATFORM(IOS)
     if (m_filter) {
         int length;
         const char* data = wkFilterDataComplete(m_filter, &length);
@@ -521,7 +521,7 @@ void MainResourceLoader::didFinishLoading(double finishTime)
 
 void MainResourceLoader::didFail(const ResourceError& error)
 {
-#if PLATFORM(MAC) && !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION) && !PLATFORM(IOS)
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 && !PLATFORM(IOS)
     if (m_filter) {
         wkFilterRelease(m_filter);
         m_filter = 0;
index f005ddc..609da50 100644 (file)
@@ -34,7 +34,7 @@
 #include "SubstituteData.h"
 #include <wtf/Forward.h>
 
-#if PLATFORM(MAC) && !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION) && !PLATFORM(IOS)
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 && !PLATFORM(IOS)
 OBJC_CLASS WebFilterEvaluator;
 #endif
 
@@ -112,7 +112,7 @@ namespace WebCore {
         bool m_waitingForContentPolicy;
         double m_timeOfLastDataReceived;
 
-#if PLATFORM(MAC) && !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION) && !PLATFORM(IOS)
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 && !PLATFORM(IOS)
         WebFilterEvaluator *m_filter;
 #endif
     };
index 67245e6..cd747b6 100644 (file)
 #include <wtf/Vector.h>
 #include <wtf/text/WTFString.h>
 
-#if PLATFORM(MAC) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION)
+#if PLATFORM(MAC) && __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) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION)
+#endif // PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
 
 namespace WebCore {
 
index 6e188fd..3a8a8dd 100644 (file)
@@ -703,7 +703,7 @@ static bool selectionContainsPossibleWord(Frame* frame)
 }
 
 #if PLATFORM(MAC)
-#if defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1060
 #define INCLUDE_SPOTLIGHT_CONTEXT_MENU_ITEM 1
 #else
 #define INCLUDE_SPOTLIGHT_CONTEXT_MENU_ITEM 0
@@ -934,7 +934,7 @@ void ContextMenuController::populate()
                         appendItem(IgnoreGrammarItem, m_contextMenu.get());
                     appendItem(*separatorItem(), m_contextMenu.get());
                     haveContextMenuItemsForMisspellingOrGrammer = true;
-#if PLATFORM(MAC) && !defined(BUILDING_ON_LEOPARD)
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
                 } else {
                     // If the string was autocorrected, generate a contextual menu item allowing it to be changed back.
                     String replacedString = m_hitTestResult.replacedString();
index 23b7925..7d0de05 100644 (file)
@@ -69,7 +69,7 @@ void Settings::initializeDefaultFontFamilies()
     setStandardFontFamily("Apple SD Gothic Neo", USCRIPT_HANGUL);
     setSerifFontFamily("Apple SD Gothic Neo", USCRIPT_HANGUL);
 #endif
-#if !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
     setFixedFontFamily("Apple SD Gothic Neo", USCRIPT_HANGUL);
     setSansSerifFontFamily("Apple SD Gothic Neo", USCRIPT_HANGUL);
 #else
index 9c4bdf3..ae71572 100644 (file)
@@ -72,7 +72,7 @@ static String formatLocalizedString(String format, ...)
 #endif
 }
 
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if !PLATFORM(MAC) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
 static String truncatedStringForLookupMenuItem(const String& original)
 {
     if (original.isEmpty())
@@ -244,7 +244,7 @@ String contextMenuItemTagSearchInSpotlight()
 
 String contextMenuItemTagSearchWeb()
 {
-#if PLATFORM(MAC) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if PLATFORM(MAC) && __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
@@ -254,7 +254,7 @@ String contextMenuItemTagSearchWeb()
 
 String contextMenuItemTagLookUpInDictionary(const String& selectedString)
 {
-#if defined(BUILDING_ON_LEOPARD) || defined(BUILDING_ON_SNOW_LEOPARD)
+#if __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
@@ -755,7 +755,7 @@ String htmlSelectMultipleItems(size_t count)
 String imageTitle(const String& filename, const IntSize& size)
 {
 #if USE(CF)
-#if !defined(BUILDING_ON_LEOPARD)
+#if !PLATFORM(MAC) || __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));
index 15e6808..d111957 100644 (file)
@@ -42,7 +42,7 @@ MemoryPressureHandler::MemoryPressureHandler()
 {
 }
 
-#if !PLATFORM(MAC) || defined(BUILDING_ON_SNOW_LEOPARD) || PLATFORM(IOS)
+#if !PLATFORM(MAC) || __MAC_OS_X_VERSION_MIN_REQUIRED == 1060 || PLATFORM(IOS)
 void MemoryPressureHandler::install() { }
 
 void MemoryPressureHandler::uninstall() { }
index b47f953..35a04da 100644 (file)
@@ -49,7 +49,7 @@ PassOwnPtr<AudioBus> AudioBus::loadPlatformResource(const char* name, float samp
     
     NSBundle *bundle = [NSBundle bundleForClass:[WebCoreAudioBundleClass class]];
     NSURL *audioFileURL = [bundle URLForResource:[NSString stringWithUTF8String:name] withExtension:@"wav" subdirectory:@"audio"];
-#if defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1060
     NSDataReadingOptions options = NSDataReadingMapped;
 #else
     NSDataReadingOptions options = NSDataReadingMappedIfSafe;
index 5e36ff3..0aecd2b 100644 (file)
@@ -39,7 +39,7 @@
 
 typedef struct CGContext* CGContextRef;
 
-#define USE_CG_SHADING defined(BUILDING_ON_LEOPARD)
+#define USE_CG_SHADING (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED == 1050)
 
 #if USE_CG_SHADING
 typedef struct CGShading* CGShadingRef;
index a26141d..58d7925 100644 (file)
@@ -258,7 +258,7 @@ void MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL(const String& url)
 
     [options.get() setObject:[NSNumber numberWithInt:AVAssetReferenceRestrictionForbidRemoteReferenceToLocal | AVAssetReferenceRestrictionForbidLocalReferenceToRemote] forKey:AVURLAssetReferenceRestrictionsKey];
 
-#if !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
     RetainPtr<NSMutableDictionary> headerFields(AdoptNS, [[NSMutableDictionary alloc] init]);
 
     String referrer = player()->referrer();
index de40725..b5372bd 100644 (file)
@@ -247,7 +247,7 @@ static bool animationHasStepsTimingFunction(const KeyframeValueList& valueList,
 static inline bool supportsAcceleratedFilterAnimations()
 {
 // <rdar://problem/10907251> - WebKit2 doesn't support CA animations of CI filters on Lion and below
-#if !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION)
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
     return true;
 #else
     return false;
@@ -1883,7 +1883,7 @@ bool GraphicsLayerCA::createTransformAnimationsFromKeyframes(const KeyframeValue
     int numAnimations = isMatrixAnimation ? 1 : operations->size();
 
     bool reverseAnimationList = true;
-#if !defined(BUILDING_ON_SNOW_LEOPARD) && !PLATFORM(WIN)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070 && !PLATFORM(WIN)
         // 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.
@@ -2392,7 +2392,7 @@ void GraphicsLayerCA::setDebugBorder(const Color& color, float borderWidth)
 FloatSize GraphicsLayerCA::constrainedSize() const
 {
     FloatSize constrainedSize = m_size;
-#if defined(BUILDING_ON_SNOW_LEOPARD)
+#if __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;
index 002b7a0..67e24c3 100644 (file)
@@ -213,7 +213,7 @@ public:
     void printTree() const;
 #endif
 
-#if PLATFORM(MAC) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     void synchronouslyDisplayTilesInRect(const FloatRect&);
 #endif
 
index 3a7ac78..840bc8f 100644 (file)
@@ -93,7 +93,7 @@ static double mediaTimeToCurrentTime(CFTimeInterval t)
 
 @end
 
-#if !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
 @interface CATiledLayer(GraphicsLayerCAPrivate)
 - (void)displayInRect:(CGRect)r levelOfDetail:(int)lod options:(NSDictionary *)dict;
 - (BOOL)canDrawConcurrently;
@@ -103,7 +103,7 @@ static double mediaTimeToCurrentTime(CFTimeInterval t)
 
 @interface CALayer(Private)
 - (void)setContentsChanged;
-#if !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
 - (void)setAcceleratesDrawing:(BOOL)flag;
 - (BOOL)acceleratesDrawing;
 #endif
@@ -554,7 +554,7 @@ void PlatformCALayer::setMasksToBounds(bool value)
 
 bool PlatformCALayer::acceleratesDrawing() const
 {
-#if !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     return [m_layer.get() acceleratesDrawing];
 #else
     return false;
@@ -563,7 +563,7 @@ bool PlatformCALayer::acceleratesDrawing() const
 
 void PlatformCALayer::setAcceleratesDrawing(bool acceleratesDrawing)
 {
-#if !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     BEGIN_BLOCK_OBJC_EXCEPTIONS
     [m_layer.get() setAcceleratesDrawing:acceleratesDrawing];
     END_BLOCK_OBJC_EXCEPTIONS
@@ -910,7 +910,7 @@ void PlatformCALayer::setTimeOffset(CFTimeInterval value)
 
 float PlatformCALayer::contentsScale() const
 {
-#if !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     return [m_layer.get() contentsScale];
 #else
     return 1;
@@ -919,7 +919,7 @@ float PlatformCALayer::contentsScale() const
 
 void PlatformCALayer::setContentsScale(float value)
 {
-#if !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     BEGIN_BLOCK_OBJC_EXCEPTIONS
     [m_layer.get() setContentsScale:value];
     END_BLOCK_OBJC_EXCEPTIONS
@@ -937,7 +937,7 @@ TiledBacking* PlatformCALayer::tiledBacking()
     return [tileCacheLayer tiledBacking];
 }
 
-#if !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
 void PlatformCALayer::synchronouslyDisplayTilesInRect(const FloatRect& rect)
 {
     if (m_layerType != LayerTypeWebTiledLayer)
index 59d8b1f..65682c7 100644 (file)
@@ -36,7 +36,7 @@
 
 using namespace std;
 
-#if !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
 @interface CALayer (WebCALayerDetails)
 - (void)setAcceleratesDrawing:(BOOL)flag;
 @end
@@ -157,7 +157,7 @@ void TileCache::setScale(CGFloat scale)
     if (m_scale == scale && m_deviceScaleFactor == deviceScaleFactor)
         return;
 
-#if !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     Vector<FloatRect> dirtyRects;
 
     m_deviceScaleFactor = deviceScaleFactor;
@@ -182,7 +182,7 @@ void TileCache::setScale(CGFloat scale)
 
 void TileCache::setAcceleratesDrawing(bool acceleratesDrawing)
 {
-#if !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     if (m_acceleratesDrawing == acceleratesDrawing)
         return;
 
@@ -401,7 +401,7 @@ RetainPtr<WebTileLayer> TileCache::createTileLayer(const IntRect& tileRect)
     [layer.get() setName:@"Tile"];
 #endif
 
-#if !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     [layer.get() setContentsScale:m_deviceScaleFactor];
     [layer.get() setAcceleratesDrawing:m_acceleratesDrawing];
 #endif
index 7489468..9723741 100644 (file)
 
 #if PLATFORM(MAC) || (PLATFORM(CHROMIUM) && OS(DARWIN))
 
-#ifndef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
 // Building on 10.6 or later: kCGInterpolationMedium is defined in the CGInterpolationQuality enum.
 #define HAVE_CG_INTERPOLATION_MEDIUM 1
 #endif
 
-#ifndef TARGETING_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
 // Targeting 10.6 or later: use kCGInterpolationMedium.
 #define WTF_USE_CG_INTERPOLATION_MEDIUM 1
 #endif
@@ -1181,7 +1181,7 @@ void GraphicsContext::setPlatformShadow(const FloatSize& offset, float blur, con
     blurRadius = min(blurRadius, narrowPrecisionToCGFloat(1000.0));
 
 
-#if defined(BUILDING_ON_SNOW_LEOPARD) || defined(BUILDING_ON_LION)
+#if __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>
@@ -1598,7 +1598,7 @@ InterpolationQuality GraphicsContext::imageInterpolationQuality() const
 void GraphicsContext::setAllowsFontSmoothing(bool allowsFontSmoothing)
 {
     UNUSED_PARAM(allowsFontSmoothing);
-#if !defined(BUILDING_ON_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
     CGContextRef context = platformContext();
     CGContextSetAllowsFontSmoothing(context, allowsFontSmoothing);
 #endif
index 81982a1..e51c570 100644 (file)
@@ -52,7 +52,7 @@
 #include <IOSurface/IOSurface.h>
 #endif
 
-#if defined(BUILDING_ON_LION)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1070
 #include <wtf/CurrentTime.h>
 #endif
 
@@ -183,7 +183,7 @@ ImageBuffer::ImageBuffer(const IntSize& size, float resolutionScale, ColorSpace
     m_context->scale(FloatSize(1, -1));
     m_context->translate(0, -size.height());
     m_context->setIsAcceleratedContext(accelerateRendering);
-#if defined(BUILDING_ON_LION)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1070
     m_data.m_lastFlushTime = currentTimeMS();
 #endif
     success = true;
@@ -195,7 +195,7 @@ ImageBuffer::~ImageBuffer()
 
 GraphicsContext* ImageBuffer::context() const
 {
-#if defined(BUILDING_ON_LION)
+#if __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;
@@ -250,7 +250,7 @@ NativeImagePtr ImageBuffer::copyNativeImage(BackingStoreCopy copyBehavior) const
 #if USE(IOSURFACE_CANVAS_BACKING_STORE)
     else {
         image = wkIOSurfaceContextCreateImage(context()->platformContext());
-#if defined(BUILDING_ON_LION)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1070
         m_data.m_lastFlushTime = currentTimeMS();
 #endif
     }
@@ -310,7 +310,7 @@ PassRefPtr<Uint8ClampedArray> ImageBuffer::getUnmultipliedImageData(const IntRec
 {
     if (m_context->isAcceleratedContext()) {
         CGContextFlush(context()->platformContext());
-#if defined(BUILDING_ON_LION)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1070
         m_data.m_lastFlushTime = currentTimeMS();
 #endif
     }
@@ -321,7 +321,7 @@ PassRefPtr<Uint8ClampedArray> ImageBuffer::getPremultipliedImageData(const IntRe
 {
     if (m_context->isAcceleratedContext()) {
         CGContextFlush(context()->platformContext());
-#if defined(BUILDING_ON_LION)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1070
         m_data.m_lastFlushTime = currentTimeMS();
 #endif
     }
index 5e3ae78..649d9b7 100644 (file)
@@ -62,7 +62,7 @@ ImageBufferData::ImageBufferData(const IntSize&)
 
 #if USE(ACCELERATE)
 
-#ifndef TARGETING_SNOW_LEOPARD
+#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
 static bool haveVImageRoundingErrorFix() { return true; }
 #else
 // The vImage unpremultiply routine had a rounding bug before 10.6.7 <rdar://problem/8631548>
@@ -72,7 +72,7 @@ static bool haveVImageRoundingErrorFix()
     static bool result = (Gestalt(gestaltSystemVersion, &version) == noErr && version > 0x1066);
     return result;
 }
-#endif // TARGETING_SNOW_LEOPARD
+#endif // __MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
 
 #if USE(IOSURFACE_CANVAS_BACKING_STORE)
 static void convertScanline(void* data, size_t tileNumber, bool premultiply)
index 6233c6c..eabe15e 100644 (file)
@@ -30,7 +30,7 @@
 #include <wtf/RetainPtr.h>
 #include <wtf/Uint8ClampedArray.h>
 
-#if (PLATFORM(MAC) && USE(CA) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD))
+#if (PLATFORM(MAC) && USE(CA) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070)
 #define WTF_USE_IOSURFACE_CANVAS_BACKING_STORE 1
 #endif
 
@@ -54,7 +54,7 @@ public:
     Checked<unsigned, RecordOverflow> m_bytesPerRow;
     CGColorSpaceRef m_colorSpace;
     RetainPtr<IOSurfaceRef> m_surface;
-#if defined(BUILDING_ON_LION)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1070
     mutable double m_lastFlushTime;
 #endif
 
index fed911a..997f4bd 100644 (file)
@@ -269,7 +269,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);
-#ifdef BUILDING_ON_LEOPARD
+#if __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())
index 4335365..9a98757 100644 (file)
@@ -85,7 +85,7 @@ ImageSource::~ImageSource()
 
 void ImageSource::clear(bool destroyAllFrames, size_t, SharedBuffer* data, bool allDataReceived)
 {
-#if !defined(BUILDING_ON_LEOPARD)
+#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.
@@ -116,7 +116,7 @@ static CFDictionaryRef imageSourceOptions(ImageSource::ShouldSkipMetadata skipMe
     if (!options) {
         const unsigned numOptions = 3;
 
-#if defined(BUILDING_ON_LION) || defined(BUILDING_ON_SNOW_LEOPARD)
+#if PLATFORM(MAC) && __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.
index 6cc9378..e7dee39 100644 (file)
@@ -175,7 +175,7 @@ FloatRect Path::boundingRect() const
     // does not, but only exists on 10.6 and above.
 
     CGRect bound = CGRectZero;
-#if !defined(BUILDING_ON_LEOPARD)
+#if !PLATFORM(MAC) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
     bound = CGPathGetPathBoundingBox(m_path);
 #else
     bound = CGPathGetBoundingBox(m_path);
@@ -236,7 +236,7 @@ void Path::addArcTo(const FloatPoint& p1, const FloatPoint& p2, float radius)
 
 void Path::platformAddPathForRoundedRect(const FloatRect& rect, const FloatSize& topLeftRadius, const FloatSize& topRightRadius, const FloatSize& bottomLeftRadius, const FloatSize& bottomRightRadius)
 {
-#if PLATFORM(MAC) && (!defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD))
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     bool equalWidths = (topLeftRadius.width() == topRightRadius.width() && topRightRadius.width() == bottomLeftRadius.width() && bottomLeftRadius.width() == bottomRightRadius.width());
     bool equalHeights = (topLeftRadius.height() == bottomLeftRadius.height() && bottomLeftRadius.height() == topRightRadius.height() && topRightRadius.height() == bottomRightRadius.height());
 
index f30b181..5168635 100644 (file)
@@ -59,13 +59,13 @@ FontPlatformData::FontPlatformData(NSFont *nsFont, float size, bool isPrinterFon
     CGFontRef cgFont = 0;
     loadFont(nsFont, size, m_font, cgFont);
     
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __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 !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION) && !PLATFORM(IOS)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 && !PLATFORM(IOS)
         m_isCompositeFontReference = traits & kCTFontCompositeTrait;
 #endif
     }
@@ -150,11 +150,11 @@ void FontPlatformData::setFont(NSFont *font)
 #endif
     
     m_cgFont.adoptCF(cgFont);
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     {
         CTFontSymbolicTraits traits = CTFontGetSymbolicTraits(toCTFontRef(m_font));
         m_isColorBitmapFont = traits & kCTFontColorGlyphsTrait;
-#if !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
         m_isCompositeFontReference = traits & kCTFontCompositeTrait;
 #endif
     }
@@ -251,7 +251,7 @@ static bool canSetCascadeListForCustomFont()
     }
 
     return systemVersion >= 0x1060;
-#elif !defined(BUILDING_ON_LEOPARD)
+#elif __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
     return true;
 #else
     return false;
index f2b86b2..e3bc450 100644 (file)
@@ -1624,7 +1624,7 @@ bool MediaPlayerPrivateGStreamer::hasSingleSecurityOrigin() const
 
 bool MediaPlayerPrivateGStreamer::supportsFullscreen() const
 {
-#if defined(BUILDING_ON_LEOPARD)
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
     // See <rdar://problem/7389945>
     return false;
 #else
index a9324d3..fe3238e 100644 (file)
@@ -33,7 +33,7 @@
 #include <wtf/StdLibExtras.h>
 #include <wtf/unicode/CharacterNames.h>
 
-#if defined(BUILDING_ON_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
 // Undefined when compiling agains the 10.5 SDK.
 #define kCTVersionNumber10_6 0x00030000
 #endif
index e530453..97178ab 100644 (file)
@@ -39,7 +39,7 @@
 #include <CoreText/CoreText.h>
 #endif
 
-#if defined(BUILDING_ON_LEOPARD)
+#if __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[]);
@@ -218,7 +218,7 @@ void ComplexTextController::collectComplexTextRunsForCharactersCoreText(const UC
         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 !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __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
index 91dd426..49e8095 100644 (file)
@@ -52,7 +52,7 @@ static void invalidateFontCache(void*)
     fontCache()->invalidate();
 }
 
-#if !defined(BUILDING_ON_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
 static void fontCacheRegisteredFontsChangedNotificationCallback(CFNotificationCenterRef, void* observer, CFStringRef name, const void *, CFDictionaryRef)
 {
     ASSERT_UNUSED(observer, observer == fontCache());
@@ -69,7 +69,7 @@ static void fontCacheATSNotificationCallback(ATSFontNotificationInfoRef, void*)
 void FontCache::platformInit()
 {
     wkSetUpFontCache();
-#if !defined(BUILDING_ON_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
     CFNotificationCenterAddObserver(CFNotificationCenterGetLocalCenter(), this, fontCacheRegisteredFontsChangedNotificationCallback, kCTFontManagerRegisteredFontsChangedNotification, 0, CFNotificationSuspensionBehaviorDeliverImmediately);
 #else
     // kCTFontManagerRegisteredFontsChangedNotification does not exist on Leopard and earlier.
index cfddf36..b192684 100644 (file)
@@ -78,7 +78,7 @@ private:
 
 FontCustomPlatformData::~FontCustomPlatformData()
 {
-#ifdef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
     if (m_atsContainer)
         ATSFontDeactivate(m_atsContainer, NULL, kATSOptionFlagsDefault);
 #endif
@@ -119,7 +119,7 @@ FontCustomPlatformData* createFontCustomPlatformData(SharedBuffer* buffer)
 
     RetainPtr<CGFontRef> cgFontRef;
 
-#ifndef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
     RetainPtr<CFDataRef> bufferData(AdoptCF, buffer->createCFData());
     RetainPtr<CGDataProviderRef> dataProvider(AdoptCF, CGDataProviderCreateWithCFData(bufferData.get()));
 
@@ -157,7 +157,7 @@ FontCustomPlatformData* createFontCustomPlatformData(SharedBuffer* buffer)
         ATSFontDeactivate(containerRef, NULL, kATSOptionFlagsDefault);
         return 0;
     }
-#endif // !defined(BUILDING_ON_LEOPARD)
+#endif // __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
 
     FontCustomPlatformData* fontCustomPlatformData = new FontCustomPlatformData(containerRef, cgFontRef.leakRef());
 #if USE(SKIA_ON_MAC_CHROMIUM)
index 4afb5fb..84d0c3b 100644 (file)
@@ -71,7 +71,7 @@ static bool hasBrokenCTFontGetVerticalTranslationsForGlyphs()
         isCached = true;
     }
     return result;
-#elif defined(BUILDING_ON_SNOW_LEOPARD)
+#elif __MAC_OS_X_VERSION_MIN_REQUIRED == 1060
     return true;
 #else
     return false;
@@ -119,7 +119,7 @@ static void showGlyphsWithAdvances(const FloatPoint& point, const SimpleFontData
         } else
             CGContextShowGlyphsWithAdvances(context, glyphs, advances, count);
     }
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     else {
         if (!count)
             return;
index e08591d..29666e7 100644 (file)
@@ -129,7 +129,7 @@ void GraphicsContext::drawLineForDocumentMarker(const FloatPoint& point, float w
             patternColor = grammarPatternColor.get();
             break;
         }
-#if PLATFORM(MAC) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
         // To support correction panel.
         case DocumentMarkerAutocorrectionReplacementLineStyle:
         case DocumentMarkerDictationAlternativesLineStyle:
index cd161a3..2e849af 100644 (file)
@@ -267,7 +267,7 @@ void MediaPlayerPrivateQTKit::createQTMovie(const String& url)
     NSMutableDictionary *movieAttributes = commonMovieAttributes();    
     [movieAttributes setValue:cocoaURL forKey:QTMovieURLAttribute];
 
-#if !defined(BUILDING_ON_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
     CFDictionaryRef proxySettings = CFNetworkCopySystemProxySettings();
     CFArrayRef proxiesForURL = CFNetworkCopyProxiesForURL((CFURLRef)cocoaURL, proxySettings);
     BOOL willUseProxy = YES;
@@ -392,7 +392,7 @@ void MediaPlayerPrivateQTKit::createQTMovie(NSURL *url, NSDictionary *movieAttri
                                              selector:@selector(didEnd:) 
                                                  name:QTMovieDidEndNotification 
                                                object:m_qtMovie.get()];
-#if defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1060
     [[NSNotificationCenter defaultCenter] addObserver:m_objcObserver.get()
                                              selector:@selector(layerHostChanged:)
                                                  name:@"WebKitLayerHostChanged"
@@ -876,7 +876,7 @@ bool MediaPlayerPrivateQTKit::hasAudio() const
 
 bool MediaPlayerPrivateQTKit::supportsFullscreen() const
 {
-#ifndef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
     return true;
 #else
     // See <rdar://problem/7389945>
@@ -903,7 +903,7 @@ void MediaPlayerPrivateQTKit::setClosedCaptionsVisible(bool closedCaptionsVisibl
     if (metaDataAvailable()) {
         wkQTMovieSetShowClosedCaptions(m_qtMovie.get(), closedCaptionsVisible);
 
-#if USE(ACCELERATED_COMPOSITING) && !defined(BUILDING_ON_LEOPARD)
+#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];
@@ -1001,7 +1001,7 @@ void MediaPlayerPrivateQTKit::cacheMovieScale()
     NSSize initialSize = NSZeroSize;
     NSSize naturalSize = [[m_qtMovie.get() attributeForKey:QTMovieNaturalSizeAttribute] sizeValue];
 
-#ifndef BUILDING_ON_LEOPARD
+#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"];
@@ -1236,7 +1236,7 @@ void MediaPlayerPrivateQTKit::didEnd()
 }
 
 #if USE(ACCELERATED_COMPOSITING) && !(PLATFORM(QT) && USE(QTKIT))
-#if defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1060
 static bool layerIsDescendentOf(PlatformLayer* child, PlatformLayer* descendent)
 {
     if (!child || !descendent)
@@ -1253,7 +1253,7 @@ static bool layerIsDescendentOf(PlatformLayer* child, PlatformLayer* descendent)
 
 void MediaPlayerPrivateQTKit::layerHostChanged(PlatformLayer* rootLayer)
 {
-#if defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1060
     if (!rootLayer)
         return;
 
index d5d5560..a6954ec 100644 (file)
@@ -82,7 +82,7 @@ static NSString *webFallbackFontFamily(void)
 }
 
 #if !ERROR_DISABLED
-#if defined(__LP64__) || (!defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD))
+#if defined(__LP64__) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
 static NSString* pathFromFont(NSFont*)
 {
     // FMGetATSFontRefFromFont is not available. As pathFromFont is only used for debugging purposes,
@@ -233,7 +233,7 @@ 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 defined(BUILDING_ON_LEOPARD)
+#if __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
index bb0f444..0d24363 100644 (file)
@@ -36,7 +36,7 @@ namespace WebCore {
     class PlatformCALayerClient;
 }
 
-#if defined(BUILDING_ON_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
 @interface CALayer(WebLayerInternal)
 - (CGAffineTransform)contentsTransform;
 - (void)setContentsTransform:(CGAffineTransform)t;
index 97e9f28..e00a4e7 100644 (file)
@@ -84,7 +84,7 @@ void drawLayerContents(CGContextRef context, CALayer *layer, WebCore::PlatformCA
     AffineTransform transform = CGContextGetCTM(context);
     ThemeMac::setFocusRingClipRect(transform.mapRect(clipBounds));
 
-#if !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     __block GraphicsContext* ctx = &graphicsContext;
 
     wkCALayerEnumerateRectsBeingDrawnWithBlock(layer, context, ^(CGRect rect){
index 6753444..d813bee 100644 (file)
@@ -284,7 +284,7 @@ void GraphicsContext3D::clearDepth(GC3Dclampf depth)
 bool GraphicsContext3D::systemAllowsMultisamplingOnATICards() const
 {
 #if PLATFORM(MAC)
-#if !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
     return true;
 #else
     ASSERT(isMainThread());
index d208533..ac24b88 100644 (file)
@@ -85,7 +85,7 @@ void Cursor::ensurePlatformCursor() const
         break;
 
     case Cursor::Hand:
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
         m_platformCursor = [NSCursor pointingHandCursor];
 #else
         // The pointingHandCursor from NSCursor does not have a shadow on
@@ -99,7 +99,7 @@ void Cursor::ensurePlatformCursor() const
         break;
 
     case Cursor::Wait:
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
         m_platformCursor = wkCursor("BusyButClickable");
 #else
         m_platformCursor = createNamedCursor("waitCursor", 7, 7);
@@ -107,7 +107,7 @@ void Cursor::ensurePlatformCursor() const
         break;
 
     case Cursor::Help:
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
         m_platformCursor = wkCursor("Help");
         if (m_platformCursor)
             break;
@@ -117,7 +117,7 @@ void Cursor::ensurePlatformCursor() const
 
     case Cursor::Move:
     case Cursor::MiddlePanning:
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
         m_platformCursor = wkCursor("Move");
 #else
         m_platformCursor = createNamedCursor("moveCursor", 7, 7);
@@ -126,7 +126,7 @@ void Cursor::ensurePlatformCursor() const
 
     case Cursor::EastResize:
     case Cursor::EastPanning:
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
         m_platformCursor = wkCursor("ResizeEast");
 #else
         m_platformCursor = createNamedCursor("eastResizeCursor", 14, 7);
@@ -135,7 +135,7 @@ void Cursor::ensurePlatformCursor() const
 
     case Cursor::NorthResize:
     case Cursor::NorthPanning:
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
         m_platformCursor = wkCursor("ResizeNorth");
 #else
         m_platformCursor = createNamedCursor("northResizeCursor", 7, 1);
@@ -144,7 +144,7 @@ void Cursor::ensurePlatformCursor() const
 
     case Cursor::NorthEastResize:
     case Cursor::NorthEastPanning:
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
         m_platformCursor = wkCursor("ResizeNortheast");
 #else
         m_platformCursor = createNamedCursor("northEastResizeCursor", 14, 1);
@@ -153,7 +153,7 @@ void Cursor::ensurePlatformCursor() const
 
     case Cursor::NorthWestResize:
     case Cursor::NorthWestPanning:
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
         m_platformCursor = wkCursor("ResizeNorthwest");
 #else
         m_platformCursor = createNamedCursor("northWestResizeCursor", 0, 0);
@@ -162,7 +162,7 @@ void Cursor::ensurePlatformCursor() const
 
     case Cursor::SouthResize:
     case Cursor::SouthPanning:
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
         m_platformCursor = wkCursor("ResizeSouth");
 #else
         m_platformCursor = createNamedCursor("southResizeCursor", 7, 14);
@@ -171,7 +171,7 @@ void Cursor::ensurePlatformCursor() const
 
     case Cursor::SouthEastResize:
     case Cursor::SouthEastPanning:
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
         m_platformCursor = wkCursor("ResizeSoutheast");
 #else
         m_platformCursor = createNamedCursor("southEastResizeCursor", 14, 14);
@@ -180,7 +180,7 @@ void Cursor::ensurePlatformCursor() const
 
     case Cursor::SouthWestResize:
     case Cursor::SouthWestPanning:
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
         m_platformCursor = wkCursor("ResizeSouthwest");
 #else
         m_platformCursor = createNamedCursor("southWestResizeCursor", 1, 14);
@@ -188,7 +188,7 @@ void Cursor::ensurePlatformCursor() const
         break;
 
     case Cursor::WestResize:
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
         m_platformCursor = wkCursor("ResizeWest");
 #else
         m_platformCursor = createNamedCursor("westResizeCursor", 1, 7);
@@ -196,7 +196,7 @@ void Cursor::ensurePlatformCursor() const
         break;
 
     case Cursor::NorthSouthResize:
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
         m_platformCursor = wkCursor("ResizeNorthSouth");
 #else
         m_platformCursor = createNamedCursor("northSouthResizeCursor", 7, 7);
@@ -205,7 +205,7 @@ void Cursor::ensurePlatformCursor() const
 
     case Cursor::EastWestResize:
     case Cursor::WestPanning:
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
         m_platformCursor = wkCursor("ResizeEastWest");
 #else
         m_platformCursor = createNamedCursor("eastWestResizeCursor", 7, 7);
@@ -213,7 +213,7 @@ void Cursor::ensurePlatformCursor() const
         break;
 
     case Cursor::NorthEastSouthWestResize:
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
         m_platformCursor = wkCursor("ResizeNortheastSouthwest");
 #else
         m_platformCursor = createNamedCursor("northEastSouthWestResizeCursor", 7, 7);
@@ -221,7 +221,7 @@ void Cursor::ensurePlatformCursor() const
         break;
 
     case Cursor::NorthWestSouthEastResize:
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
         m_platformCursor = wkCursor("ResizeNorthwestSoutheast");
 #else
         m_platformCursor = createNamedCursor("northWestSouthEastResizeCursor", 7, 7);
@@ -237,7 +237,7 @@ void Cursor::ensurePlatformCursor() const
         break;
 
     case Cursor::VerticalText:
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
         m_platformCursor = [NSCursor IBeamCursorForVerticalLayout];
 #else
         m_platformCursor = createNamedCursor("verticalTextCursor", 7, 7);
@@ -245,7 +245,7 @@ void Cursor::ensurePlatformCursor() const
         break;
 
     case Cursor::Cell:
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
         m_platformCursor = wkCursor("Cell");
         if (m_platformCursor)
             break;
@@ -254,7 +254,7 @@ void Cursor::ensurePlatformCursor() const
         break;
 
     case Cursor::ContextMenu:
-#if !defined(BUILDING_ON_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
         m_platformCursor = [NSCursor contextualMenuCursor];
 #else
         m_platformCursor = createNamedCursor("contextMenuCursor", 3, 2);
@@ -262,7 +262,7 @@ void Cursor::ensurePlatformCursor() const
         break;
 
     case Cursor::Alias:
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
         m_platformCursor = wkCursor("MakeAlias");
 #else
         m_platformCursor = createNamedCursor("aliasCursor", 11, 3);
@@ -270,7 +270,7 @@ void Cursor::ensurePlatformCursor() const
         break;
 
     case Cursor::Progress:
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
         m_platformCursor = wkCursor("BusyButClickable");
 #else
         m_platformCursor = createNamedCursor("progressCursor", 3, 2);
@@ -278,7 +278,7 @@ void Cursor::ensurePlatformCursor() const
         break;
 
     case Cursor::NoDrop:
-#if !defined(BUILDING_ON_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
         m_platformCursor = [NSCursor operationNotAllowedCursor];
 #else
         m_platformCursor = createNamedCursor("noDropCursor", 3, 1);
@@ -286,7 +286,7 @@ void Cursor::ensurePlatformCursor() const
         break;
 
     case Cursor::Copy:
-#if !defined(BUILDING_ON_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
         m_platformCursor = [NSCursor dragCopyCursor];
 #else
         m_platformCursor = createNamedCursor("copyCursor", 3, 2);
@@ -298,7 +298,7 @@ void Cursor::ensurePlatformCursor() const
         break;
 
     case Cursor::NotAllowed:
-#if !defined(BUILDING_ON_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
         m_platformCursor = [NSCursor operationNotAllowedCursor];
 #else
         m_platformCursor = createNamedCursor("notAllowedCursor", 11, 11);
@@ -306,7 +306,7 @@ void Cursor::ensurePlatformCursor() const
         break;
 
     case Cursor::ZoomIn:
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
         m_platformCursor = wkCursor("ZoomIn");
         if (m_platformCursor)
             break;
@@ -315,7 +315,7 @@ void Cursor::ensurePlatformCursor() const
         break;
 
     case Cursor::ZoomOut:
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
         m_platformCursor = wkCursor("ZoomOut");
         if (m_platformCursor)
             break;
index 1073087..4122632 100644 (file)
@@ -29,7 +29,7 @@
 #include <IOKit/pwr_mgt/IOPMLib.h>
 #include <wtf/RetainPtr.h>
 
-#ifdef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
 #include <wtf/UnusedParam.h>
 #endif
 
@@ -39,11 +39,11 @@ static const double systemActivityInterval = 1;
 
 DisplaySleepDisabler::DisplaySleepDisabler(const char* reason)
     : m_disableDisplaySleepAssertion(0)
-#ifdef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
     , m_systemActivityTimer(this, &DisplaySleepDisabler::systemActivityTimerFired)
 #endif
 {
-#ifndef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
     RetainPtr<CFStringRef> reasonCF(AdoptCF, CFStringCreateWithCString(kCFAllocatorDefault, reason, kCFStringEncodingUTF8));
     IOPMAssertionCreateWithName(kIOPMAssertionTypeNoDisplaySleep, kIOPMAssertionLevelOn, reasonCF.get(), &m_disableDisplaySleepAssertion);
 #else
@@ -58,7 +58,7 @@ DisplaySleepDisabler::~DisplaySleepDisabler()
     IOPMAssertionRelease(m_disableDisplaySleepAssertion);
 }
     
-#ifdef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
 void DisplaySleepDisabler::systemActivityTimerFired(Timer<DisplaySleepDisabler>*)
 {
     UpdateSystemActivity(OverallAct);
index 2e466dc..bdfbdb1 100644 (file)
@@ -29,7 +29,7 @@
 #include <wtf/Noncopyable.h>
 #include <wtf/PassOwnPtr.h>
 
-#ifdef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
 #include "Timer.h"
 #endif
 
@@ -44,12 +44,12 @@ public:
 private:
     DisplaySleepDisabler(const char* reason);
 
-#ifdef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
     void systemActivityTimerFired(Timer<DisplaySleepDisabler>*);
 #endif
     
     uint32_t m_disableDisplaySleepAssertion;
-#ifdef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
     Timer<DisplaySleepDisabler> m_systemActivityTimer;
 #endif
 };
index c11b05f..fe63468 100644 (file)
@@ -29,7 +29,7 @@
 @protocol NAME <NSObject> \
 @end
 
-#ifdef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
 
 EMPTY_PROTOCOL(NSTableViewDataSource)
 EMPTY_PROTOCOL(NSTableViewDelegate)
@@ -38,7 +38,7 @@ EMPTY_PROTOCOL(NSAnimationDelegate)
 
 #endif
 
-#if defined(BUILDING_ON_LEOPARD) || defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED <= 1060
 
 EMPTY_PROTOCOL(NSURLConnectionDelegate)
 EMPTY_PROTOCOL(NSURLDownloadDelegate)
index ea1b85d..66eccd0 100644 (file)
@@ -79,7 +79,7 @@ namespace WebCore {
     } _flags;
 }
 
-#if !defined(BUILDING_ON_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
 - (id)init;
 - (id)initWithDOMRange:(DOMRange *)domRange;
 
index 22db81c..fa9f014 100644 (file)
@@ -50,7 +50,7 @@ using namespace HTMLNames;
 static NSFileWrapper *fileWrapperForURL(DocumentLoader *, NSURL *);
 static NSFileWrapper *fileWrapperForElement(Element*);
 
-#ifndef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
 
 // Additional control Unicode characters
 const unichar WebNextLineCharacter = 0x0085;
@@ -100,7 +100,7 @@ static NSFont *WebDefaultFont()
 
 @implementation WebHTMLConverter
 
-#ifndef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
 
 static NSFont *_fontForNameAndSize(NSString *fontName, CGFloat size, NSMutableDictionary *cache)
 {
@@ -1657,7 +1657,7 @@ static NSInteger _colCompare(id block1, id block2, void *)
     return (0 == _errorCode) ? [[_attrStr retain] autorelease] : nil;
 }
 
-#endif // !defined(BUILDING_ON_LEOPARD)
+#endif // __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
index 8d1d10f..c062864 100644 (file)
@@ -33,7 +33,7 @@
 #import <wtf/CurrentTime.h>
 #import <wtf/FastMalloc.h>
 
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) && !PLATFORM(IOS)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070 && !PLATFORM(IOS)
 #import "WebCoreSystemInterface.h"
 #import <notify.h>
 #endif
@@ -42,7 +42,7 @@ using std::max;
 
 namespace WebCore {
 
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
 
 #if !PLATFORM(IOS)
 static dispatch_source_t _cache_event_source = 0;
index 0c956c6..1e1c6cb 100644 (file)
@@ -29,7 +29,7 @@
 #include "config.h"
 
 // Public APIs not available on versions of Mac on which we build
-#if (defined(BUILDING_ON_LEOPARD) || defined(BUILDING_ON_SNOW_LEOPARD))
+#if __MAC_OS_X_VERSION_MIN_REQUIRED <= 1060
 enum {
     NSScrollerStyleLegacy       = 0,
     NSScrollerStyleOverlay      = 1
@@ -44,7 +44,7 @@ enum {
 typedef NSInteger NSScrollerKnobStyle;
 #endif
 
-#if (defined(BUILDING_ON_LEOPARD) || defined(BUILDING_ON_SNOW_LEOPARD))
+#if __MAC_OS_X_VERSION_MIN_REQUIRED <= 1060
 @interface NSScroller(NSObject)
 + (NSScrollerStyle)preferredScrollerStyle;
 @end
index f0ebf5c..2ec524c 100644 (file)
@@ -156,7 +156,7 @@ static PlatformWheelEventPhase momentumPhaseForEvent(NSEvent *event)
 {
     uint32_t phase = PlatformWheelEventPhaseNone;
 
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     if ([event momentumPhase] & NSEventPhaseBegan)
         phase |= PlatformWheelEventPhaseBegan;
     if ([event momentumPhase] & NSEventPhaseStationary)
@@ -189,7 +189,7 @@ static PlatformWheelEventPhase momentumPhaseForEvent(NSEvent *event)
 
 static PlatformWheelEventPhase phaseForEvent(NSEvent *event)
 {
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     uint32_t phase = PlatformWheelEventPhaseNone; 
     if ([event phase] & NSEventPhaseBegan)
         phase |= PlatformWheelEventPhaseBegan;
@@ -201,7 +201,7 @@ static PlatformWheelEventPhase phaseForEvent(NSEvent *event)
         phase |= PlatformWheelEventPhaseEnded;
     if ([event phase] & NSEventPhaseCancelled)
         phase |= PlatformWheelEventPhaseCancelled;
-#if !defined(BUILDING_ON_LION)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
     if ([event momentumPhase] & NSEventPhaseMayBegin)
         phase |= PlatformWheelEventPhaseMayBegin;
 #endif
index 8557844..c0f1974 100644 (file)
@@ -75,10 +75,10 @@ void PopupMenuMac::populate()
     if (!client()->shouldPopOver())
         [m_popup.get() addItemWithTitle:@""];
 
-#ifndef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
     TextDirection menuTextDirection = client()->menuStyle().textDirection();
     [m_popup.get() setUserInterfaceLayoutDirection:menuTextDirection == LTR ? NSUserInterfaceLayoutDirectionLeftToRight : NSUserInterfaceLayoutDirectionRightToLeft];
-#endif // !defined(BUILDING_ON_LEOPARD)
+#endif // __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
 
     ASSERT(client());
     int size = client()->listSize();
@@ -98,7 +98,7 @@ void PopupMenuMac::populate()
                 [attributes setObject:font forKey:NSFontAttributeName];
             }
 
-#ifndef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
             RetainPtr<NSMutableParagraphStyle> paragraphStyle(AdoptNS, [[NSParagraphStyle defaultParagraphStyle] mutableCopy]);
             [paragraphStyle.get() setAlignment:menuTextDirection == LTR ? NSLeftTextAlignment : NSRightTextAlignment];
             NSWritingDirection writingDirection = style.textDirection() == LTR ? NSWritingDirectionLeftToRight : NSWritingDirectionRightToLeft;
@@ -109,7 +109,7 @@ void PopupMenuMac::populate()
                 [attributes setObject:writingDirectionArray.get() forKey:NSWritingDirectionAttributeName];
             }
             [attributes setObject:paragraphStyle.get() forKey:NSParagraphStyleAttributeName];
-#endif // !defined(BUILDING_ON_LEOPARD)
+#endif // __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
 
             // FIXME: Add support for styling the foreground and background colors.
             // FIXME: Find a way to customize text color when an item is highlighted.
index 9688c0a..600dee5 100644 (file)
@@ -635,7 +635,7 @@ ScrollAnimatorMac::~ScrollAnimatorMac()
 
 static bool scrollAnimationEnabledForSystem()
 {
-#if defined(BUILDING_ON_SNOW_LEOPARD) || defined(BUILDING_ON_LION) || PLATFORM(CHROMIUM)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED <= 1070 || PLATFORM(CHROMIUM)
     return [[NSUserDefaults standardUserDefaults] boolForKey:@"AppleScrollAnimationEnabled"];
 #else
     return [[NSUserDefaults standardUserDefaults] boolForKey:@"NSScrollAnimationEnabled"];
index 7a75384..f284513 100644 (file)
@@ -33,7 +33,7 @@
 
 #if ENABLE(RUBBER_BANDING)
 
-#ifdef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
 @interface NSProcessInfo (ScrollAnimatorMacExt)
 - (NSTimeInterval)systemUptime;
 @end
@@ -71,8 +71,7 @@ static const float scrollVelocityZeroingTimeout = 0.10f;
 static const float rubberbandDirectionLockStretchRatio = 1;
 static const float rubberbandMinimumRequiredDeltaBeforeStretch = 10;
 
-#if defined(BUILDING_ON_LEOPARD) || defined(BULDING_ON_SNOW_LEOPARD) || \
-    defined(BUILDING_ON_LION) || PLATFORM(CHROMIUM)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED <= 1070 || PLATFORM(CHROMIUM)
 static const float rubberbandStiffness = 20;
 static const float rubberbandAmplitude = 0.31f;
 static const float rubberbandPeriod = 1.6f;
index d7c501d..18983d9 100644 (file)
@@ -36,7 +36,7 @@
 #include <stdio.h>
 
 // On Snow Leopard and newer we'll ask IOKit to deliver notifications on a queue.
-#ifdef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
 #define IOKIT_WITHOUT_LIBDISPATCH 1
 #endif
 
@@ -46,7 +46,7 @@ static CFRunLoopTimerRef sharedTimer;
 static void (*sharedTimerFiredFunction)();
 static void timerFired(CFRunLoopTimerRef, void*);
 
-#if !defined(IOKIT_WITHOUT_LIBDISPATCH) && defined(BUILDING_ON_SNOW_LEOPARD)
+#if !defined(IOKIT_WITHOUT_LIBDISPATCH) && __MAC_OS_X_VERSION_MIN_REQUIRED == 1060
 extern "C" void IONotificationPortSetDispatchQueue(IONotificationPortRef notify, dispatch_queue_t queue);
 #endif
 
index f624116..ccff78a 100644 (file)
@@ -26,7 +26,7 @@
 #import "config.h"
 #import "SuddenTermination.h"
 
-#ifndef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
 
 namespace WebCore {
 
index f62d14a..cc6ea34 100644 (file)
@@ -42,7 +42,7 @@
     [self setAcceptsMouseMovedEvents:YES];
     [self setReleasedWhenClosed:NO];
     [self setHasShadow:NO];
-#ifndef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
     [self setMovable:NO];
 #else
     [self setMovableByWindowBackground:NO];
index 26be462..7894d3d 100644 (file)
@@ -25,7 +25,7 @@
 
 #import <AppKit/AppKit.h>
 
-#define BUTTON_CELL_DRAW_WITH_FRAME_DRAWS_FOCUS_RING (defined(BUILDING_ON_SNOW_LEOPARD) || defined(BUILDING_ON_LION) || PLATFORM(CHROMIUM))
+#define BUTTON_CELL_DRAW_WITH_FRAME_DRAWS_FOCUS_RING (__MAC_OS_X_VERSION_MIN_REQUIRED <= 1070 || PLATFORM(CHROMIUM))
 
 #if !BUTTON_CELL_DRAW_WITH_FRAME_DRAWS_FOCUS_RING
 
index 908dd95..ea7c215 100644 (file)
@@ -58,7 +58,7 @@ typedef UInt32 FMFont;
 typedef FMFont ATSUFontID;
 typedef UInt16 ATSGlyphRef;
 
-#if PLATFORM(MAC) && USE(CA) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if PLATFORM(MAC) && USE(CA) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
 typedef struct __IOSurface *IOSurfaceRef;
 #endif
 
@@ -109,7 +109,7 @@ extern "C" {
 // In alphabetical order.
 
 extern void (*wkAdvanceDefaultButtonPulseAnimation)(NSButtonCell *);
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
 extern void (*wkCALayerEnumerateRectsBeingDrawnWithBlock)(CALayer *, CGContextRef, void (^block)(CGRect rect));
 #endif
 
@@ -215,7 +215,7 @@ extern bool (*wkGetVerticalGlyphsForCharacters)(CTFontRef, const UniChar[], CGGl
 
 extern BOOL (*wkUseSharedMediaUI)();
 
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
 extern void* wkGetHyphenationLocationBeforeIndex;
 #else
 extern CFIndex (*wkGetHyphenationLocationBeforeIndex)(CFStringRef string, CFIndex index);
@@ -232,7 +232,7 @@ extern int (*wkGetNSEventMomentumPhase)(NSEvent *);
 
 extern CTLineRef (*wkCreateCTLineWithUniCharProvider)(const UniChar* (*provide)(CFIndex stringIndex, CFIndex* charCount, CFDictionaryRef* attributes, void*), void (*dispose)(const UniChar* chars, void*), void*);
 
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
 
 extern CTTypesetterRef (*wkCreateCTTypesetterWithUniCharProviderAndOptions)(const UniChar* (*provide)(CFIndex stringIndex, CFIndex* charCount, CFDictionaryRef* attributes, void*), void (*dispose)(const UniChar* chars, void*), void*, CFDictionaryRef options);
 
@@ -264,7 +264,7 @@ extern CFTypeRef (*wkCreateAXTextMarker)(const void *bytes, size_t len);
 extern BOOL (*wkGetBytesFromAXTextMarker)(CFTypeRef textMarker, void *bytes, size_t length);
 extern AXUIElementRef (*wkCreateAXUIElementRef)(id element);
 
-#if defined(BUILDING_ON_SNOW_LEOPARD) || defined(BUILDING_ON_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED <= 1060
 typedef struct __CFURLStorageSession* CFURLStorageSessionRef;
 #else
 typedef const struct __CFURLStorageSession* CFURLStorageSessionRef;
@@ -296,27 +296,27 @@ extern void (*wkSetRequestStorageSession)(CFURLStorageSessionRef, CFMutableURLRe
 #endif
 extern void (*wkSetMetadataURL)(NSString *urlString, NSString *referrer, NSString *path);
     
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
 #import <dispatch/dispatch.h>
 
 extern dispatch_source_t (*wkCreateVMPressureDispatchOnMainQueue)(void);
 
 #endif
 
-#if !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
 extern NSString *(*wkGetMacOSXVersionString)(void);
 extern bool (*wkExecutableWasLinkedOnOrBeforeLion)(void);
 #endif
 
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
 extern void (*wkCGPathAddRoundedRect)(CGMutablePathRef path, const CGAffineTransform* matrix, CGRect rect, CGFloat cornerWidth, CGFloat cornerHeight);
 #endif
 
-#if !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
 extern void (*wkCFURLRequestAllowAllPostCaching)(CFURLRequestRef);
 #endif
 
-#if !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION) && !PLATFORM(IOS)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 && !PLATFORM(IOS)
 extern BOOL (*wkFilterIsManagedSession)(void);
 extern WebFilterEvaluator *(*wkFilterCreateInstance)(NSURLResponse *);
 extern void (*wkFilterRelease)(WebFilterEvaluator *);
index c087a5d..6a6cc4b 100644 (file)
@@ -28,7 +28,7 @@
 #import <Foundation/Foundation.h>
 
 void (*wkAdvanceDefaultButtonPulseAnimation)(NSButtonCell *);
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
 void (*wkCALayerEnumerateRectsBeingDrawnWithBlock)(CALayer *, CGContextRef context, void (^block)(CGRect rect));
 #endif
 BOOL (*wkCGContextGetShouldSmoothFonts)(CGContextRef);
@@ -125,7 +125,7 @@ void (*wkSetRequestStorageSession)(CFURLStorageSessionRef, CFMutableURLRequestRe
 void (*wkGetGlyphsForCharacters)(CGFontRef, const UniChar[], CGGlyph[], size_t);
 bool (*wkGetVerticalGlyphsForCharacters)(CTFontRef, const UniChar[], CGGlyph[], size_t);
 
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
 void* wkGetHyphenationLocationBeforeIndex;
 #else
 CFIndex (*wkGetHyphenationLocationBeforeIndex)(CFStringRef string, CFIndex index);
@@ -133,7 +133,7 @@ int (*wkGetNSEventMomentumPhase)(NSEvent *);
 #endif
 
 CTLineRef (*wkCreateCTLineWithUniCharProvider)(const UniChar* (*provide)(CFIndex stringIndex, CFIndex* charCount, CFDictionaryRef* attributes, void*), void (*dispose)(const UniChar* chars, void*), void*);
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
 CTTypesetterRef (*wkCreateCTTypesetterWithUniCharProviderAndOptions)(const UniChar* (*provide)(CFIndex stringIndex, CFIndex* charCount, CFDictionaryRef* attributes, void*), void (*dispose)(const UniChar* chars, void*), void*, CFDictionaryRef options);
 
 CGContextRef (*wkIOSurfaceContextCreate)(IOSurfaceRef surface, unsigned width, unsigned height, CGColorSpaceRef colorSpace);
@@ -178,24 +178,24 @@ CFStringRef (*wkCopyCFURLResponseSuggestedFilename)(CFURLResponseRef);
 void (*wkSetCFURLResponseMIMEType)(CFURLResponseRef, CFStringRef mimeType);
 void (*wkSetMetadataURL)(NSString *urlString, NSString *referrer, NSString *path);
 
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
 dispatch_source_t (*wkCreateVMPressureDispatchOnMainQueue)(void);
 #endif
 
-#if !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
 NSString *(*wkGetMacOSXVersionString)(void);
 bool (*wkExecutableWasLinkedOnOrBeforeLion)(void);
 #endif
 
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
 void (*wkCGPathAddRoundedRect)(CGMutablePathRef path, const CGAffineTransform* matrix, CGRect rect, CGFloat cornerWidth, CGFloat cornerHeight);
 #endif
 
-#if !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
 void (*wkCFURLRequestAllowAllPostCaching)(CFURLRequestRef);
 #endif
 
-#if !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION) && !PLATFORM(IOS)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 && !PLATFORM(IOS)
 BOOL (*wkFilterIsManagedSession)(void);
 WebFilterEvaluator *(*wkFilterCreateInstance)(NSURLResponse *);
 void (*wkFilterRelease)(WebFilterEvaluator *);
index be666cf..93c0740 100644 (file)
@@ -104,7 +104,7 @@ static BOOL betterChoice(NSFontTraitMask desiredTraits, int desiredWeight,
 // Workaround for <rdar://problem/5781372>.
 static inline void fixUpWeight(NSInteger& weight, NSString *fontName)
 {
-#ifndef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
     UNUSED_PARAM(weight);
     UNUSED_PARAM(fontName);
 #else
index 47c5391..ce35fb1 100644 (file)
@@ -53,7 +53,7 @@ SOFT_LINK_POINTER(QTKit, QTMovieRateDidChangeNotification, NSString *)
 #define QTMovieRateDidChangeNotification getQTMovieRateDidChangeNotification()
 
 @interface WebVideoFullscreenWindow : NSWindow
-#ifndef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
 <NSAnimationDelegate>
 #endif
 {
@@ -339,7 +339,7 @@ static NSWindow *createBackgroundFullscreenWindow(NSRect frame, int level)
 - (void)updateMenuAndDockForFullscreen
 {
     // NSApplicationPresentationOptions is available on > 10.6 only:
-#ifndef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
     NSApplicationPresentationOptions options = NSApplicationPresentationDefault;
     NSScreen* fullscreenScreen = [[self window] screen];
 
index 631828a..90f691d 100644 (file)
@@ -44,10 +44,10 @@ static inline CGFloat webkit_CGFloor(CGFloat value)
     return floor(value);
 }
 
-#define HAVE_MEDIA_CONTROL (!defined(BUILDING_ON_LEOPARD))
+#define HAVE_MEDIA_CONTROL (__MAC_OS_X_VERSION_MIN_REQUIRED >= 1060)
 
 @interface WebVideoFullscreenHUDWindowController (Private)
-#if !defined(BUILDING_ON_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
 <NSWindowDelegate>
 #endif
 
index aae4d52..00c11b1 100644 (file)
@@ -27,7 +27,7 @@
 
 #include "PlatformString.h"
 
-#define CERTIFICATE_CREDENTIALS_SUPPORTED ((PLATFORM(MAC) || PLATFORM(IOS)) && !defined(BUILDING_ON_LEOPARD))
+#define CERTIFICATE_CREDENTIALS_SUPPORTED ((PLATFORM(MAC) || PLATFORM(IOS)) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060)
 
 #if CERTIFICATE_CREDENTIALS_SUPPORTED
 #include <Security/SecBase.h>
index ddca0d2..5071f4b 100644 (file)
@@ -67,7 +67,7 @@ typedef int CFHTTPCookieStorageAcceptPolicy;
 typedef struct OpaqueCFHTTPCookieStorage* CFHTTPCookieStorageRef;
 #endif
 
-#if USE(CFURLSTORAGESESSIONS) && (defined(BUILDING_ON_SNOW_LEOPARD) || defined(BUILDING_ON_LEOPARD))
+#if USE(CFURLSTORAGESESSIONS) && PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED <= 1060
 typedef struct __CFURLStorageSession* CFURLStorageSessionRef;
 #elif USE(CFURLSTORAGESESSIONS)
 typedef const struct __CFURLStorageSession* CFURLStorageSessionRef;
index 28c95df..7c21922 100644 (file)
@@ -42,7 +42,7 @@
 #include <CFNetwork/CFNetwork.h>
 #endif
 
-#if defined(BUILDING_ON_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
 #include <SystemConfiguration/SystemConfiguration.h>
 #endif
 
@@ -56,7 +56,7 @@ bool DNSResolveQueue::platformProxyIsEnabledInSystemPreferences()
     // 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 !defined(BUILDING_ON_LEOPARD)
+#if !PLATFORM(MAC) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
     RetainPtr<CFDictionaryRef> proxySettings(AdoptCF, CFNetworkCopySystemProxySettings());
 #else
     RetainPtr<CFDictionaryRef> proxySettings(AdoptCF, SCDynamicStoreCopyProxies(0));
index 6b0c8b0..712ade4 100644 (file)
@@ -37,7 +37,7 @@
 
 namespace WebCore {
 
-#ifndef BUILDING_ON_LEOPARD
+#if !PLATFORM(MAC) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
 
 static void processProxyServers(Vector<ProxyServer>& proxyServers, CFArrayRef proxies, CFURLRef url);
 
index 72522d9..970a6f7 100644 (file)
@@ -36,7 +36,7 @@ typedef const struct _CFURLRequest* CFURLRequestRef;
 
 OBJC_CLASS NSURLRequest;
 
-#if USE(CFURLSTORAGESESSIONS) && (defined(BUILDING_ON_SNOW_LEOPARD) || defined(BUILDING_ON_LEOPARD))
+#if USE(CFURLSTORAGESESSIONS) && PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED <= 1060
 typedef struct __CFURLStorageSession* CFURLStorageSessionRef;
 #elif USE(CFURLSTORAGESESSIONS)
 typedef const struct __CFURLStorageSession* CFURLStorageSessionRef;
index 7ce9b60..520d685 100644 (file)
@@ -265,7 +265,7 @@ void ResourceRequest::setHTTPPipeliningEnabled(bool flag)
     s_httpPipeliningEnabled = flag;
 }
 
-#if USE(CFNETWORK) || PLATFORM(MAC) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if USE(CFNETWORK) || PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
 static inline bool readBooleanPreference(CFStringRef key)
 {
     Boolean keyExistsAndHasValidFormat;
@@ -281,7 +281,7 @@ unsigned initializeMaximumHTTPConnectionCountPerHost()
     // Always set the connection count per host, even when pipelining.
     unsigned maximumHTTPConnectionCountPerHost = wkInitializeMaximumHTTPConnectionCountPerHost(preferredConnectionCount);
 
-#if USE(CFNETWORK) || PLATFORM(MAC) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if USE(CFNETWORK) || PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     static const unsigned unlimitedConnectionCount = 10000;
 
     if (!ResourceRequest::httpPipeliningEnabled() && readBooleanPreference(CFSTR("WebKitEnableHTTPPipelining")))
index 9033340..9709060 100644 (file)
@@ -41,7 +41,7 @@
 #include <wtf/MainThread.h>
 #include <wtf/text/WTFString.h>
 
-#ifdef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
 #include <SystemConfiguration/SystemConfiguration.h>
 #endif
 
@@ -176,7 +176,7 @@ void SocketStreamHandle::removePACRunLoopSource()
 
 void SocketStreamHandle::chooseProxy()
 {
-#ifndef BUILDING_ON_LEOPARD
+#if !PLATFORM(MAC) || __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.
index 82c660a..a7f1b88 100644 (file)
@@ -165,7 +165,7 @@ NSURLCredential *mac(const Credential& coreCredential)
 
 #else
 
-#ifdef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
 // There is no constant in headers, but NTLM is supported.
 NSString * const NSURLAuthenticationMethodNTLM = @"NSURLAuthenticationMethodNTLM";
 #endif
index 25b4d44..fdae43b 100644 (file)
@@ -79,7 +79,7 @@ namespace WebCore {
 
 void setCookieStoragePrivateBrowsingEnabled(bool enabled)
 {
-#if defined(BUILDING_ON_SNOW_LEOPARD) && USE(CFURLSTORAGESESSIONS)
+#if __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,
index 4ac33cc..fae41d3 100644 (file)
@@ -214,7 +214,7 @@ void ResourceHandle::createNSURLConnection(id delegate, bool shouldUseCredential
         nsRequest = mutableRequest;
     }
 
-#if !defined(BUILDING_ON_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
     ASSERT([NSURLConnection instancesRespondToSelector:@selector(_initWithRequest:delegate:usesCache:maxContentLength:startImmediately:connectionProperties:)]);
     static bool supportsSettingConnectionProperties = true;
 #else
@@ -512,7 +512,7 @@ void ResourceHandle::didReceiveAuthenticationChallenge(const AuthenticationChall
     // we make sure that is actually present
     ASSERT(challenge.nsURLAuthenticationChallenge());
 
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOWLEOPARD)
+#if __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()) {
index 262fdb4..a3e1e83 100644 (file)
@@ -82,7 +82,7 @@ void ResourceRequest::doUpdateResourceRequest()
         m_httpMethod = method;
     m_allowCookies = [m_nsRequest.get() HTTPShouldHandleCookies];
 
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     if (ResourceRequest::httpPipeliningEnabled())
         m_priority = toResourceLoadPriority(wkGetHTTPPipeliningPriority([m_nsRequest.get() _CFURLRequest]));
 #endif
@@ -129,13 +129,13 @@ void ResourceRequest::doUpdatePlatformRequest()
         nsRequest = [[NSMutableURLRequest alloc] initWithURL:url()];
 
 
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     if (ResourceRequest::httpPipeliningEnabled())
         wkSetHTTPPipeliningPriority([nsRequest _CFURLRequest], toHTTPPipeliningPriority(m_priority));
 #endif
 
     [nsRequest setCachePolicy:(NSURLRequestCachePolicy)cachePolicy()];
-#if !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     wkCFURLRequestAllowAllPostCaching([nsRequest _CFURLRequest]);
 #endif
 
index be2e276..95f7587 100644 (file)
@@ -497,7 +497,7 @@ void adjustMIMETypeIfNecessary(CFURLResponseRef cfResponse)
         }
     }
 
-#ifdef BUILDING_ON_LEOPARD
+#if __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");
index 0742cb3..c7ae861 100644 (file)
@@ -39,18 +39,18 @@ namespace WebCore {
 
 #define WTF_USE_GRAMMAR_CHECKING 1
 
-#if PLATFORM(MAC) && !defined(BUILDING_ON_LEOPARD)
+#if PLATFORM(MAC) && __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) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if PLATFORM(MAC) && __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) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#endif // #if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
 
 enum TextCheckingType {
     TextCheckingTypeSpelling    = 1 << 1,
index f170b8a..39cbb3f 100644 (file)
@@ -26,7 +26,7 @@
 #include "config.h"
 #include "Hyphenation.h"
 
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if !PLATFORM(MAC) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
 
 #include "AtomicStringKeyedMRUCache.h"
 #include "TextBreakIteratorInternalICU.h"
@@ -76,4 +76,4 @@ size_t lastHyphenLocation(const UChar* characters, size_t length, size_t beforeI
 
 } // namespace WebCore
 
-#endif // !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#endif // !PLATFORM(MAC) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
index 4c86768..0d119fd 100644 (file)
@@ -26,7 +26,7 @@
 #import "config.h"
 #import "Hyphenation.h"
 
-#if defined(BUILDING_ON_LEOPARD) || defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED <= 1060
 
 #import "AtomicStringKeyedMRUCache.h"
 #import "TextBreakIteratorInternalICU.h"
@@ -67,4 +67,4 @@ size_t lastHyphenLocation(const UChar* characters, size_t length, size_t beforeI
 
 } // namespace WebCore
 
-#endif // defined(BUILDING_ON_LEOPARD) || defined(BUILDING_ON_SNOW_LEOPARD)
+#endif // __MAC_OS_X_VERSION_MIN_REQUIRED <= 1060
index 1d5cbd8..0699918 100644 (file)
@@ -1013,7 +1013,7 @@ bool RenderLayerBacking::containsPaintedContent() const
     if (renderer()->isVideo() && toRenderVideo(renderer())->shouldDisplayVideo())
         return hasBoxDecorationsOrBackground(renderer());
 #endif
-#if PLATFORM(MAC) && USE(CA) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if PLATFORM(MAC) && USE(CA) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
 #elif ENABLE(WEBGL) || ENABLE(ACCELERATED_2D_CANVAS)
     if (isAcceleratedCanvas(renderer()))
         return hasBoxDecorationsOrBackground(renderer());
index 243cff3..90fd854 100644 (file)
@@ -1753,10 +1753,10 @@ bool RenderLayerCompositor::requiresCompositingForAnimation(RenderObject* render
     if (AnimationController* animController = renderer->animation()) {
         return (animController->isRunningAnimationOnRenderer(renderer, CSSPropertyOpacity) && inCompositingMode())
 #if ENABLE(CSS_FILTERS)
-#if !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION)
+#if !PLATFORM(MAC) || __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 // !SNOW_LEOPARD && !LION
+#endif // !PLATFORM(MAC) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
 #endif // CSS_FILTERS
             || animController->isRunningAnimationOnRenderer(renderer, CSSPropertyWebkitTransform);
     }
index e09437d..6ed4abd 100644 (file)
@@ -735,7 +735,7 @@ bool RenderThemeMac::paintTextField(RenderObject* o, const PaintInfo& paintInfo,
 {
     LocalCurrentGraphicsContext localContext(paintInfo.context);
 
-#if defined(BUILDING_ON_LION) || defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED <= 1070
     bool useNSTextFieldCell = o->style()->hasAppearance()
         && o->style()->visitedDependentColor(CSSPropertyBackgroundColor) == Color::white
         && !o->style()->hasBackgroundImage();
@@ -2111,7 +2111,7 @@ IntPoint RenderThemeMac::volumeSliderOffsetFromMuteButton(RenderBox* muteButtonB
 
 bool RenderThemeMac::shouldShowPlaceholderWhenFocused() const
 {
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     return true;
 #else
     return false;
@@ -2183,7 +2183,7 @@ NSTextFieldCell* RenderThemeMac::textField() const
         [m_textField.get() setBezeled:YES];
         [m_textField.get() setEditable:YES];
         [m_textField.get() setFocusRingType:NSFocusRingTypeExterior];
-#if defined(BUILDING_ON_LION) || defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED <= 1070
         [m_textField.get() setDrawsBackground:YES];
         [m_textField.get() setBackgroundColor:[NSColor whiteColor]];
 #else
index ce277c2..e73ec95 100644 (file)
@@ -1,3 +1,14 @@
+2012-07-11  Mark Rowe  <mrowe@apple.com>
+
+        <http://webkit.org/b/91015> Remove BUILDING_ON / TARGETING macros in favor of system availability macros
+
+        This removal was handled by a script that translates the relevant macros in to the equivalent checks
+        using the system availability macros.
+
+        Reviewed by Filip Pizlo.
+
+        * src/mac/WebInputEventFactory.mm:
+
 2012-07-11  Sheriff Bot  <webkit.review.bot@gmail.com>
 
         Unreviewed.  Rolled DEPS.
index f719f2d..f541ef6 100644 (file)
@@ -34,7 +34,7 @@
 #include "WebInputEvent.h"
 #include <wtf/ASCIICType.h>
 
-#if BUILDING_ON_LEOPARD || BUILDING_ON_SNOW_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED <= 1060
 
 // Additional Lion APIs.
 enum {
@@ -53,9 +53,9 @@ typedef NSUInteger NSEventPhase;
 - (NSEventPhase)momentumPhase;
 @end
 
-#endif  // BUILDING_ON_LEOPARD || BUILDING_ON_SNOW_LEOPARD
+#endif  // __MAC_OS_X_VERSION_MIN_REQUIRED <= 1060
 
-#if BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
 
 // These are not defined in the 10.5 SDK but are defined in later SDKs inside
 // a MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 #ifdef.
@@ -64,7 +64,7 @@ enum {
     NSEventTypeEndGesture       = 20
 };
 
-#endif  // BUILDING_ON_LEOPARD
+#endif  // __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
 
 namespace WebKit {
 
index 2206d2f..c0be022 100644 (file)
@@ -1,3 +1,36 @@
+2012-07-11  Mark Rowe  <mrowe@apple.com>
+
+        <http://webkit.org/b/91015> Remove BUILDING_ON / TARGETING macros in favor of system availability macros
+
+        This removal was handled by a script that translates the relevant macros in to the equivalent checks
+        using the system availability macros.
+
+        Reviewed by Filip Pizlo.
+
+        * DefaultDelegates/WebDefaultContextMenuDelegate.mm:
+        * Misc/WebKitErrors.m:
+        * Misc/WebNSControlExtras.m:
+        * Misc/WebNSFileManagerExtras.mm:
+        * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+        * Plugins/WebBaseNetscapePluginView.mm:
+        * Plugins/WebNetscapePluginView.mm:
+        * WebCoreSupport/WebChromeClient.mm:
+        * WebCoreSupport/WebEditorClient.mm:
+        * WebCoreSupport/WebFrameLoaderClient.mm:
+        * WebCoreSupport/WebSystemInterface.mm:
+        * WebView/WebClipView.mm:
+        * WebView/WebDynamicScrollBarsView.mm:
+        * WebView/WebFrameView.mm:
+        * WebView/WebFullScreenController.mm:
+        * WebView/WebHTMLView.mm:
+        * WebView/WebHTMLViewInternal.h:
+        * WebView/WebPDFDocumentExtras.mm:
+        * WebView/WebPreferences.mm:
+        * WebView/WebResourceInternal.h:
+        * WebView/WebScriptDebugDelegate.h:
+        * WebView/WebView.mm:
+        * WebView/WebViewPrivate.h:
+
 2012-07-11  Anders Carlsson  <andersca@apple.com>
 
         Add -Wtautological-compare and -Wsign-compare warning flags
index d3eff92..7466618 100644 (file)
@@ -89,7 +89,7 @@
             action = @selector(_searchWithSpotlightFromMenu:);
             break;
         case WebMenuItemTagSearchWeb: {
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
             RetainPtr<CFStringRef> searchProviderName(AdoptCF, WKCopyDefaultSearchProviderDisplayName());
             title = [NSString stringWithFormat:UI_STRING_INTERNAL("Search with %@", "Search with search provider context menu item with provider name inserted"), searchProviderName.get()];
 #else
     }
 }
 
-#if defined(BUILDING_ON_LEOPARD) || defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED <= 1060
 #define INCLUDE_SPOTLIGHT_CONTEXT_MENU_ITEM 1
 #else
 #define INCLUDE_SPOTLIGHT_CONTEXT_MENU_ITEM 0
index b1c6c97..fe3de86 100644 (file)
@@ -116,7 +116,7 @@ static NSMutableDictionary *descriptions = nil;
         [userInfo setObject:localizedDescription forKey:NSLocalizedDescriptionKey];
     if (contentURL) {
         [userInfo setObject:contentURL forKey:@"NSErrorFailingURLKey"];
-#ifdef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
         [userInfo setObject:[contentURL _web_userVisibleString] forKey:NSErrorFailingURLStringKey];
 #else
         [userInfo setObject:[contentURL _web_userVisibleString] forKey:NSURLErrorFailingURLStringErrorKey];
index 6edf84f..81b5c85 100644 (file)
@@ -46,7 +46,7 @@
     NSRect windowFrame = [window frame];
 
     CGFloat backingScaleFactor;
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     backingScaleFactor = [window backingScaleFactor];
 #else
     backingScaleFactor = [window userSpaceScaleFactor];
index fa15023..e7a8043 100644 (file)
@@ -36,7 +36,7 @@
 #import <sys/stat.h>
 #import <wtf/RetainPtr.h>
 
-#ifdef BUILDING_ON_SNOW_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1060
 extern "C" DADiskRef DADiskCreateFromVolumePath(CFAllocatorRef allocator, DASessionRef session, CFURLRef path);
 #endif
 
index 165a006..e38ae95 100644 (file)
@@ -125,7 +125,7 @@ extern "C" {
 
         if (accleratedCompositingEnabled && _proxy->rendererType() == UseAcceleratedCompositing) {
             // FIXME: This code can be shared between WebHostedNetscapePluginView and WebNetscapePluginView.
-#ifndef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
             // Since this layer isn't going to be inserted into a view, we need to create another layer and flip its geometry
             // in order to get the coordinate system right.
             RetainPtr<CALayer> realPluginLayer(AdoptNS, _pluginLayer.leakRef());
index 85d7aba..0f13013 100644 (file)
@@ -102,7 +102,7 @@ using namespace WebCore;
     _baseURL.adoptNS([baseURL copy]);
     _MIMEType.adoptNS([MIME copy]);
     
-#ifndef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
     // Enable "kiosk mode" when instantiating the QT plug-in inside of Dashboard. See <rdar://problem/6878105>
     if ([[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.apple.dashboard.client"] &&
         [_pluginPackage.get() bundleIdentifier] == "com.apple.QuickTime Plugin.plugin") {
index 426405f..4e1aad4 100644 (file)
@@ -1099,7 +1099,7 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
 #endif
             if (accleratedCompositingEnabled) {
                 // FIXME: This code can be shared between WebHostedNetscapePluginView and WebNetscapePluginView.
-#ifndef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
                 // Since this layer isn't going to be inserted into a view, we need to create another layer and flip its geometry
                 // in order to get the coordinate system right.
                 RetainPtr<CALayer> realPluginLayer(AdoptNS, _pluginLayer.leakRef());
@@ -2231,7 +2231,7 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
             break;
         }
         case NPNURLVProxy: {
-#ifndef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
             if (!value)
                 break;
             
@@ -2341,7 +2341,7 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
 // For now, we'll distinguish older broken versions of Silverlight by asking the plug-in if it resolved its full screen badness.
 - (void)_workaroundSilverlightFullscreenBug:(BOOL)initializedPlugin
 {
-#ifndef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
     ASSERT(_isSilverlight);
     NPBool isFullscreenPerformanceIssueFixed = 0;
     NPPluginFuncs *pluginFuncs = [_pluginPackage.get() pluginFuncs];
index 2ea0d66..ed6fa57 100644 (file)
@@ -818,7 +818,7 @@ void WebChromeClient::elementDidBlur(const WebCore::Node* node)
 
 bool WebChromeClient::selectItemWritingDirectionIsNatural()
 {
-#ifndef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
     return false;
 #else
     return true;
@@ -827,7 +827,7 @@ bool WebChromeClient::selectItemWritingDirectionIsNatural()
 
 bool WebChromeClient::selectItemAlignmentFollowsMenuWritingDirection()
 {
-#ifndef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
     return true;
 #else
     return false;
index ed83da6..6497c95 100644 (file)
@@ -74,7 +74,7 @@ using namespace WebCore;
 
 using namespace HTMLNames;
 
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
 @interface NSSpellChecker (WebNSSpellCheckerDetails)
 - (NSString *)languageForWordRange:(NSRange)range inString:(NSString *)string orthography:(NSOrthography *)orthography;
 @end
@@ -698,7 +698,7 @@ void WebEditorClient::textDidChangeInTextArea(Element* element)
 bool WebEditorClient::shouldEraseMarkersAfterChangeSelection(TextCheckingType type) const
 {
     // This prevents erasing spelling markers on OS X Lion or later to match AppKit on these Mac OS X versions.
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     return type != TextCheckingTypeSpelling;
 #else
     return true;
@@ -769,7 +769,7 @@ void WebEditorClient::checkGrammarOfString(const UChar* text, int length, Vector
     }
 }
 
-#ifndef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
 static Vector<TextCheckingResult> core(NSArray *incomingResults, TextCheckingTypeMask checkingTypes)
 {
     Vector<TextCheckingResult> results;
@@ -852,7 +852,7 @@ static Vector<TextCheckingResult> core(NSArray *incomingResults, TextCheckingTyp
 
 void WebEditorClient::checkTextOfParagraph(const UChar* text, int length, TextCheckingTypeMask checkingTypes, Vector<TextCheckingResult>& results)
 {
-#ifndef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
     NSString *textString = [[NSString alloc] initWithCharactersNoCopy:const_cast<UChar*>(text) length:length freeWhenDone:NO];
     NSArray *incomingResults = [[NSSpellChecker sharedSpellChecker] checkString:textString range:NSMakeRange(0, [textString length]) types:(checkingTypes|NSTextCheckingTypeOrthography) options:nil inSpellDocumentWithTag:spellCheckerDocumentTag() orthography:NULL wordCount:NULL];
     [textString release];
@@ -895,7 +895,7 @@ bool WebEditorClient::spellingUIIsShowing()
 
 void WebEditorClient::getGuessesForWord(const String& word, const String& context, Vector<String>& guesses) {
     guesses.clear();
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     NSString* language = nil;
     NSOrthography* orthography = nil;
     NSSpellChecker *checker = [NSSpellChecker sharedSpellChecker];
@@ -925,7 +925,7 @@ void WebEditorClient::setInputMethodState(bool)
 {
 }
 
-#ifndef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
 @interface WebEditorSpellCheckResponder : NSObject
 {
     WebEditorClient* _client;
@@ -965,7 +965,7 @@ void WebEditorClient::didCheckSucceed(int sequence, NSArray* results)
 
 void WebEditorClient::requestCheckingOfString(PassRefPtr<WebCore::TextCheckingRequest> request)
 {
-#ifndef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
     ASSERT(!m_textCheckingRequest);
     m_textCheckingRequest = request;
 
index ca78e31..6364420 100644 (file)
@@ -668,7 +668,7 @@ void WebFrameLoaderClient::dispatchDidFirstLayout()
     WebDynamicScrollBarsView *scrollView = [m_webFrame->_private->webFrameView _scrollView];
     if ([getWebView(m_webFrame.get()) drawsBackground])
         [scrollView setDrawsBackground:YES];
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     [scrollView setVerticalScrollElasticity:NSScrollElasticityAutomatic];
     [scrollView setHorizontalScrollElasticity:NSScrollElasticityAutomatic];
 #endif
@@ -1087,7 +1087,7 @@ void WebFrameLoaderClient::provisionalLoadStarted()
 
     WebDynamicScrollBarsView *scrollView = [m_webFrame->_private->webFrameView _scrollView];
     [scrollView setDrawsBackground:NO];
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     [scrollView setVerticalScrollElasticity:NSScrollElasticityNone];
     [scrollView setHorizontalScrollElasticity:NSScrollElasticityNone];
 #endif
index d1f2f15..102ceff 100644 (file)
@@ -43,7 +43,7 @@ void InitWebCoreSystemInterface(void)
         return;
 
     INIT(AdvanceDefaultButtonPulseAnimation);
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     INIT(CALayerEnumerateRectsBeingDrawnWithBlock);
 #endif
     INIT(CGContextGetShouldSmoothFonts);
@@ -119,14 +119,14 @@ void InitWebCoreSystemInterface(void)
     INIT(GetGlyphsForCharacters);
     INIT(GetVerticalGlyphsForCharacters);
 
-#if defined(BUILDING_ON_LEOPARD) || defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED <= 1060
     INIT(GetHyphenationLocationBeforeIndex);
     INIT(GetNSEventMomentumPhase);
 #endif
 
     INIT(CreateCTLineWithUniCharProvider);
 
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     INIT(IOSurfaceContextCreate);
     INIT(IOSurfaceContextCreateImage);
     INIT(CreateCTTypesetterWithUniCharProviderAndOptions);
@@ -174,24 +174,24 @@ void InitWebCoreSystemInterface(void)
 #if PLATFORM(MAC)
     // FIXME: We should stop using this file in Chromium.
 
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     INIT(CreateVMPressureDispatchOnMainQueue);
 #endif
 
-#if !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
     INIT(GetMacOSXVersionString);
     INIT(ExecutableWasLinkedOnOrBeforeLion);
 #endif
 
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     INIT(CGPathAddRoundedRect);
 #endif
 
-#if !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     INIT(CFURLRequestAllowAllPostCaching);
 #endif
 
-#if !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION) && !PLATFORM(IOS)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 && !PLATFORM(IOS)
     INIT(FilterIsManagedSession);
     INIT(FilterCreateInstance);
     INIT(FilterRelease);
index 74709b0..d06fef7 100644 (file)
@@ -52,7 +52,7 @@ using namespace WebCore;
 - (void)_immediateScrollToPoint:(NSPoint)newOrigin;
 @end
 
-#ifndef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
 @interface NSWindow (WebNSWindowDetails)
 - (void)_disableDelayedWindowDisplay;
 - (void)_enableDelayedWindowDisplay;
@@ -105,13 +105,13 @@ using namespace WebCore;
 {
     _isScrolling = YES;
 
-#ifndef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
     [[self window] _disableDelayedWindowDisplay];
 #endif
 
     [super _immediateScrollToPoint:newOrigin];
 
-#ifndef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
     [[self window] _enableDelayedWindowDisplay];
 #endif
 
index 8011094..839b54f 100644 (file)
@@ -413,7 +413,7 @@ static const unsigned cMaxUpdateScrollbarsPass = 2;
     // This call updates the initial position correctly.
     [self adjustForScrollOriginChange];
 
-#if USE(ACCELERATED_COMPOSITING) && defined(BUILDING_ON_LEOPARD)
+#if USE(ACCELERATED_COMPOSITING) && __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
     NSView *documentView = [self documentView];
     if ([documentView isKindOfClass:[WebHTMLView class]]) {
         WebHTMLView *htmlView = (WebHTMLView *)documentView;
@@ -522,7 +522,7 @@ static const unsigned cMaxUpdateScrollbarsPass = 2;
     BOOL isContinuous;
     WKGetWheelEventDeltas(event, &deltaX, &deltaY, &isContinuous);
 
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     NSEventPhase momentumPhase = [event momentumPhase];
     BOOL isLatchingEvent = momentumPhase & NSEventPhaseBegan || momentumPhase & NSEventPhaseStationary;
 #else
index 7a09e4e..c98e339 100644 (file)
@@ -322,7 +322,7 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
 
 // FIXME: Remove the NSAppKitVersionNumberWithDeferredWindowDisplaySupport check once
 // once AppKit's Deferred Window Display support is available.
-#if defined(BUILDING_ON_LEOPARD) || !defined(NSAppKitVersionNumberWithDeferredWindowDisplaySupport)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1050 || !defined(NSAppKitVersionNumberWithDeferredWindowDisplaySupport)
         // CoreGraphics deferred updates are disabled if WebKitEnableCoalescedUpdatesPreferenceKey is NO
         // or has no value. For compatibility with Mac OS X 10.5 and lower, deferred updates are off by default.
         if (![[NSUserDefaults standardUserDefaults] boolForKey:WebKitEnableDeferredUpdatesPreferenceKey])
index acd698a..fea80a8 100644 (file)
@@ -70,7 +70,7 @@ static IntRect screenRectOfContents(Element* element)
 - (void)_startExitFullScreenAnimationWithDuration:(NSTimeInterval)duration;
 @end
 
-#if defined(BUILDING_ON_LEOPARD) || defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED <= 1060
 @interface NSWindow(convertRectToScreenForLeopardAndSnowLeopard)
 - (NSRect)convertRectToScreen:(NSRect)aRect;
 @end
@@ -273,14 +273,14 @@ static IntRect screenRectOfContents(Element* element)
         WKWindowSetClipRect([self window], windowBounds);
         
         NSWindow *webWindow = [_webViewPlaceholder.get() window];
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
         // In Lion, NSWindow will animate into and out of orderOut operations. Suppress that
         // behavior here, making sure to reset the animation behavior afterward.
         NSWindowAnimationBehavior animationBehavior = [webWindow animationBehavior];
         [webWindow setAnimationBehavior:NSWindowAnimationBehaviorNone];
 #endif
         [webWindow orderOut:self];
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
         [webWindow setAnimationBehavior:animationBehavior];
 #endif
         
@@ -323,7 +323,7 @@ static IntRect screenRectOfContents(Element* element)
     [self _updateMenuAndDockForFullScreen];
     
     NSWindow* webWindow = [_webViewPlaceholder.get() window];
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     // In Lion, NSWindow will animate into and out of orderOut operations. Suppress that
     // behavior here, making sure to reset the animation behavior afterward.
     NSWindowAnimationBehavior animationBehavior = [webWindow animationBehavior];
@@ -338,7 +338,7 @@ static IntRect screenRectOfContents(Element* element)
         [webWindow setCollectionBehavior:behavior];
     } else
         [webWindow orderWindow:NSWindowBelow relativeTo:[[self window] windowNumber]];
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     [webWindow setAnimationBehavior:animationBehavior];
 #endif
 
@@ -415,7 +415,7 @@ static IntRect screenRectOfContents(Element* element)
 - (void)_updateMenuAndDockForFullScreen
 {
     // NSApplicationPresentationOptions is available on > 10.6 only:
-#ifndef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
     NSApplicationPresentationOptions options = NSApplicationPresentationDefault;
     NSScreen* fullscreenScreen = [[self window] screen];
     
index 04a5a99..505db53 100644 (file)
@@ -285,7 +285,7 @@ extern NSString *NSTextInputReplacementRangeAttributeName;
 - (void)_invalidateGStatesForTree;
 - (void)_propagateDirtyRectsToOpaqueAncestors;
 - (void)_windowChangedKeyState;
-#if USE(ACCELERATED_COMPOSITING) && defined(BUILDING_ON_LEOPARD)
+#if USE(ACCELERATED_COMPOSITING) && __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
 - (void)_updateLayerGeometryFromView;
 #endif
 @end
@@ -411,7 +411,7 @@ static CachedImageClient* promisedDataClient()
 - (void)_web_clearPrintingModeRecursive;
 @end
 
-#ifndef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
 
 @interface WebHTMLView (WebHTMLViewTextCheckingInternal)
 - (void)orderFrontSubstitutionsPanel:(id)sender;
@@ -794,7 +794,7 @@ static NSURL* uniqueURLWithRelativePart(NSString *relativePart)
                                              subresources:0]))
         return fragment;
 
-#ifdef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
     if ([types containsObject:NSPICTPboardType] &&
         (fragment = [self _documentFragmentFromPasteboard:pasteboard 
                                                   forType:NSPICTPboardType
@@ -875,7 +875,7 @@ static NSURL* uniqueURLWithRelativePart(NSString *relativePart)
     DOMRange *range = [self _selectedRange];
     Frame* coreFrame = core([self _frame]);
     
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     DOMDocumentFragment *fragment = [self _documentFragmentFromPasteboard:pasteboard inContext:range allowPlainText:allowPlainText];
     if (fragment && [self _shouldInsertFragment:fragment replacingDOMRange:range givenAction:WebViewInsertActionPasted])
         coreFrame->editor()->pasteAsFragment(core(fragment), [self _canSmartReplaceWithPasteboard:pasteboard], false);
@@ -1232,7 +1232,7 @@ static NSURL* uniqueURLWithRelativePart(NSString *relativePart)
     }
     _private->lastScrollPosition = origin;
 
-#if USE(ACCELERATED_COMPOSITING) && defined(BUILDING_ON_LEOPARD)
+#if USE(ACCELERATED_COMPOSITING) && __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
     [self _updateLayerHostingViewPosition];
 #endif
 }
@@ -1389,7 +1389,7 @@ static NSURL* uniqueURLWithRelativePart(NSString *relativePart)
 
 static BOOL isQuickLookEvent(NSEvent *event)
 {
-#if !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
     const int kCGSEventSystemSubtypeHotKeyCombinationReleased = 9;
     return [event type] == NSSystemDefined && [event subtype] == kCGSEventSystemSubtypeHotKeyCombinationReleased && [event data1] == 'lkup';
 #else
@@ -1658,7 +1658,7 @@ static bool mouseEventIsPartOfClickOrDrag(NSEvent *event)
     static NSArray *types = nil;
     if (!types) {
         types = [[NSArray alloc] initWithObjects:WebArchivePboardType, NSHTMLPboardType, NSFilenamesPboardType, NSTIFFPboardType, NSPDFPboardType,
-#ifdef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
             NSPICTPboardType,
 #endif
             NSURLPboardType, NSRTFDPboardType, NSRTFPboardType, NSStringPboardType, NSColorPboardType, kUTTypePNG, nil];
@@ -2047,7 +2047,7 @@ static bool mouseEventIsPartOfClickOrDrag(NSEvent *event)
         [resource release];
         return fragment;
     }
-#ifdef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
     if (pboardType == NSPICTPboardType) {
         WebResource *resource = [[WebResource alloc] initWithData:[pasteboard dataForType:NSPICTPboardType]
                                                               URL:uniqueURLWithRelativePart(@"image.pict")
@@ -2699,7 +2699,7 @@ WEBCORE_COMMAND(yankAndSelect)
         return YES;
     }
 
-#ifndef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
     if (action == @selector(orderFrontSubstitutionsPanel:)) {
         NSMenuItem *menuItem = (NSMenuItem *)item;
         if ([menuItem isKindOfClass:[NSMenuItem class]]) {
@@ -2852,7 +2852,7 @@ WEBCORE_COMMAND(yankAndSelect)
         return;
 #endif
 
-#if !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     // Legacy scrollbars require tracking the mouse at all times.
     if (WKRecommendedScrollerStyle() == NSScrollerStyleLegacy)
         return;
@@ -3391,7 +3391,7 @@ static void setMenuTargets(NSMenu* menu)
         return;
     }
 
-#if !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     if (_private->trackingAreaForNonKeyWindow) {
         [self removeTrackingArea:_private->trackingAreaForNonKeyWindow];
         [_private->trackingAreaForNonKeyWindow release];
@@ -3424,7 +3424,7 @@ static void setMenuTargets(NSMenu* menu)
         [_private->completionController endRevertingChange:NO moveLeft:NO];
     }
 
-#if !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     if (WKRecommendedScrollerStyle() == NSScrollerStyleLegacy) {
         // Legacy style scrollbars have design details that rely on tracking the mouse all the time.
         // It's easiest to do this with a tracking area, which we will remove when the window is key
@@ -4898,7 +4898,7 @@ static PassRefPtr<KeyboardEvent> currentKeyboardEvent(Frame* coreFrame)
 
 static BOOL writingDirectionKeyBindingsEnabled()
 {
-#ifndef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
     return YES;
 #else
     NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
@@ -4936,7 +4936,7 @@ static BOOL writingDirectionKeyBindingsEnabled()
     [self _changeBaseWritingDirectionTo:NSWritingDirectionRightToLeft];
 }
 
-#ifdef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
 - (void)changeBaseWritingDirectionToLTR:(id)sender
 {
     [self makeBaseWritingDirectionLeftToRight:sender];
@@ -5151,7 +5151,7 @@ static CGPoint coreGraphicsScreenPointForAppKitScreenPoint(NSPoint point)
 }
 
 
-#ifndef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
 
 - (void)orderFrontSubstitutionsPanel:(id)sender
 {
@@ -5286,7 +5286,7 @@ static CGPoint coreGraphicsScreenPointForAppKitScreenPoint(NSPoint point)
     if (font)
         rect.origin.y += [font ascender];
 
-#ifndef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
     [self showDefinitionForAttributedString:attrString atPoint:rect.origin];
     return;
 #endif
@@ -5476,7 +5476,7 @@ static CGPoint coreGraphicsScreenPointForAppKitScreenPoint(NSPoint point)
 {
     if (!_private->layerHostingView) {
         NSView* hostingView = [[WebLayerHostingFlippedView alloc] initWithFrame:[self bounds]];
-#ifndef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
         [hostingView setAutoresizingMask:(NSViewWidthSizable | NSViewHeightSizable)];
 #endif
         [self addSubview:hostingView];
@@ -5488,7 +5488,7 @@ static CGPoint coreGraphicsScreenPointForAppKitScreenPoint(NSPoint point)
     // Make a container layer, which will get sized/positioned by AppKit and CA.
     CALayer* viewLayer = [WebRootLayer layer];
 
-#ifdef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
     // Turn off default animations.
     NSNull *nullValue = [NSNull null];
     NSDictionary *actions = [NSDictionary dictionaryWithObjectsAndKeys:
@@ -5522,10 +5522,10 @@ static CGPoint coreGraphicsScreenPointForAppKitScreenPoint(NSPoint point)
     if ([[self _webView] _postsAcceleratedCompositingNotifications])
         [[NSNotificationCenter defaultCenter] postNotificationName:_WebViewDidStartAcceleratedCompositingNotification object:[self _webView] userInfo:nil];
     
-#ifdef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
     [viewLayer setSublayerTransform:CATransform3DMakeScale(1, -1, 1)]; // setGeometryFlipped: doesn't exist on Leopard.
     [self _updateLayerHostingViewPosition];
-#elif (defined(BUILDING_ON_SNOW_LEOPARD) || defined(BUILDING_ON_LION))
+#elif __MAC_OS_X_VERSION_MIN_REQUIRED <= 1070
     // Do geometry flipping here, which flips all the compositing layers so they are top-down.
     [viewLayer setGeometryFlipped:YES];
 #else
@@ -5544,7 +5544,7 @@ static CGPoint coreGraphicsScreenPointForAppKitScreenPoint(NSPoint point)
     }
 }
 
-#ifdef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
 // This method is necessary on Leopard to work around <rdar://problem/7067892>.
 - (void)_updateLayerHostingViewPosition
 {
@@ -5572,7 +5572,7 @@ static CGPoint coreGraphicsScreenPointForAppKitScreenPoint(NSPoint point)
     [_private->layerHostingView _updateLayerGeometryFromView];  // Workaround for <rdar://problem/7071636>
     [_private->layerHostingView setFrame:layerViewFrame];
 }
-#endif // defined(BUILDING_ON_LEOPARD)
+#endif // __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
 
 - (void)drawLayer:(CALayer *)layer inContext:(CGContextRef)ctx
 {
index a4153ab..137a140 100644 (file)
@@ -66,7 +66,7 @@ namespace WebCore {
 - (BOOL)_web_isDrawingIntoLayer;
 #endif
 
-#if USE(ACCELERATED_COMPOSITING) && defined(BUILDING_ON_LEOPARD)
+#if USE(ACCELERATED_COMPOSITING) && __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
 - (void)_updateLayerHostingViewPosition;
 #endif
 
index 3e701cf..592edf7 100644 (file)
@@ -31,7 +31,7 @@
 #import <PDFKit/PDFDocument.h>
 #import <objc/objc-runtime.h>
 
-#ifdef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
 @interface PDFDocument (Internal)
 - (CGPDFDocumentRef)documentRef;
 @end
index 9c28230..7eb2f9a 100644 (file)
@@ -346,7 +346,7 @@ static WebCacheModel cacheModelForMainBundle(void)
         @"0",                           WebKitPDFScaleFactorPreferenceKey,
         @"0",                           WebKitUseSiteSpecificSpoofingPreferenceKey,
         [NSNumber numberWithInt:WebKitEditableLinkDefaultBehavior], WebKitEditableLinkBehaviorPreferenceKey,
-#ifndef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
         [NSNumber numberWithInt:WebTextDirectionSubmenuAutomaticallyIncluded],
 #else
         [NSNumber numberWithInt:WebTextDirectionSubmenuNeverIncluded],
index ba84105..32442ca 100644 (file)
@@ -29,7 +29,7 @@
 #import "WebResourcePrivate.h"
 #import <wtf/PassRefPtr.h>
 
-#ifdef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
 #define MAIL_THREAD_WORKAROUND 1
 #endif
 
index 585700f..5182f31 100644 (file)
@@ -28,7 +28,7 @@
 
 #import <Foundation/Foundation.h>
 
-#ifdef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
 typedef int WebSourceId;
 #else
 typedef intptr_t WebSourceId;
index c35b873..eea1e4b 100644 (file)
@@ -463,7 +463,7 @@ NSString *_WebViewDidStartAcceleratedCompositingNotification = @"_WebViewDidStar
 
 static BOOL continuousSpellCheckingEnabled;
 static BOOL grammarCheckingEnabled;
-#ifndef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
 static BOOL automaticQuoteSubstitutionEnabled;
 static BOOL automaticLinkDetectionEnabled;
 static BOOL automaticDashSubstitutionEnabled;
@@ -510,7 +510,7 @@ static CFMutableSetRef allWebViewsSet;
 
 @implementation WebView (WebPrivate)
 
-#if !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
 
 static NSString *createMacOSXVersionString()
 {
@@ -545,7 +545,7 @@ static NSString *createMacOSXVersionString()
     return [[NSString alloc] initWithFormat:@"%d", major];
 }
 
-#endif // !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION)
+#endif // __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
 
 static NSString *createUserVisibleWebKitVersionString()
 {
@@ -611,7 +611,7 @@ static void WebKitInitializeApplicationCachePathIfNecessary()
 
 static bool runningLeopardMail()
 {
-#ifdef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
     return applicationIsAppleMail();
 #endif
     return NO;
@@ -619,7 +619,7 @@ static bool runningLeopardMail()
 
 static bool coreVideoHas7228836Fix()
 {
-#ifdef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
     NSBundle* coreVideoFrameworkBundle = [NSBundle bundleWithPath:@"/System/Library/Frameworks/CoreVideo.framework"];
     double version = [[coreVideoFrameworkBundle objectForInfoDictionaryKey:(NSString *)kCFBundleVersionKey] doubleValue];
     return (version >= 48);
@@ -647,7 +647,7 @@ static bool shouldEnableLoadDeferring()
     [types release];
 }
 
-#if defined(BUILDING_ON_LEOPARD) || defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED <= 1060
 // This method should be removed once we no longer want to keep Safari 5.0.x working with nightly builds.
 - (BOOL)_usesDocumentViews
 {
@@ -1508,7 +1508,7 @@ static bool needsSelfRetainWhileLoadingQuirk()
 #if ENABLE(FULLSCREEN_API)
     settings->setFullScreenEnabled([preferences fullScreenEnabled]);
 #endif
-#ifndef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
     // Asynchronous spell checking API is available for 10.6 or later.
     settings->setAsynchronousSpellCheckingEnabled([preferences asynchronousSpellCheckingEnabled]);
 #endif
@@ -3046,7 +3046,7 @@ static PassOwnPtr<Vector<String> > toStringVector(NSArray* patterns)
     continuousSpellCheckingEnabled = [[NSUserDefaults standardUserDefaults] boolForKey:WebContinuousSpellCheckingEnabled];
     grammarCheckingEnabled = [[NSUserDefaults standardUserDefaults] boolForKey:WebGrammarCheckingEnabled];
 
-#ifndef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
     automaticQuoteSubstitutionEnabled = [[NSUserDefaults standardUserDefaults] boolForKey:WebAutomaticQuoteSubstitutionEnabled];
     automaticLinkDetectionEnabled = [[NSUserDefaults standardUserDefaults] boolForKey:WebAutomaticLinkDetectionEnabled];
     automaticDashSubstitutionEnabled = [[NSUserDefaults standardUserDefaults] boolForKey:WebAutomaticDashSubstitutionEnabled];
@@ -3054,7 +3054,7 @@ static PassOwnPtr<Vector<String> > toStringVector(NSArray* patterns)
     automaticSpellingCorrectionEnabled = [[NSUserDefaults standardUserDefaults] boolForKey:WebAutomaticSpellingCorrectionEnabled];
 #endif
 
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     if (![[NSUserDefaults standardUserDefaults] objectForKey:WebAutomaticTextReplacementEnabled])
         automaticTextReplacementEnabled = [NSSpellChecker isAutomaticTextReplacementEnabled];
     if (![[NSUserDefaults standardUserDefaults] objectForKey:WebAutomaticSpellingCorrectionEnabled])
@@ -3261,7 +3261,7 @@ static bool clientNeedsWebViewInitThreadWorkaround()
     if ([bundleIdentifier _webkit_hasCaseInsensitivePrefix:@"com.apple.Automator."])
         return true;
 
-#ifdef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
     // Mail.
     if ([bundleIdentifier _webkit_isCaseInsensitiveEqualToString:@"com.apple.Mail"])
         return true;
@@ -4564,7 +4564,7 @@ static WebFrame *incrementFrame(WebFrame *frame, WebFindOptions options = 0)
             [menuItem setState:checkMark ? NSOnState : NSOffState];
         }
         return YES;
-#ifndef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
     } else if (action == @selector(toggleAutomaticQuoteSubstitution:)) {
         BOOL checkMark = [self isAutomaticQuoteSubstitutionEnabled];
         if ([(NSObject *)item isKindOfClass:[NSMenuItem class]]) {
@@ -4713,7 +4713,7 @@ static BOOL findString(NSView <WebDocumentSearching> *searchView, NSString *stri
     return kit(_private->page->rangeOfString(string, core(previousRange), coreOptions(options)).get());
 }
 
-#if defined(BUILDING_ON_SNOW_LEOPARD) || defined(BUILDING_ON_LION)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED <= 1070
 // FIXME: Remove once WebKit no longer needs to support versions of Safari that call this.
 - (void)setHoverFeedbackSuspended:(BOOL)newValue
 {
@@ -5402,7 +5402,7 @@ static NSAppleEventDescriptor* aeDescFromJSValue(ExecState* exec, JSValue jsValu
     grammarCheckingEnabled = flag;
     [[NSUserDefaults standardUserDefaults] setBool:grammarCheckingEnabled forKey:WebGrammarCheckingEnabled];    
     
-#ifndef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
     [[NSSpellChecker sharedSpellChecker] updatePanels];
 #else
     NSSpellChecker *spellChecker = [NSSpellChecker sharedSpellChecker];
@@ -5429,7 +5429,7 @@ static NSAppleEventDescriptor* aeDescFromJSValue(ExecState* exec, JSValue jsValu
 
 - (BOOL)isAutomaticQuoteSubstitutionEnabled
 {
-#ifdef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
     return NO;
 #else
     return automaticQuoteSubstitutionEnabled;
@@ -5438,7 +5438,7 @@ static NSAppleEventDescriptor* aeDescFromJSValue(ExecState* exec, JSValue jsValu
 
 - (BOOL)isAutomaticLinkDetectionEnabled
 {
-#ifdef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
     return NO;
 #else
     return automaticLinkDetectionEnabled;
@@ -5447,7 +5447,7 @@ static NSAppleEventDescriptor* aeDescFromJSValue(ExecState* exec, JSValue jsValu
 
 - (BOOL)isAutomaticDashSubstitutionEnabled
 {
-#ifdef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
     return NO;
 #else
     return automaticDashSubstitutionEnabled;
@@ -5456,7 +5456,7 @@ static NSAppleEventDescriptor* aeDescFromJSValue(ExecState* exec, JSValue jsValu
 
 - (BOOL)isAutomaticTextReplacementEnabled
 {
-#ifdef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
     return NO;
 #else
     return automaticTextReplacementEnabled;
@@ -5465,14 +5465,14 @@ static NSAppleEventDescriptor* aeDescFromJSValue(ExecState* exec, JSValue jsValu
 
 - (BOOL)isAutomaticSpellingCorrectionEnabled
 {
-#ifdef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
     return NO;
 #else
     return automaticSpellingCorrectionEnabled;
 #endif
 }
 
-#ifndef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
 
 - (void)setAutomaticQuoteSubstitutionEnabled:(BOOL)flag
 {
@@ -5698,7 +5698,7 @@ static WebFrameView *containingFrameView(NSView *view)
 
     NSWindow *window = [self window];
     NSWindow *hostWindow = [self hostWindow];
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     if (window)
         return [window backingScaleFactor];
     if (hostWindow)
@@ -6059,7 +6059,7 @@ static inline uint64_t roundUpToPowerOf2(uint64_t num)
     if (![selectedString length])
         return;
 
-#ifndef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
     [[NSWorkspace sharedWorkspace] showSearchResultsForQueryString:selectedString];
 #else
     (void)HISearchWindowShow((CFStringRef)selectedString, kNilOptions);
@@ -6579,7 +6579,7 @@ void WebInstallMemoryPressureHandler(void)
     memoryPressureHandler().install();
 }
 
-#ifdef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
 
 static IMP originalRecursivelyRemoveMailAttributesImp;
 
@@ -6605,7 +6605,7 @@ static void recursivelyRemoveMailAttributes(DOMNode *self, SEL selector, BOOL a,
 
 static void patchMailRemoveAttributesMethod()
 {
-#ifdef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
     if (!WKAppVersionCheckLessThan(@"com.apple.mail", -1, 4.0))
         return;
     Method methodToPatch = class_getInstanceMethod(objc_getRequiredClass("DOMNode"), @selector(recursivelyRemoveMailAttributes:convertObjectsToImages:convertEditableElements:));
index b7b3b1c..0a9808d 100644 (file)
@@ -677,7 +677,7 @@ Could be worth adding to the API.
 - (BOOL)isAutomaticDashSubstitutionEnabled;
 - (BOOL)isAutomaticTextReplacementEnabled;
 - (BOOL)isAutomaticSpellingCorrectionEnabled;
-#ifndef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
 - (void)setAutomaticQuoteSubstitutionEnabled:(BOOL)flag;
 - (void)toggleAutomaticQuoteSubstitution:(id)sender;
 - (void)setAutomaticLinkDetectionEnabled:(BOOL)flag;
index ed2a97e..0f28549 100644 (file)
@@ -1,3 +1,49 @@
+2012-07-11  Mark Rowe  <mrowe@apple.com>
+
+        <http://webkit.org/b/91015> Remove BUILDING_ON / TARGETING macros in favor of system availability macros
+
+        This removal was handled by a script that translates the relevant macros in to the equivalent checks
+        using the system availability macros.
+
+        Reviewed by Filip Pizlo.
+
+        * Shared/DictionaryPopupInfo.cpp:
+        * Shared/DictionaryPopupInfo.h:
+        * Shared/mac/PasteboardTypes.mm:
+        * Shared/mac/WebEventFactory.mm:
+        * UIProcess/API/mac/PDFViewController.mm:
+        * UIProcess/API/mac/PageClientImpl.mm:
+        * UIProcess/API/mac/WKView.mm:
+        * UIProcess/Launcher/mac/DynamicLinkerEnvironmentExtractor.h:
+        * UIProcess/Launcher/mac/DynamicLinkerEnvironmentExtractor.mm:
+        * UIProcess/Launcher/mac/EnvironmentVariables.cpp:
+        * UIProcess/Launcher/mac/EnvironmentVariables.h:
+        * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
+        * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
+        * UIProcess/WebPageProxy.cpp:
+        * UIProcess/WebPageProxy.h:
+        * UIProcess/WebPageProxy.messages.in:
+        * UIProcess/mac/TextCheckerMac.mm:
+        * UIProcess/mac/WKFullScreenWindowController.mm:
+        * UIProcess/mac/WebContextMac.mm:
+        * UIProcess/mac/WebPageProxyMac.mm:
+        * WebKit2Prefix.h:
+        * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
+        * WebProcess/Plugins/Netscape/mac/NetscapeSandboxFunctions.mm:
+        * WebProcess/WebCoreSupport/WebEditorClient.cpp:
+        * WebProcess/WebCoreSupport/WebEditorClient.h:
+        * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
+        * WebProcess/WebPage/WebPage.cpp:
+        * WebProcess/WebPage/WebPage.h:
+        * WebProcess/WebPage/WebPage.messages.in:
+        * WebProcess/WebPage/mac/WebPageMac.mm:
+        * WebProcess/com.apple.WebProcess.sb.in:
+        * WebProcess/mac/KeychainItemShimMethods.mm:
+        * WebProcess/mac/SecItemShimMethods.mm:
+        * WebProcess/mac/WebProcessMac.mm:
+        * WebProcess/mac/WebProcessMainMac.mm:
+        * WebProcess/mac/WebProcessShim.mm:
+
 2012-07-11  Simon Fraser  <simon.fraser@apple.com>
 
         pagesPerView param is misnamed for WKPageSetPageLength()
index 63221a5..0f9d06c 100644 (file)
@@ -40,7 +40,7 @@ void DictionaryPopupInfo::encode(CoreIPC::ArgumentEncoder* encoder) const
     encoder->encode(fontInfo);
     encoder->encodeEnum(type);
 
-#if PLATFORM(MAC) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     bool hadOptions = options;
     encoder->encodeBool(hadOptions);
     if (hadOptions)
@@ -56,7 +56,7 @@ bool DictionaryPopupInfo::decode(CoreIPC::ArgumentDecoder* decoder, DictionaryPo
         return false;
     if (!decoder->decodeEnum(result.type))
         return false;
-#if PLATFORM(MAC) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     bool hadOptions;
     if (!decoder->decodeBool(hadOptions))
         return false;
index 3814ece..bcec04c 100644 (file)
@@ -52,7 +52,7 @@ struct DictionaryPopupInfo {
     WebCore::FloatPoint origin;
     FontInfo fontInfo;
     Type type;
-#if PLATFORM(MAC) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     RetainPtr<CFDictionaryRef> options;
 #endif
 };
index 26cc6dc..090eb02 100644 (file)
@@ -44,7 +44,7 @@ static inline NSArray *retain(NSArray *array)
 NSArray* PasteboardTypes::forEditing()
 {
     static NSArray *types = retain([NSArray arrayWithObjects:WebArchivePboardType, NSHTMLPboardType, NSFilenamesPboardType, NSTIFFPboardType, NSPDFPboardType,
-#ifdef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
         NSPICTPboardType,
 #endif
         NSURLPboardType, NSRTFDPboardType, NSRTFPboardType, NSStringPboardType, NSColorPboardType, kUTTypePNG, nil]);
index 7c18524..772c0f7 100644 (file)
@@ -199,7 +199,7 @@ static NSPoint pointForEvent(NSEvent *event, NSView *windowView)
 
 static WebWheelEvent::Phase phaseForEvent(NSEvent *event)
 {
-#if !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     uint32_t phase = WebWheelEvent::PhaseNone; 
     if ([event phase] & NSEventPhaseBegan)
         phase |= WebWheelEvent::PhaseBegan;
@@ -211,7 +211,7 @@ static WebWheelEvent::Phase phaseForEvent(NSEvent *event)
         phase |= WebWheelEvent::PhaseEnded;
     if ([event phase] & NSEventPhaseCancelled)
         phase |= WebWheelEvent::PhaseCancelled;
-#if !defined(BUILDING_ON_LION)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
     if ([event phase] & NSEventPhaseMayBegin)
         phase |= WebWheelEvent::PhaseMayBegin;
 #endif
@@ -226,7 +226,7 @@ static WebWheelEvent::Phase momentumPhaseForEvent(NSEvent *event)
 {
     uint32_t phase = WebWheelEvent::PhaseNone; 
 
-#if !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     if ([event momentumPhase] & NSEventPhaseBegan)
         phase |= WebWheelEvent::PhaseBegan;
     if ([event momentumPhase] & NSEventPhaseStationary)
index 91fcf34..6a02f56 100644 (file)
@@ -504,7 +504,7 @@ bool PDFViewController::forwardScrollWheelEvent(NSEvent *wheelEvent)
     return true;
 }
 
-#ifndef BUILDING_ON_SNOW_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
 static IMP oldPDFViewScrollView_scrollWheel;
 
 static WKPDFView *findEnclosingWKPDFView(NSView *view)
@@ -557,7 +557,7 @@ NSBundle* PDFViewController::pdfKitBundle()
     if (![pdfKitBundle load])
         LOG_ERROR("Couldn't load PDFKit.framework");
 
-#ifndef BUILDING_ON_SNOW_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     if (Class pdfViewScrollViewClass = [pdfKitBundle classNamed:@"PDFViewScrollView"]) {
         if (Method scrollWheel = class_getInstanceMethod(pdfViewScrollViewClass, @selector(scrollWheel:)))
             oldPDFViewScrollView_scrollWheel = method_setImplementation(scrollWheel, reinterpret_cast<IMP>(PDFViewScrollView_scrollWheel));
index 457ce92..b31946b 100644 (file)
@@ -472,7 +472,7 @@ void PageClientImpl::didPerformDictionaryLookup(const String& text, double scale
 
     NSPoint textBaselineOrigin = dictionaryPopupInfo.origin;
 
-#if !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     // Convert to screen coordinates.
     textBaselineOrigin = [m_wkView convertPoint:textBaselineOrigin toView:nil];
     textBaselineOrigin = [m_wkView.window convertRectToScreen:NSMakeRect(textBaselineOrigin.x, textBaselineOrigin.y, 0, 0)].origin;
@@ -487,7 +487,7 @@ void PageClientImpl::didPerformDictionaryLookup(const String& text, double scale
 
 void PageClientImpl::dismissDictionaryLookupPanel()
 {
-#if !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     WKHideWordDefinitionWindow();
 #endif
 }
@@ -519,7 +519,7 @@ String PageClientImpl::dismissCorrectionPanelSoon(WebCore::ReasonForDismissingAl
 
 void PageClientImpl::recordAutocorrectionResponse(AutocorrectionResponseType responseType, const String& replacedString, const String& replacementString)
 {
-#if !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     NSCorrectionResponse response = responseType == AutocorrectionReverted ? NSCorrectionResponseReverted : NSCorrectionResponseEdited;
     CorrectionPanel::recordAutocorrectionResponse(m_wkView, response, replacedString, replacementString);
 #endif
@@ -527,7 +527,7 @@ void PageClientImpl::recordAutocorrectionResponse(AutocorrectionResponseType res
 
 void PageClientImpl::recommendedScrollbarStyleDidChange(int32_t newStyle)
 {
-#if !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     NSArray *trackingAreas = [m_wkView trackingAreas];
     NSUInteger count = [trackingAreas count];
     ASSERT(count == 1);
index e883215..27f233b 100644 (file)
 @end
 
 @interface NSWindow (WKNSWindowDetails)
-#if defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1060
 - (NSRect)_growBoxRect;
 - (id)_growBoxOwner;
 - (void)_setShowOpaqueGrowBoxForOwner:(id)owner;
@@ -957,7 +957,7 @@ static void speakString(WKStringRef string, WKErrorRef error, void*)
 
 - (void)displayIfNeeded
 {
-#if !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     // FIXME: We should remove this code when <rdar://problem/9362085> is resolved. In the meantime,
     // it is necessary to disable scren updates so we get a chance to redraw the corners before this 
     // display is visible.
@@ -969,7 +969,7 @@ static void speakString(WKStringRef string, WKErrorRef error, void*)
 
     [super displayIfNeeded];
 
-#if !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     if (shouldMaskWindow) {
         [window _maskRoundedBottomCorners:_data->_windowBottomCornerIntersectionRect];
         NSEnableScreenUpdates();
@@ -1666,7 +1666,7 @@ static void extractUnderlines(NSAttributedString *string, Vector<CompositionUnde
     _data->_page->dragUpdated(&dragData, [[draggingInfo draggingPasteboard] name]);
     
     WebCore::DragSession dragSession = _data->_page->dragSession();
-#if !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     NSInteger numberOfValidItemsForDrop = dragSession.numberOfItemsToBeAccepted;
     NSDraggingFormation draggingFormation = NSDraggingFormationNone;
     if (dragSession.mouseIsOverFileInput && numberOfValidItemsForDrop > 0)
@@ -1778,7 +1778,7 @@ static void createSandboxExtensionsForFileUpload(NSPasteboard *pasteboard, Sandb
 }
 
 
-#if defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1060
 - (BOOL)_ownsWindowGrowBox
 {
     NSWindow* window = [self window];
@@ -1888,7 +1888,7 @@ static NSString * const backingPropertyOldScaleFactorKey = @"NSBackingPropertyOl
     [self removeWindowObservers];
     [self addWindowObserversForWindow:window];
 
-#if defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1060
     if ([currentWindow _growBoxOwner] == self)
         [currentWindow _setShowOpaqueGrowBoxForOwner:nil];
 #endif
@@ -1927,7 +1927,7 @@ static NSString * const backingPropertyOldScaleFactorKey = @"NSBackingPropertyOl
             _data->_endGestureMonitor = nil;
         }
 #endif
-#if !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
         WKHideWordDefinitionWindow();
 #endif
     }
@@ -2209,7 +2209,7 @@ static void drawPageBackground(CGContextRef context, WebPageProxy* page, const I
 - (float)_intrinsicDeviceScaleFactor
 {
     NSWindow *window = [self window];
-#if !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     if (window)
         return [window backingScaleFactor];
     return [[NSScreen mainScreen] backingScaleFactor];
@@ -2234,7 +2234,7 @@ static void drawPageBackground(CGContextRef context, WebPageProxy* page, const I
     return NO;
 }
 
-#if !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
 - (void)quickLookWithEvent:(NSEvent *)event
 {
     NSPoint locationInViewCoordinates = [self convertPoint:[event locationInWindow] fromView:nil];
@@ -2865,7 +2865,7 @@ static NSString *pathWithUniqueFilenameForPath(NSString *path)
 
 - (void)_didChangeScrollbarsForMainFrame
 {
-#if defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1060
     [self _updateGrowBoxForWindowFrameChange];
 #endif
 }
@@ -2906,7 +2906,7 @@ static NSString *pathWithUniqueFilenameForPath(NSString *path)
 
 - (void)_cacheWindowBottomCornerRect
 {
-#if !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     // FIXME: We should remove this code when <rdar://problem/9362085> is resolved. 
     NSWindow *window = [self window];
     if (!window)
@@ -2967,7 +2967,7 @@ static NSString *pathWithUniqueFilenameForPath(NSString *path)
 
     // Legacy style scrollbars have design details that rely on tracking the mouse all the time.
     NSTrackingAreaOptions options = NSTrackingMouseMoved | NSTrackingMouseEnteredAndExited | NSTrackingInVisibleRect;
-#if !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     if (WKRecommendedScrollerStyle() == NSScrollerStyleLegacy)
         options |= NSTrackingActiveAlways;
     else
@@ -3009,7 +3009,7 @@ static NSString *pathWithUniqueFilenameForPath(NSString *path)
     return self;
 }
 
-#if !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
 - (BOOL)wantsUpdateLayer
 {
     return [self _shouldUseTiledDrawingArea];
@@ -3095,7 +3095,7 @@ static NSString *pathWithUniqueFilenameForPath(NSString *path)
 
 + (void)hideWordDefinitionWindow
 {
-#if !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     WKHideWordDefinitionWindow();
 #endif
 }
index 311e590..00b73a9 100644 (file)
@@ -26,7 +26,7 @@
 #ifndef DynamicLinkerEnvironmentExtractor_h
 #define DynamicLinkerEnvironmentExtractor_h
 
-#ifndef BUILDING_ON_SNOW_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
 
 #include <mach/machine.h>
 #include <wtf/Noncopyable.h>
@@ -61,6 +61,6 @@ private:
 
 } // namespace WebKit
 
-#endif // BUILDING_ON_SNOW_LEOPARD
+#endif // __MAC_OS_X_VERSION_MIN_REQUIRED == 1060
 
 #endif // DynamicLinkerEnvironmentExtractor_h
index bfc270c..6f35280 100644 (file)
@@ -26,7 +26,7 @@
 #include "config.h"
 #include "DynamicLinkerEnvironmentExtractor.h"
 
-#ifndef BUILDING_ON_SNOW_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
 
 #include "EnvironmentVariables.h"
 #include <mach-o/loader.h>
@@ -201,4 +201,4 @@ void DynamicLinkerEnvironmentExtractor::getExtractedEnvironmentVariables(Environ
 
 } // namespace WebKit
 
-#endif // BUILDING_ON_SNOW_LEOPARD
+#endif // __MAC_OS_X_VERSION_MIN_REQUIRED == 1060
index 72979f8..be0f909 100644 (file)
@@ -136,7 +136,7 @@ void EnvironmentVariables::copyEnvironmentVariables()
     m_environmentPointer = m_environmentVariables.data();
 }
 
-#if !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
 
 const char* EnvironmentVariables::preexistingProcessServiceNameKey()
 {
@@ -148,6 +148,6 @@ const char* EnvironmentVariables::preexistingProcessTypeKey()
     return "WEBKIT_PREEXISTING_PROCESS_TYPE";
 }
 
-#endif // !defined(BUILDING_ON_SNOW_LEOPARD)
+#endif // __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
 
 } // namespace WebKit
index 3382939..ff4ab10 100644 (file)
@@ -46,7 +46,7 @@ public:
 
     char** environmentPointer() const { return m_environmentPointer; }
 
-#if !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     static const char* preexistingProcessServiceNameKey();
     static const char* preexistingProcessTypeKey();
 #endif
index dc839c8..fab9c24 100644 (file)
@@ -80,7 +80,7 @@ void ProcessLauncher::launchProcess()
     pid_t processIdentifier = 0;
 
     EnvironmentVariables environmentVariables;
-#if !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     static const char* preexistingProcessServiceName = environmentVariables.get(EnvironmentVariables::preexistingProcessServiceNameKey());
     ProcessType preexistingProcessType;
     if (preexistingProcessServiceName)
@@ -160,7 +160,7 @@ void ProcessLauncher::launchProcess()
         // Start suspended so we can set up the termination notification handler.
         flags |= POSIX_SPAWN_START_SUSPENDED;
 
-#ifndef BUILDING_ON_SNOW_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
         static const int allowExecutableHeapFlag = 0x2000;
         if (m_launchOptions.executableHeap)
             flags |= allowExecutableHeapFlag;
@@ -168,7 +168,7 @@ void ProcessLauncher::launchProcess()
 
         posix_spawnattr_setflags(&attr, flags);
 
-#ifndef BUILDING_ON_SNOW_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
         DynamicLinkerEnvironmentExtractor environmentExtractor([[NSBundle mainBundle] executablePath], architecture);
         environmentExtractor.getExtractedEnvironmentVariables(environmentVariables);
 #endif
@@ -211,7 +211,7 @@ void ProcessLauncher::launchProcess()
             listeningPort = MACH_PORT_NULL;
             processIdentifier = 0;
         }
-#if !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     }
 #endif
 
index 290451a..3486de4 100644 (file)
@@ -35,7 +35,7 @@
 #import <spawn.h>
 #import <wtf/text/CString.h>
 
-#if !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
 #import <QuartzCore/CARemoteLayerServer.h>
 #endif
 
@@ -120,7 +120,7 @@ void PluginProcessProxy::platformInitializePluginProcess(PluginProcessCreationPa
 {
 #if USE(ACCELERATED_COMPOSITING) && HAVE(HOSTED_CORE_ANIMATION)
     parameters.parentProcessName = [[NSProcessInfo processInfo] processName];
-#if !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     mach_port_t renderServerPort = [[CARemoteLayerServer sharedServer] serverPort];
 #else
     mach_port_t renderServerPort = WKInitializeRenderServer();
index 85709ef..17cc2f4 100644 (file)
@@ -1981,7 +1981,7 @@ void WebPageProxy::didCommitLoadForFrame(uint64_t frameID, const String& mimeTyp
     // FIXME (bug 59111): didCommitLoadForFrame comes too late when restoring a page from b/f cache, making us disable secure event mode in password fields.
     // FIXME (bug 59121): A load going on in one frame shouldn't affect typing in sibling frames.
     m_pageClient->resetTextInputState();
-#if !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     // FIXME: Should this be moved inside resetTextInputState()?
     dismissCorrectionPanel(ReasonForDismissingAlternativeTextIgnored);
     m_pageClient->dismissDictionaryLookupPanel();
@@ -2551,7 +2551,7 @@ void WebPageProxy::didChangeViewportProperties(const ViewportAttributes& attr)
 void WebPageProxy::pageDidScroll()
 {
     m_uiClient.pageDidScroll(this);
-#if PLATFORM(MAC) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     dismissCorrectionPanel(ReasonForDismissingAlternativeTextIgnored);
 #endif
 }
@@ -3530,7 +3530,7 @@ void WebPageProxy::processDidCrash()
     m_touchEventQueue.clear();
 #endif
 
-#if PLATFORM(MAC) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     dismissCorrectionPanel(ReasonForDismissingAlternativeTextIgnored);
     m_pageClient->dismissDictionaryLookupPanel();
 #endif
@@ -3905,7 +3905,7 @@ void WebPageProxy::substitutionsPanelIsShowing(bool& isShowing)
     isShowing = TextChecker::substitutionsPanelIsShowing();
 }
 
-#if !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
 void WebPageProxy::showCorrectionPanel(int32_t panelType, const FloatRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacementString, const Vector<String>& alternativeReplacementStrings)
 {
     m_pageClient->showCorrectionPanel((AlternativeTextType)panelType, boundingBoxOfReplacedString, replacedString, replacementString, alternativeReplacementStrings);
@@ -3925,11 +3925,11 @@ void WebPageProxy::recordAutocorrectionResponse(int32_t responseType, const Stri
 {
     m_pageClient->recordAutocorrectionResponse((AutocorrectionResponseType)responseType, replacedString, replacementString);
 }
-#endif // !defined(BUILDING_ON_SNOW_LEOPARD)
+#endif // __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
 
 void WebPageProxy::handleAlternativeTextUIResult(const String& result)
 {
-#if !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     if (!isClosed())
         process()->send(Messages::WebPage::HandleAlternativeTextUIResult(result), m_pageID, 0);
 #endif
index 57ab86c..6c7e688 100644 (file)
@@ -949,12 +949,12 @@ private:
 
 #if PLATFORM(MAC)
     void substitutionsPanelIsShowing(bool&);
-#if !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     void showCorrectionPanel(int32_t panelType, const WebCore::FloatRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacementString, const Vector<String>& alternativeReplacementStrings);
     void dismissCorrectionPanel(int32_t reason);
     void dismissCorrectionPanelSoon(int32_t reason, String& result);
     void recordAutocorrectionResponse(int32_t responseType, const String& replacedString, const String& replacementString);
-#endif // !defined(BUILDING_ON_SNOW_LEOPARD)
+#endif // __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
 
 #if USE(DICTATION_ALTERNATIVES)
     void showDictationAlternativeUI(const WebCore::FloatRect& boundingBoxOfDictatedText, uint64_t dictationContext);
index 0341276..7838d64 100644 (file)
@@ -287,7 +287,7 @@ messages -> WebPageProxy {
 #if PLATFORM(MAC)
     SubstitutionsPanelIsShowing() -> (bool isShowing)
 #endif
-#if PLATFORM(MAC) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     # Autocorrection messages
     ShowCorrectionPanel(int32_t panelType, WebCore::FloatRect boundingBoxOfReplacedString, String replacedString, String replacementString, Vector<String> alternativeReplacementStrings)
     DismissCorrectionPanel(int32_t reason)
index 20a63ea..6da8a43 100644 (file)
@@ -30,7 +30,7 @@
 #import <WebCore/NotImplemented.h>
 #import <wtf/RetainPtr.h>
 
-#ifndef BUILDING_ON_SNOW_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
 @interface NSSpellChecker (WebNSSpellCheckerDetails)
 - (NSString *)languageForWordRange:(NSRange)range inString:(NSString *)string orthography:(NSOrthography *)orthography;
 @end
@@ -65,7 +65,7 @@ static void initializeState()
     textCheckerState.isAutomaticLinkDetectionEnabled = [[NSUserDefaults standardUserDefaults] boolForKey:WebAutomaticLinkDetectionEnabled];
     textCheckerState.isAutomaticTextReplacementEnabled = [[NSUserDefaults standardUserDefaults] boolForKey:WebAutomaticTextReplacementEnabled];
 
-#if !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     if (![[NSUserDefaults standardUserDefaults] objectForKey:WebAutomaticSpellingCorrectionEnabled])
         textCheckerState.isAutomaticSpellingCorrectionEnabled = [NSSpellChecker isAutomaticSpellingCorrectionEnabled];
 #endif
@@ -372,7 +372,7 @@ void TextChecker::updateSpellingUIWithGrammarString(int64_t, const String& badGr
 
 void TextChecker::getGuessesForWord(int64_t spellDocumentTag, const String& word, const String& context, Vector<String>& guesses)
 {
-#if !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     NSString* language = nil;
     NSOrthography* orthography = nil;
     NSSpellChecker *checker = [NSSpellChecker sharedSpellChecker];
index e9579ab..6932b81 100644 (file)
@@ -62,7 +62,7 @@ static const NSTimeInterval DefaultWatchdogTimerInterval = 1;
 - (void)_startExitFullScreenAnimationWithDuration:(NSTimeInterval)duration;
 @end
 
-#if defined(BUILDING_ON_LEOPARD) || defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED <= 1060
 @interface NSWindow(convertRectToScreenForLeopardAndSnowLeopard)
 - (NSRect)convertRectToScreen:(NSRect)aRect;
 @end
@@ -295,14 +295,14 @@ static RetainPtr<CGImageRef> createImageWithCopiedData(CGImageRef sourceImage)
         WKWindowSetClipRect([self window], windowBounds);
 
         NSWindow *webWindow = [_webViewPlaceholder.get() window];
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
         // In Lion, NSWindow will animate into and out of orderOut operations. Suppress that
         // behavior here, making sure to reset the animation behavior afterward.
         NSWindowAnimationBehavior animationBehavior = [webWindow animationBehavior];
         [webWindow setAnimationBehavior:NSWindowAnimationBehaviorNone];
 #endif
         [webWindow orderOut:self];
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
         [webWindow setAnimationBehavior:animationBehavior];
 #endif
 
@@ -352,7 +352,7 @@ static RetainPtr<CGImageRef> createImageWithCopiedData(CGImageRef sourceImage)
     [self _updateMenuAndDockForFullScreen];
     
     NSWindow* webWindow = [_webViewPlaceholder.get() window];
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     // In Lion, NSWindow will animate into and out of orderOut operations. Suppress that
     // behavior here, making sure to reset the animation behavior afterward.
     NSWindowAnimationBehavior animationBehavior = [webWindow animationBehavior];
@@ -368,7 +368,7 @@ static RetainPtr<CGImageRef> createImageWithCopiedData(CGImageRef sourceImage)
     } else
         [webWindow orderWindow:NSWindowBelow relativeTo:[[self window] windowNumber]];
     
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     [webWindow setAnimationBehavior:animationBehavior];
 #endif
 
@@ -460,7 +460,7 @@ static void completeFinishExitFullScreenAnimationAfterRepaint(WKErrorRef, void*
 - (void)_updateMenuAndDockForFullScreen
 {
     // NSApplicationPresentationOptions is available on > 10.6 only:
-#ifndef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
     NSApplicationPresentationOptions options = NSApplicationPresentationDefault;
     NSScreen* fullScreenScreen = [[self window] screen];
     
index 438183a..fcd004e 100644 (file)
@@ -33,7 +33,7 @@
 #import <WebCore/PlatformPasteboard.h>
 #import <sys/param.h>
 
-#if HAVE(HOSTED_CORE_ANIMATION) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if HAVE(HOSTED_CORE_ANIMATION) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
 #import <QuartzCore/CARemoteLayerServer.h>
 #endif
 
@@ -99,7 +99,7 @@ void WebContext::platformInitializeWebProcess(WebProcessCreationParameters& para
 #endif
 
 #if USE(ACCELERATED_COMPOSITING) && HAVE(HOSTED_CORE_ANIMATION)
-#if !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     mach_port_t renderServerPort = [[CARemoteLayerServer sharedServer] serverPort];
 #else
     mach_port_t renderServerPort = WKInitializeRenderServer();
index 96712bf..c5fe335 100644 (file)
@@ -63,7 +63,7 @@ namespace WebKit {
 #error Unknown architecture
 #endif
 
-#if !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
 
 static String macOSXVersionString()
 {
@@ -98,7 +98,7 @@ static String macOSXVersionString()
     return String::format("%d", major);
 }
 
-#endif // !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION)
+#endif // __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
 
 static String userVisibleWebKitVersionString()
 {
index ebc0a49..4deb629 100644 (file)
@@ -32,7 +32,7 @@
 
 #if PLATFORM(MAC)
 
-#ifndef BUILDING_ON_SNOW_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
 #define ENABLE_WEB_PROCESS_SANDBOX 1
 #endif
 
index 759765d..d40db79 100644 (file)
@@ -38,7 +38,7 @@
 #include <WebCore/SharedBuffer.h>
 #include <utility>
 
-#if PLATFORM(MAC) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
 #include "NetscapeSandboxFunctions.h"
 #endif
 
@@ -507,7 +507,7 @@ static NPError NPN_GetValue(NPP npp, NPNVariable variable, void *value)
             *(NPBool*)value = true;
             break;
 
-#if PLATFORM(MAC) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) && ENABLE(PLUGIN_PROCESS)
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070 && ENABLE(PLUGIN_PROCESS)
         case WKNVSandboxFunctions:
         {
             *(WKNSandboxFunctions **)value = netscapeSandboxFunctions();
index 775e3ca..afcc645 100644 (file)
@@ -28,7 +28,7 @@
 
 #if ENABLE(NETSCAPE_PLUGIN_API) && ENABLE(PLUGIN_PROCESS)
 
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
 
 #import "PluginProcess.h"
 #import "NetscapePluginModule.h"
@@ -103,7 +103,7 @@ NPError WKN_EnterSandbox(const char* readOnlyPaths[], const char* readWritePaths
     if (profile.isNull())
         exit(EX_NOPERM);
 
-#if !defined(BUILDING_ON_LION)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
     // Use private temporary and cache directories.
     String systemDirectorySuffix = "com.apple.WebKit.PluginProcess+" + PluginProcess::shared().netscapePluginModule()->module()->bundleIdentifier();
     setenv("DIRHELPER_USER_DIR_SUFFIX", fileSystemRepresentation(systemDirectorySuffix).data(), 0);
@@ -190,6 +190,6 @@ NPError WKN_FileStopAccessing(const char* path)
     return NPERR_NO_ERROR;
 }
 
-#endif // !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#endif // __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
 
 #endif // ENABLE(NETSCAPE_PLUGIN_API) && ENABLE(PLUGIN_PROCESS)
index 03d599d..092ec68 100644 (file)
@@ -375,7 +375,7 @@ void WebEditorClient::textWillBeDeletedInTextField(Element* element)
 bool WebEditorClient::shouldEraseMarkersAfterChangeSelection(WebCore::TextCheckingType type) const
 {
     // This prevents erasing spelling markers on OS X Lion or later to match AppKit on these Mac OS X versions.
-#if PLATFORM(MAC) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     return type != TextCheckingTypeSpelling;
 #else
     return true;
index d4ed311..fbadd2f 100644 (file)
@@ -135,7 +135,7 @@ private:
     virtual void checkSpellingOfString(const UChar*, int length, int* misspellingLocation, int* misspellingLength) OVERRIDE;
     virtual String getAutoCorrectSuggestionForMisspelledWord(const String& misspelledWord) OVERRIDE;
     virtual void checkGrammarOfString(const UChar*, int length, Vector<WebCore::GrammarDetail>&, int* badGrammarLocation, int* badGrammarLength) OVERRIDE;
-#if PLATFORM(MAC) && !defined(BUILDING_ON_LEOPARD)
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
     virtual void checkTextOfParagraph(const UChar* text, int length, WebCore::TextCheckingTypeMask checkingTypes, Vector<WebCore::TextCheckingResult>& results) OVERRIDE;
 #endif
     virtual void updateSpellingUIWithGrammarString(const String&, const WebCore::GrammarDetail&) OVERRIDE;
index 99fd1cd..eb10492 100644 (file)
@@ -37,7 +37,7 @@ void InitWebCoreSystemInterface(void)
     
     dispatch_once(&initOnce, ^{
         INIT(AdvanceDefaultButtonPulseAnimation);
-#if !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
         INIT(CALayerEnumerateRectsBeingDrawnWithBlock);
 #endif
         INIT(CopyCFLocalizationPreferredName);
@@ -117,7 +117,7 @@ void InitWebCoreSystemInterface(void)
 
         INIT(SetMetadataURL);
         
-#if !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
         INIT(IOSurfaceContextCreate);
         INIT(IOSurfaceContextCreateImage);
         INIT(CreateCTTypesetterWithUniCharProviderAndOptions);
@@ -156,23 +156,23 @@ void InitWebCoreSystemInterface(void)
         INIT(CopyCFURLResponseSuggestedFilename);
         INIT(SetCFURLResponseMIMEType);
 
-#if !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
         INIT(CreateVMPressureDispatchOnMainQueue);
 #endif
 
-#if !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
         INIT(GetMacOSXVersionString);
         INIT(ExecutableWasLinkedOnOrBeforeLion);
 #endif
 
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
         INIT(CGPathAddRoundedRect);
 #endif
 
-#if !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
         INIT(CFURLRequestAllowAllPostCaching);
 #endif
-#if PLATFORM(MAC) && !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION) && !PLATFORM(IOS)
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 && !PLATFORM(IOS)
         INIT(FilterIsManagedSession);
         INIT(FilterCreateInstance);
         INIT(FilterRelease);
index 37d1e07..7f9bdf1 100644 (file)
@@ -3091,7 +3091,7 @@ bool WebPage::canHandleRequest(const WebCore::ResourceRequest& request)
     return platformCanHandleRequest(request);
 }
 
-#if PLATFORM(MAC) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
 void WebPage::handleAlternativeTextUIResult(const String& result)
 {
     Frame* frame = m_page->focusController()->focusedOrMainFrame();
index b9dac91..d234a1d 100644 (file)
@@ -520,7 +520,7 @@ public:
 
     void unmarkAllMisspellings();
     void unmarkAllBadGrammar();
-#if PLATFORM(MAC) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     void handleAlternativeTextUIResult(const String&);
 #endif
 
index 38f36c2..75f7245 100644 (file)
@@ -277,7 +277,7 @@ messages -> WebPage {
     FindZoomableAreaForPoint(WebCore::IntPoint point, WebCore::IntSize area)
 #endif
 
-#if PLATFORM(MAC) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     HandleAlternativeTextUIResult(String result)
 #endif
 
index 22eede8..43d381e 100644 (file)
@@ -481,7 +481,7 @@ void WebPage::performDictionaryLookupAtLocation(const FloatPoint& floatPoint)
 
     NSDictionary *options = nil;
 
-#if !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     // As context, we are going to use the surrounding paragraph of text.
     VisiblePosition paragraphStart = startOfParagraph(position);
     VisiblePosition paragraphEnd = endOfParagraph(position);
@@ -513,7 +513,7 @@ void WebPage::performDictionaryLookupForSelection(DictionaryPopupInfo::Type type
 
     NSDictionary *options = nil;
 
-#if !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     VisiblePosition selectionStart = selection.visibleStart();
     VisiblePosition selectionEnd = selection.visibleEnd();
 
@@ -564,7 +564,7 @@ void WebPage::performDictionaryLookupForRange(DictionaryPopupInfo::Type type, Fr
     dictionaryPopupInfo.type = type;
     dictionaryPopupInfo.origin = FloatPoint(rangeRect.x(), rangeRect.y() + (style->fontMetrics().ascent() * pageScaleFactor()));
     dictionaryPopupInfo.fontInfo.fontAttributeDictionary = fontDescriptorAttributes;
-#if !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     dictionaryPopupInfo.options = (CFDictionaryRef)options;
 #endif
 
index b38c23c..c501e8f 100644 (file)
@@ -93,7 +93,7 @@
 (allow file*
     (subpath "/private/var/db/mds/system"))
 
-#if !defined(BUILDING_ON_LION)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
 (if (positive? (string-length (param "DARWIN_USER_CACHE_DIR")))
     (allow file* (subpath (param "DARWIN_USER_CACHE_DIR"))))
 #else
index 3f229a1..5759aa5 100644 (file)
@@ -26,7 +26,7 @@
 #import "config.h"
 #import "KeychainItemShimMethods.h"
 
-#if USE(SECURITY_FRAMEWORK) && defined(BUILDING_ON_SNOW_LEOPARD)
+#if USE(SECURITY_FRAMEWORK) && __MAC_OS_X_VERSION_MIN_REQUIRED == 1060
 
 #import "BlockingResponseMap.h"
 #import "SecKeychainItemRequestData.h"
@@ -229,4 +229,4 @@ void initializeKeychainItemShim()
 
 } // namespace WebKit
 
-#endif // USE(SECURITY_FRAMEWORK) && defined(BUILDING_ON_SNOW_LEOPARD)
+#endif // USE(SECURITY_FRAMEWORK) && __MAC_OS_X_VERSION_MIN_REQUIRED == 1060
index cfe33ad..50cbb58 100644 (file)
@@ -26,7 +26,7 @@
 #import "config.h"
 #import "SecItemShimMethods.h"
 
-#if !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
 
 #import "BlockingResponseMap.h"
 #import "SecItemRequestData.h"
@@ -119,4 +119,4 @@ void initializeSecItemShim()
 
 } // namespace WebKit
 
-#endif // !BUILDING_ON_SNOW_LEOPARD
+#endif // __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
index 69f4fb1..0a8c0a4 100644 (file)
@@ -45,7 +45,7 @@
 #import <objc/runtime.h>
 #import <stdio.h>
 
-#if defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1060
 #import "KeychainItemShimMethods.h"
 #else
 #import "SecItemShimMethods.h"
@@ -185,7 +185,7 @@ static void initializeSandbox(const WebProcessCreationParameters& parameters)
         return;
     }
 
-#if !defined(BUILDING_ON_LION)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
     // Use private temporary and cache directories.
     String systemDirectorySuffix = "com.apple.WebProcess+" + parameters.uiProcessBundleIdentifier;
     setenv("DIRHELPER_USER_DIR_SUFFIX", fileSystemRepresentation(systemDirectorySuffix).data(), 0);
@@ -281,7 +281,7 @@ void WebProcess::platformInitializeWebProcess(const WebProcessCreationParameters
 
 void WebProcess::initializeShim()
 {
-#if defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1060
     initializeKeychainItemShim();
 #else
     initializeSecItemShim();
@@ -299,14 +299,14 @@ void WebProcess::platformTerminate()
 
 void WebProcess::secItemResponse(CoreIPC::Connection*, uint64_t requestID, const SecItemResponseData& response)
 {
-#if !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     didReceiveSecItemResponse(requestID, response);
 #endif
 }
 
 void WebProcess::secKeychainItemResponse(CoreIPC::Connection*, uint64_t requestID, const SecKeychainItemResponseData& response)
 {
-#if defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1060
     didReceiveSecKeychainItemResponse(requestID, response);
 #endif
 }
index 48ac2f3..1b67fc6 100644 (file)
@@ -47,7 +47,7 @@
 #import <wtf/text/CString.h>
 #import <wtf/text/StringBuilder.h>
 
-#if !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
 extern "C" kern_return_t bootstrap_register2(mach_port_t, name_t, mach_port_t, uint64_t);
 #endif
 
@@ -73,7 +73,7 @@ int WebProcessMain(const CommandLine& commandLine)
 
     String serviceName = commandLine["servicename"];
     String clientExecutable;
-#if !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     clientExecutable = commandLine["client-executable"];
 #endif
 
@@ -89,7 +89,7 @@ int WebProcessMain(const CommandLine& commandLine)
             return 2;
         }
     }
-#if !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     else {
         mach_port_name_t publishedService;
         mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE, &publishedService);
@@ -141,7 +141,7 @@ int WebProcessMain(const CommandLine& commandLine)
             return EXIT_FAILURE;
         }
     }
-#endif // !defined(BUILDING_ON_SNOW_LEOPARD)
+#endif // __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
 
     String localization = commandLine["localization"];
     RetainPtr<CFStringRef> cfLocalization(AdoptCF, CFStringCreateWithCharacters(0, reinterpret_cast<const UniChar*>(localization.characters()), localization.length()));
index 6d69441..99166e6 100644 (file)
@@ -33,7 +33,7 @@
 
 namespace WebKit {
 
-#if !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
 
 extern "C" void WebKitWebProcessSecItemShimInitialize(const WebProcessSecItemShimCallbacks&);
 
@@ -70,9 +70,9 @@ void WebKitWebProcessSecItemShimInitialize(const WebProcessSecItemShimCallbacks&
     secItemShimCallbacks = callbacks;
 }
 
-#endif // !defined(BUILDING_ON_SNOW_LEOPARD)
+#endif // __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
 
-#if defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1060
 
 extern "C" void WebKitWebProcessKeychainItemShimInitialize(const WebProcessKeychainItemShimCallbacks&);
 
@@ -121,6 +121,6 @@ void WebKitWebProcessKeychainItemShimInitialize(const WebProcessKeychainItemShim
     keychainItemShimCallbacks = callbacks;
 }
 
-#endif // defined(BUILDING_ON_SNOW_LEOPARD)
+#endif // __MAC_OS_X_VERSION_MIN_REQUIRED == 1060
 
 } // namespace WebKit
index c9a5cec..4a4c3b2 100644 (file)
@@ -1,3 +1,22 @@
+2012-07-11  Mark Rowe  <mrowe@apple.com>
+
+        <http://webkit.org/b/91015> Remove BUILDING_ON / TARGETING macros in favor of system availability macros
+
+        This removal was handled by a script that translates the relevant macros in to the equivalent checks
+        using the system availability macros.
+
+        Reviewed by Filip Pizlo.
+
+        * DumpRenderTree/cf/WebArchiveDumpSupport.cpp:
+        * DumpRenderTree/mac/CheckedMalloc.cpp:
+        * DumpRenderTree/mac/DumpRenderTree.mm:
+        * DumpRenderTree/mac/DumpRenderTreeDraggingInfo.mm:
+        * DumpRenderTree/mac/LayoutTestControllerMac.mm:
+        * DumpRenderTree/mac/TextInputController.m:
+        * TestWebKitAPI/mac/InjectedBundleControllerMac.mm:
+        * WebKitTestRunner/InjectedBundle/mac/ActivateFonts.mm:
+        * WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm:
+
 2012-07-11  Robert Kroeger  <rjkroege@chromium.org>
 
         Suppress horizontal conversion of PlatformWheelEvents when hasPreciseScrollingDeltas is true
index 33dc28a..1f7f172 100644 (file)
@@ -44,7 +44,7 @@ CFTypeID CFURLResponseGetTypeID(void);
 
 static void convertMIMEType(CFMutableStringRef mimeType)
 {
-#ifdef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
     // Workaround for <rdar://problem/5539824> on Leopard
     if (CFStringCompare(mimeType, CFSTR("text/xml"), kCFCompareAnchored | kCFCompareCaseInsensitive) == kCFCompareEqualTo)
         CFStringReplaceAll(mimeType, CFSTR("application/xml"));
@@ -158,7 +158,7 @@ CFStringRef createXMLStringFromWebArchiveData(CFDataRef webArchiveData)
     CFErrorRef error = 0;
     CFPropertyListFormat format = kCFPropertyListBinaryFormat_v1_0;
 
-#ifdef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
     CFIndex bytesCount = CFDataGetLength(webArchiveData);
     RetainPtr<CFReadStreamRef> readStream(AdoptCF, CFReadStreamCreateWithBytesNoCopy(kCFAllocatorDefault, CFDataGetBytePtr(webArchiveData), bytesCount, kCFAllocatorNull));
     CFReadStreamOpen(readStream.get());
@@ -208,7 +208,7 @@ CFStringRef createXMLStringFromWebArchiveData(CFDataRef webArchiveData)
 
     error = 0;
 
-#ifdef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
     RetainPtr<CFDataRef> xmlData(AdoptCF, CFPropertyListCreateXMLData(kCFAllocatorDefault, propertyList.get()));
 #else
     RetainPtr<CFDataRef> xmlData(AdoptCF, CFPropertyListCreateData(kCFAllocatorDefault, propertyList.get(), kCFPropertyListXMLFormat_v1_0, 0, &error));
index 8bd53e5..b56cb28 100644 (file)
@@ -54,7 +54,7 @@ static void* checkedRealloc(malloc_zone_t* zone, void* ptr, size_t size)
     return savedRealloc(zone, ptr, size);
 }
 
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
 static vm_prot_t protectionOfRegion(mach_vm_address_t address)
 {
     mach_vm_size_t regionSize = 0;
@@ -71,7 +71,7 @@ void makeLargeMallocFailSilently()
 {
     malloc_zone_t* zone = malloc_default_zone();
 
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     mach_vm_address_t pageStart = reinterpret_cast<vm_address_t>(zone) & static_cast<vm_size_t>(~(getpagesize() - 1));
     vm_prot_t initialProtection = protectionOfRegion(pageStart);
 
@@ -85,7 +85,7 @@ void makeLargeMallocFailSilently()
     zone->malloc = checkedMalloc;
     zone->realloc = checkedRealloc;
 
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     if (mach_vm_protect(mach_task_self(), pageStart, len, 0, initialProtection))
         CRASH();
 #endif
index dd0eff4..abba535 100644 (file)
@@ -418,7 +418,7 @@ static void activateTestingFonts()
         "WebKitWeightWatcher700.ttf",
         "WebKitWeightWatcher800.ttf",
         "WebKitWeightWatcher900.ttf",
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
         "SampleFont.sfont",
 #endif
         0
@@ -590,7 +590,7 @@ static void resetDefaultsToConsistentValues()
 #endif
 
 
-#if !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION) && !PLATFORM(CHROMIUM)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 && !PLATFORM(CHROMIUM)
     [defaults setBool:NO forKey:@"NSScrollAnimationEnabled"];
 #else
     [defaults setBool:NO forKey:@"AppleScrollAnimationEnabled"];
@@ -655,7 +655,7 @@ static void resetDefaultsToConsistentValues()
     // So, turn it off for now, but we might want to turn it back on some day.
     [preferences setUsesPageCache:NO];
     [preferences setAcceleratedCompositingEnabled:YES];
-#if USE(CA) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if USE(CA) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     [preferences setCanvasUsesAcceleratedDrawing:YES];
     [preferences setAcceleratedDrawingEnabled:NO];
 #endif
index b729cf4..b6b22c2 100644 (file)
     return nil;
 }
 
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
 - (NSDraggingFormation)draggingFormation
 {
     return NSDraggingFormationDefault;
 {
     // Ignored.
 }
-#endif // !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#endif // __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
 
 @end
 
index f360c06..54f8754 100644 (file)
@@ -1031,7 +1031,7 @@ void LayoutTestController::setWebViewEditable(bool editable)
 
 static NSString *SynchronousLoaderRunLoopMode = @"DumpRenderTreeSynchronousLoaderRunLoopMode";
 
-#if defined(BUILDING_ON_LEOPARD) || defined(BUILDING_ON_SNOW_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED <= 1060
 @protocol NSURLConnectionDelegate <NSObject>
 @end
 #endif
@@ -1107,7 +1107,7 @@ static NSString *SynchronousLoaderRunLoopMode = @"DumpRenderTreeSynchronousLoade
 void LayoutTestController::authenticateSession(JSStringRef url, JSStringRef username, JSStringRef password)
 {
     // See <rdar://problem/7880699>.
-#ifndef BUILDING_ON_LEOPARD
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
     RetainPtr<CFStringRef> urlStringCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, url));
     RetainPtr<CFStringRef> usernameCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, username));
     RetainPtr<CFStringRef> passwordCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, password));
@@ -1135,7 +1135,7 @@ void LayoutTestController::setMinimumTimerInterval(double minimumTimerInterval)
 
 void LayoutTestController::setTextDirection(JSStringRef directionName)
 {
-#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
     if (JSStringIsEqualToUTF8CString(directionName, "ltr"))
         [[mainFrame webView] makeBaseWritingDirectionLeftToRight:0];
     else if (JSStringIsEqualToUTF8CString(directionName, "rtl"))
index afeb16e..91dbd84 100644 (file)
@@ -31,7 +31,7 @@
 
 #import "DumpRenderTreeMac.h"
 #import <AppKit/NSInputManager.h>
-#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
 #define SUPPORT_DICTATION_ALTERNATIVES
 #import <AppKit/NSTextAlternatives.h>
 #endif
index 4dd4ef0..965beb4 100644 (file)
@@ -40,7 +40,7 @@ void InjectedBundleController::platformInitialize()
     NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:
                           [NSNumber numberWithInteger:4],   @"AppleAntiAliasingThreshold",
                           [NSNumber numberWithInteger:0],   @"AppleFontSmoothing",
-#if !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION) && !PLATFORM(CHROMIUM)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 && !PLATFORM(CHROMIUM)
                           [NSNumber numberWithBool:NO],     @"NSScrollAnimationEnabled",
 #else
                           [NSNumber numberWithBool:NO],     @"AppleScrollAnimationEnabled",
index 320b28a..01d790b 100644 (file)
@@ -234,7 +234,7 @@ void activateFonts()
         "WebKitWeightWatcher700.ttf",
         "WebKitWeightWatcher800.ttf",
         "WebKitWeightWatcher900.ttf",
-#if !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
         "SampleFont.sfont",
 #endif
         0
index 419064f..996acbb 100644 (file)
@@ -39,7 +39,7 @@ void InjectedBundle::platformInitialize(WKTypeRef)
     NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:
         [NSNumber numberWithInteger:4],   @"AppleAntiAliasingThreshold",
         [NSNumber numberWithInteger:0],   @"AppleFontSmoothing",
-#if !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION) && !PLATFORM(CHROMIUM)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 && !PLATFORM(CHROMIUM)
         [NSNumber numberWithBool:NO],     @"NSScrollAnimationEnabled",
 #else
         [NSNumber numberWithBool:NO],     @"AppleScrollAnimationEnabled",