+2014-01-06 Mark Rowe <mrowe@apple.com>
+
+ <https://webkit.org/b/126499> Move WebKit off the legacy WebKit availability macros
+
+ The legacy WebKit availability macros are verbose, confusing, and provide no benefit
+ over using the system availability macros directly. The original vision was that
+ they'd serve a cross-platform purpose but that never came to be.
+
+ Since WebKit1 is API on OS X but SPI on iOS, some indirection is still needed in the
+ availability macros to allow the headers to advertise the API as unavailable on OS X
+ without interfering with the ability to build on iOS. This is achieved by defining
+ WEBKIT-prefixed versions of the Foundation availability macros that are defined to
+ their NS-prefixed equivalents. The installed headers are post-processed to map these
+ macros back to their Foundation equivalents.
+
+ Part of <rdar://problem/15512304>.
+
+ Reviewed by Sam Weinig.
+
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/objc/WebKitAvailability.h: Added. This lives at the WebCore level since it
+ will be needed by the Objective-C DOM bindings.
+
2014-01-05 Simon Fraser <simon.fraser@apple.com>
Move responsibility for remote layer tree committing to RemoteLayerTreeDrawingArea
5DFE8F570D16477C0076E937 /* ScheduledAction.h in Headers */ = {isa = PBXBuildFile; fileRef = BCA378BB0D15F64200B793D6 /* ScheduledAction.h */; };
5F2DBBE9178E3C8100141486 /* CertificateInfoMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5F2DBBE7178E332D00141486 /* CertificateInfoMac.mm */; };
5FA904CA178E61F5004C8A2D /* CertificateInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F2DBBE8178E336900141486 /* CertificateInfo.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 5DFEBAB718592B6D00C75BEB /* WebKitAvailability.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DFEBAB618592B6D00C75BEB /* WebKitAvailability.h */; settings = {ATTRIBUTES = (Private, ); }; };
5FC7DC26CFE2563200B85AE4 /* JSEventTarget.h in Headers */ = {isa = PBXBuildFile; fileRef = 5FC7DC26CFE2563200B85AE5 /* JSEventTarget.h */; };
5FE1D292178FD1F3001AA3C3 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5FE1D291178FD1F3001AA3C3 /* Security.framework */; };
626CDE0E1140424C001E5A68 /* SpatialNavigation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 626CDE0C1140424C001E5A68 /* SpatialNavigation.cpp */; };
5DB1BC6910715A6400EFAA49 /* TransformSourceLibxslt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TransformSourceLibxslt.cpp; sourceTree = "<group>"; };
5F2DBBE7178E332D00141486 /* CertificateInfoMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CertificateInfoMac.mm; sourceTree = "<group>"; };
5F2DBBE8178E336900141486 /* CertificateInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CertificateInfo.h; sourceTree = "<group>"; };
+ 5DFEBAB618592B6D00C75BEB /* WebKitAvailability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebKitAvailability.h; sourceTree = "<group>"; };
5FC7DC26CFE2563200B85AE5 /* JSEventTarget.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSEventTarget.h; sourceTree = "<group>"; };
5FE1D291178FD1F3001AA3C3 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; };
626CDE0C1140424C001E5A68 /* SpatialNavigation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SpatialNavigation.cpp; sourceTree = "<group>"; };
1CF6BE130E9BB4670025E1CD /* ObjCNodeFilterCondition.h */,
1CF6BE120E9BB4670025E1CD /* ObjCNodeFilterCondition.mm */,
1CD0B6200AABDB5000D0A3FF /* PublicDOMInterfaces.h */,
+ 5DFEBAB618592B6D00C75BEB /* WebKitAvailability.h */,
1CAF347E0A6C405200ABE06E /* WebScriptObject.h */,
1CAF347F0A6C405200ABE06E /* WebScriptObject.mm */,
1CAF34800A6C405200ABE06E /* WebScriptObjectPrivate.h */,
1AE2AE5C0A1D26F200B42B25 /* JSHTMLMenuElement.h in Headers */,
A80E7A180A19C3D6007FB8C5 /* JSHTMLMetaElement.h in Headers */,
A7BBE26711AFB3F20005EA03 /* JSHTMLMeterElement.h in Headers */,
+ 5DFEBAB718592B6D00C75BEB /* WebKitAvailability.h in Headers */,
1AE2AB2A0A1CE63B00B42B25 /* JSHTMLModElement.h in Headers */,
BC305C7A0C076BB300CD20F0 /* JSHTMLObjectElement.h in Headers */,
1A85B1EB0A1B240500D8C87C /* JSHTMLOListElement.h in Headers */,
--- /dev/null
+/*
+ * Copyright (C) 2013 Apple Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebKit_WebKitAvailability_h
+#define WebKit_WebKitAvailability_h
+
+#import <TargetConditionals.h>
+
+#if !TARGET_OS_IPHONE
+
+#define WEBKIT_AVAILABLE_MAC(introduced) NS_AVAILABLE_MAC(introduced)
+#define WEBKIT_CLASS_AVAILABLE_MAC(introduced) NS_CLASS_AVAILABLE_MAC(introduced)
+#define WEBKIT_ENUM_AVAILABLE_MAC(introduced) NS_ENUM_AVAILABLE_MAC(introduced)
+#define WEBKIT_DEPRECATED_MAC(introduced, deprecated) NS_DEPRECATED_MAC(introduced, deprecated)
+
+#else
+
+#define WEBKIT_AVAILABLE_MAC(introduced)
+#define WEBKIT_CLASS_AVAILABLE_MAC(introduced)
+#define WEBKIT_ENUM_AVAILABLE_MAC(introduced)
+#define WEBKIT_DEPRECATED_MAC(introduced, deprecated)
+
+#endif /* !TARGET_OS_IPHONE */
+
+#endif /* WebKit_WebKitAvailability_h */
+2014-01-06 Mark Rowe <mrowe@apple.com>
+
+ <https://webkit.org/b/126499> Move WebKit off the legacy WebKit availability macros
+
+ The legacy WebKit availability macros are verbose, confusing, and provide no benefit
+ over using the system availability macros directly. The original vision was that
+ they'd serve a cross-platform purpose but that never came to be.
+
+ Since WebKit1 is API on OS X but SPI on iOS, some indirection is still needed in the
+ availability macros to allow the headers to advertise the API as unavailable on OS X
+ without interfering with the ability to build on iOS. This is achieved by defining
+ WEBKIT-prefixed versions of the Foundation availability macros that are defined to
+ their NS-prefixed equivalents. The installed headers are post-processed to map these
+ macros back to their Foundation equivalents.
+
+ Part of <rdar://problem/15512304>.
+
+ Reviewed by Sam Weinig.
+
+ * WebKit.xcodeproj/project.pbxproj: Change the Postprocess Headers build phase to
+ invoke mac/postprocess-headers.sh.
+
2014-01-05 Martin Robinson <mrobinson@igalia.com>
[GTK] [CMake] Ensure that the autotools build and the CMake install the same files
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "postProcessInDirectory() {\n cd \"$1\"\n\n if [[ ${PLATFORM_NAME} == iphoneos ]]; then\n local unifdefOptions=\"-DTARGET_OS_EMBEDDED=1 -DTARGET_OS_IPHONE=1 -DTARGET_IPHONE_SIMULATOR=0\";\n elif [[ ${PLATFORM_NAME} == iphonesimulator ]]; then\n local unifdefOptions=\"-DTARGET_OS_EMBEDDED=0 -DTARGET_OS_IPHONE=1 -DTARGET_IPHONE_SIMULATOR=1\";\n else\n local unifdefOptions=\"-DTARGET_OS_EMBEDDED=0 -DTARGET_OS_IPHONE=0 -DTARGET_IPHONE_SIMULATOR=0\";\n fi\n\n for header in $(find . -name '*.h' -type f); do\n unifdef -B ${unifdefOptions} -o ${header}.unifdef ${header}\n case $? in\n 0)\n rm ${header}.unifdef\n ;;\n 1)\n mv ${header}{.unifdef,}\n ;;\n *)\n exit 1\n ;;\n esac\n done\n}\n\npostProcessInDirectory \"${TARGET_BUILD_DIR}/${PUBLIC_HEADERS_FOLDER_PATH}\"\npostProcessInDirectory \"${TARGET_BUILD_DIR}/${PRIVATE_HEADERS_FOLDER_PATH}\"";
+ shellScript = "exec ${SRCROOT}/mac/postprocess-headers.sh";
};
A55DEAA516703F9F003DB841 /* Check For Inappropriate Macros in External Headers */ = {
isa = PBXShellScriptBuildPhase;
// These functions are only available for 32-bit.
-#include <JavaScriptCore/WebKitAvailability.h>
+#include <WebKit/WebKitAvailability.h>
#ifdef __OBJC__
#import <ApplicationServices/ApplicationServices.h>
#endif
extern void
-WebInitForCarbon(void) AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0;
+WebInitForCarbon(void) CF_DEPRECATED_MAC(10_3, 10_6);
#ifdef __OBJC__
extern CGImageRef
-WebConvertNSImageToCGImageRef(NSImage * inImage) AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0;
+WebConvertNSImageToCGImageRef(NSImage * inImage) CF_DEPRECATED_MAC(10_3, 10_6);
#endif
#include <Carbon/Carbon.h>
-#include <JavaScriptCore/WebKitAvailability.h>
+#include <WebKit/WebKitAvailability.h>
#if PRAGMA_ONCE
#pragma once
* Non-Carbon CFM: not available
*/
extern OSStatus
-HIWebViewCreate(HIViewRef * outControl) AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0;
+HIWebViewCreate(HIViewRef * outControl) CF_DEPRECATED_MAC(10_3, 10_6, "Use WebView instead.");
#ifdef __OBJC__
* Non-Carbon CFM: not available
*/
extern WebView *
-HIWebViewGetWebView(HIViewRef inView) AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0;
+HIWebViewGetWebView(HIViewRef inView) CF_DEPRECATED_MAC(10_3, 10_6);
#endif
+2014-01-06 Mark Rowe <mrowe@apple.com>
+
+ <https://webkit.org/b/126499> Move WebKit off the legacy WebKit availability macros
+
+ The legacy WebKit availability macros are verbose, confusing, and provide no benefit
+ over using the system availability macros directly. The original vision was that
+ they'd serve a cross-platform purpose but that never came to be.
+
+ Since WebKit1 is API on OS X but SPI on iOS, some indirection is still needed in the
+ availability macros to allow the headers to advertise the API as unavailable on OS X
+ without interfering with the ability to build on iOS. This is achieved by defining
+ WEBKIT-prefixed versions of the Foundation availability macros that are defined to
+ their NS-prefixed equivalents. The installed headers are post-processed to map these
+ macros back to their Foundation equivalents.
+
+ Part of <rdar://problem/15512304>.
+
+ The OS X version used in the new availability macros is based on the mapping in
+ JavaScriptCore/WebKitAvailability.h.
+
+ Reviewed by Sam Weinig.
+
+ * Carbon/CarbonUtils.h:
+ * Carbon/HIWebView.h:
+ * MigrateHeaders.make: Migrate WebKitAvailability.h from WebCore as an API header.
+ * Plugins/WebPlugin.h:
+ * Plugins/WebPluginViewFactory.h:
+ * WebView/WebFrameLoadDelegate.h:
+ * WebView/WebResourceLoadDelegatePrivate.h:
+ * WebView/WebUIDelegate.h:
+ * postprocess-headers.sh: Added. Extracted from the Xcode project. Extended to map the
+ WEBKIT-prefixed macros to their NS-prefixed equivalents on OS X and to remove them on iOS.
+
2014-01-04 Zan Dobersek <zdobersek@igalia.com>
Explicitly use the std:: nested name specifier when using std::pair, std::make_pair
$(PUBLIC_HEADERS_DIR)/DOMXPathExpression.h \
$(PUBLIC_HEADERS_DIR)/DOMXPathNSResolver.h \
$(PUBLIC_HEADERS_DIR)/DOMXPathResult.h \
+ $(PUBLIC_HEADERS_DIR)/WebKitAvailability.h \
$(PUBLIC_HEADERS_DIR)/WebScriptObject.h \
$(PUBLIC_HEADERS_DIR)/npapi.h \
$(PUBLIC_HEADERS_DIR)/npfunctions.h \
*/
#import <Foundation/Foundation.h>
-#import <JavaScriptCore/WebKitAvailability.h>
+#import <WebKit/WebKitAvailability.h>
#if !TARGET_OS_IPHONE
#import <AppKit/AppKit.h>
@discussion This method is only sent to the plug-in if the
WebPlugInShouldLoadMainResourceKey argument passed to the plug-in was NO.
*/
-- (void)webPlugInMainResourceDidReceiveResponse:(NSURLResponse *)response WEBKIT_OBJC_METHOD_ANNOTATION(AVAILABLE_IN_WEBKIT_VERSION_4_0);
+- (void)webPlugInMainResourceDidReceiveResponse:(NSURLResponse *)response WEBKIT_AVAILABLE_MAC(10_6);
/*!
@method webPlugInMainResourceDidReceiveData:
@discussion This method is only sent to the plug-in if the
WebPlugInShouldLoadMainResourceKey argument passed to the plug-in was NO.
*/
-- (void)webPlugInMainResourceDidReceiveData:(NSData *)data WEBKIT_OBJC_METHOD_ANNOTATION(AVAILABLE_IN_WEBKIT_VERSION_4_0);
+- (void)webPlugInMainResourceDidReceiveData:(NSData *)data WEBKIT_AVAILABLE_MAC(10_6);
/*!
@method webPlugInMainResourceDidFailWithError:
@discussion This method is only sent to the plug-in if the
WebPlugInShouldLoadMainResourceKey argument passed to the plug-in was NO.
*/
-- (void)webPlugInMainResourceDidFailWithError:(NSError *)error WEBKIT_OBJC_METHOD_ANNOTATION(AVAILABLE_IN_WEBKIT_VERSION_4_0);
+- (void)webPlugInMainResourceDidFailWithError:(NSError *)error WEBKIT_AVAILABLE_MAC(10_6);
/*!
@method webPlugInMainResourceDidFinishLoading
@discussion This method is only sent to the plug-in if the
WebPlugInShouldLoadMainResourceKey argument passed to the plug-in was NO.
*/
-- (void)webPlugInMainResourceDidFinishLoading WEBKIT_OBJC_METHOD_ANNOTATION(AVAILABLE_IN_WEBKIT_VERSION_4_0);
+- (void)webPlugInMainResourceDidFinishLoading WEBKIT_AVAILABLE_MAC(10_6);
@end
*/
#import <Foundation/Foundation.h>
-#import <JavaScriptCore/WebKitAvailability.h>
+#import <WebKit/WebKitAvailability.h>
#if !TARGET_OS_IPHONE
#import <AppKit/AppKit.h>
For compatibility with older versions of WebKit, the plug-in should assume that the value for
WebPlugInShouldLoadMainResourceKey is NO if it is absent from the arguments dictionary.
*/
-extern NSString *WebPlugInShouldLoadMainResourceKey AVAILABLE_IN_WEBKIT_VERSION_4_0;
+extern NSString *WebPlugInShouldLoadMainResourceKey WEBKIT_AVAILABLE_MAC(10_6);
/*!
@protocol WebPlugInViewFactory
#import <Foundation/Foundation.h>
#import <JavaScriptCore/JSBase.h>
-#import <JavaScriptCore/WebKitAvailability.h>
+#import <WebKit/WebKitAvailability.h>
#if !TARGET_OS_IPHONE
#import <AppKit/AppKit.h>
@discussion This method is deprecated. Consider using webView:didClearWindowObject:forFrame:
instead.
*/
-- (void)webView:(WebView *)webView windowScriptObjectAvailable:(WebScriptObject *)windowScriptObject WEBKIT_OBJC_METHOD_ANNOTATION(AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0);
+- (void)webView:(WebView *)webView windowScriptObjectAvailable:(WebScriptObject *)windowScriptObject WEBKIT_DEPRECATED_MAC(10_4, 10_5);
#if JSC_OBJC_API_ENABLED
/*!
- (void)webView:(WebView *)webView didLoadResourceFromMemoryCache:(NSURLRequest *)request response:(NSURLResponse *)response length:(NSInteger)length fromDataSource:(WebDataSource *)dataSource;
- (BOOL)webView:(WebView *)webView resource:(id)identifier shouldUseCredentialStorageForDataSource:(WebDataSource *)dataSource;
-#if WEBKIT_VERSION_MAX_ALLOWED > WEBKIT_VERSION_4_0
/*!
@method webView:resource:canAuthenticateAgainstProtectionSpace:forDataSource:
@abstract Inspect an NSURLProtectionSpace before an authentication attempt is made. Only used on Snow Leopard or newer.
@param protectionSpace an NSURLProtectionSpace that will be used to generate an authentication challenge
@result Return YES if the resource load delegate is prepared to respond to an authentication challenge generated with protectionSpace, NO otherwise
*/
-- (BOOL)webView:(WebView *)sender resource:(id)identifier canAuthenticateAgainstProtectionSpace:(NSURLProtectionSpace *)protectionSpace forDataSource:(WebDataSource *)dataSource;
-#endif
+- (BOOL)webView:(WebView *)sender resource:(id)identifier canAuthenticateAgainstProtectionSpace:(NSURLProtectionSpace *)protectionSpace forDataSource:(WebDataSource *)dataSource WEBKIT_AVAILABLE_MAC(10_6);
/*!
@method webView:shouldPaintBrokenImageForURL:(NSURL*)imageURL
#import <Foundation/Foundation.h>
#import <Foundation/NSURLRequest.h>
-#import <JavaScriptCore/WebKitAvailability.h>
+#import <WebKit/WebKitAvailability.h>
#if !TARGET_OS_IPHONE
#import <AppKit/AppKit.h>
@abstract Call this method to return an array of filenames from the file open panel.
@param fileNames
*/
-- (void)chooseFilenames:(NSArray *)fileNames WEBKIT_OBJC_METHOD_ANNOTATION(AVAILABLE_IN_WEBKIT_VERSION_4_0);
+- (void)chooseFilenames:(NSArray *)fileNames WEBKIT_AVAILABLE_MAC(10_6);
/*!
@method cancel
@discussion This method is passed a callback object instead of giving a return
value so that it can be handled with a sheet.
*/
-- (void)webView:(WebView *)sender runOpenPanelForFileButtonWithResultListener:(id<WebOpenPanelResultListener>)resultListener allowMultipleFiles:(BOOL)allowMultipleFiles WEBKIT_OBJC_METHOD_ANNOTATION(AVAILABLE_IN_WEBKIT_VERSION_4_0);
+- (void)webView:(WebView *)sender runOpenPanelForFileButtonWithResultListener:(id<WebOpenPanelResultListener>)resultListener allowMultipleFiles:(BOOL)allowMultipleFiles WEBKIT_AVAILABLE_MAC(10_6);
/*!
@method webView:mouseDidMoveOverElement:modifierFlags:
// The following delegate methods are deprecated in favor of the ones above that specify
// the WebFrame whose JavaScript initiated this call.
-- (void)webView:(WebView *)sender runJavaScriptAlertPanelWithMessage:(NSString *)message WEBKIT_OBJC_METHOD_ANNOTATION(AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0);
-- (BOOL)webView:(WebView *)sender runJavaScriptConfirmPanelWithMessage:(NSString *)message WEBKIT_OBJC_METHOD_ANNOTATION(AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0);
-- (NSString *)webView:(WebView *)sender runJavaScriptTextInputPanelWithPrompt:(NSString *)prompt defaultText:(NSString *)defaultText WEBKIT_OBJC_METHOD_ANNOTATION(AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0);
+- (void)webView:(WebView *)sender runJavaScriptAlertPanelWithMessage:(NSString *)message WEBKIT_DEPRECATED_MAC(10_3, 10_5);
+- (BOOL)webView:(WebView *)sender runJavaScriptConfirmPanelWithMessage:(NSString *)message WEBKIT_DEPRECATED_MAC(10_3, 10_5);
+- (NSString *)webView:(WebView *)sender runJavaScriptTextInputPanelWithPrompt:(NSString *)prompt defaultText:(NSString *)defaultText WEBKIT_DEPRECATED_MAC(10_3, 10_5);
// The following delegate methods are deprecated. Content rect calculations are now done automatically.
-- (void)webView:(WebView *)sender setContentRect:(NSRect)frame WEBKIT_OBJC_METHOD_ANNOTATION(AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0);
-- (NSRect)webViewContentRect:(WebView *)sender WEBKIT_OBJC_METHOD_ANNOTATION(AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0);
+- (void)webView:(WebView *)sender setContentRect:(NSRect)frame WEBKIT_DEPRECATED_MAC(10_3, 10_5);
+- (NSRect)webViewContentRect:(WebView *)sender WEBKIT_DEPRECATED_MAC(10_3, 10_5);
@end
--- /dev/null
+#!/bin/sh
+
+postProcessInDirectory()
+{
+ cd "$1"
+
+ local unifdefOptions sedExpression
+
+ if [[ ${PLATFORM_NAME} == iphoneos ]]; then
+ unifdefOptions="-DTARGET_OS_EMBEDDED=1 -DTARGET_OS_IPHONE=1 -DTARGET_IPHONE_SIMULATOR=0";
+ elif [[ ${PLATFORM_NAME} == iphonesimulator ]]; then
+ unifdefOptions="-DTARGET_OS_EMBEDDED=0 -DTARGET_OS_IPHONE=1 -DTARGET_IPHONE_SIMULATOR=1";
+ else
+ unifdefOptions="-DTARGET_OS_EMBEDDED=0 -DTARGET_OS_IPHONE=0 -DTARGET_IPHONE_SIMULATOR=0";
+ fi
+
+ if [[ ${PLATFORM_NAME} == iphone* ]]; then
+ sedExpression='s/ *WEBKIT_((CLASS_|ENUM_)?AVAILABLE|DEPRECATED)_MAC\([^)]+\)//g';
+ else
+ sedExpression='s/WEBKIT_((CLASS_|ENUM_)?AVAILABLE|DEPRECATED)/NS_\1/g';
+ fi
+
+ for header in $(find . -name '*.h' -type f); do
+ unifdef -B ${unifdefOptions} -o ${header}.unifdef ${header}
+ case $? in
+ 0)
+ rm ${header}.unifdef
+ ;;
+ 1)
+ mv ${header}{.unifdef,}
+ ;;
+ *)
+ exit 1
+ ;;
+ esac
+
+ if [[ ${header} == "./WebKitAvailability.h" ]]; then
+ continue
+ fi
+
+ sed -E -e "${sedExpression}" < ${header} > ${header}.sed
+ if cmp ${header} ${header}.sed; then
+ rm ${header}.sed
+ else
+ mv ${header}.sed ${header}
+ fi
+ done
+}
+
+postProcessInDirectory "${TARGET_BUILD_DIR}/${PUBLIC_HEADERS_FOLDER_PATH}"
+postProcessInDirectory "${TARGET_BUILD_DIR}/${PRIVATE_HEADERS_FOLDER_PATH}"