Update availability macros
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 10 May 2014 01:49:25 +0000 (01:49 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 10 May 2014 01:49:25 +0000 (01:49 +0000)
https://bugs.webkit.org/show_bug.cgi?id=132763
<rdar://problem/15311800>

Reviewed by Dan Bernstein.

* Configurations/WebKit.xcconfig:
* Shared/API/Cocoa/WKBrowsingContextHandle.h:
* Shared/API/Cocoa/WKFoundation.h:
* Shared/API/Cocoa/_WKFrameHandle.h:
* Shared/API/Cocoa/_WKRemoteObjectInterface.h:
* Shared/API/Cocoa/_WKRemoteObjectRegistry.h:
* UIProcess/API/Cocoa/WKBackForwardList.h:
* UIProcess/API/Cocoa/WKBackForwardListItem.h:
* UIProcess/API/Cocoa/WKBackForwardListPrivate.h:
* UIProcess/API/Cocoa/WKBrowsingContextController.h:
* UIProcess/API/Cocoa/WKBrowsingContextGroup.h:
* UIProcess/API/Cocoa/WKConnection.h:
* UIProcess/API/Cocoa/WKFrameInfo.h:
* UIProcess/API/Cocoa/WKNavigation.h:
* UIProcess/API/Cocoa/WKNavigationAction.h:
(NS_ENUM):
* UIProcess/API/Cocoa/WKNavigationData.h:
* UIProcess/API/Cocoa/WKNavigationDelegate.h:
(NS_ENUM):
* UIProcess/API/Cocoa/WKNavigationResponse.h:
* UIProcess/API/Cocoa/WKPreferences.h:
* UIProcess/API/Cocoa/WKProcessGroup.h:
* UIProcess/API/Cocoa/WKProcessPool.h:
* UIProcess/API/Cocoa/WKScriptMessage.h:
* UIProcess/API/Cocoa/WKScriptMessageHandler.h:
* UIProcess/API/Cocoa/WKTypeRefWrapper.h:
* UIProcess/API/Cocoa/WKUIDelegate.h:
* UIProcess/API/Cocoa/WKUserContentController.h:
* UIProcess/API/Cocoa/WKWebView.h:
* UIProcess/API/Cocoa/WKWebViewConfiguration.h:
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
(NS_OPTIONS):
(NS_ENUM):
* UIProcess/API/Cocoa/WKWindowFeatures.h:
* UIProcess/API/Cocoa/_WKActivatedElementInfo.h:
(NS_ENUM):
* UIProcess/API/Cocoa/_WKDownload.h:
* UIProcess/API/Cocoa/_WKElementAction.h:
(NS_ENUM):
* UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
* UIProcess/API/Cocoa/_WKScriptWorld.h:
* UIProcess/API/Cocoa/_WKThumbnailView.h:
* UIProcess/API/Cocoa/_WKVisitedLinkProvider.h:
* UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.h:
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInHitTestResult.h:
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.h:
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInPageGroup.h:
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInScriptWorld.h:
* WebProcess/InjectedBundle/API/mac/WKDOMDocument.h:
* WebProcess/InjectedBundle/API/mac/WKDOMElement.h:
* WebProcess/InjectedBundle/API/mac/WKDOMNode.h:
* WebProcess/InjectedBundle/API/mac/WKDOMRange.h:
* WebProcess/InjectedBundle/API/mac/WKDOMText.h:
* WebProcess/InjectedBundle/API/mac/WKDOMTextIterator.h:
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.h:
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.h:
* mac/rewrite-availability-macros.sh: Added.

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

55 files changed:
Source/WebKit2/ChangeLog
Source/WebKit2/Configurations/WebKit.xcconfig
Source/WebKit2/Configurations/WebKit2.xcconfig
Source/WebKit2/Shared/API/Cocoa/WKBrowsingContextHandle.h
Source/WebKit2/Shared/API/Cocoa/WKFoundation.h
Source/WebKit2/Shared/API/Cocoa/_WKFrameHandle.h
Source/WebKit2/Shared/API/Cocoa/_WKRemoteObjectInterface.h
Source/WebKit2/Shared/API/Cocoa/_WKRemoteObjectRegistry.h
Source/WebKit2/UIProcess/API/Cocoa/WKBackForwardList.h
Source/WebKit2/UIProcess/API/Cocoa/WKBackForwardListItem.h
Source/WebKit2/UIProcess/API/Cocoa/WKBackForwardListPrivate.h
Source/WebKit2/UIProcess/API/Cocoa/WKBrowsingContextController.h
Source/WebKit2/UIProcess/API/Cocoa/WKBrowsingContextGroup.h
Source/WebKit2/UIProcess/API/Cocoa/WKConnection.h
Source/WebKit2/UIProcess/API/Cocoa/WKFrameInfo.h
Source/WebKit2/UIProcess/API/Cocoa/WKNavigation.h
Source/WebKit2/UIProcess/API/Cocoa/WKNavigationAction.h
Source/WebKit2/UIProcess/API/Cocoa/WKNavigationData.h
Source/WebKit2/UIProcess/API/Cocoa/WKNavigationDelegate.h
Source/WebKit2/UIProcess/API/Cocoa/WKNavigationResponse.h
Source/WebKit2/UIProcess/API/Cocoa/WKPreferences.h
Source/WebKit2/UIProcess/API/Cocoa/WKProcessGroup.h
Source/WebKit2/UIProcess/API/Cocoa/WKProcessPool.h
Source/WebKit2/UIProcess/API/Cocoa/WKScriptMessage.h
Source/WebKit2/UIProcess/API/Cocoa/WKScriptMessageHandler.h
Source/WebKit2/UIProcess/API/Cocoa/WKTypeRefWrapper.h
Source/WebKit2/UIProcess/API/Cocoa/WKUIDelegate.h
Source/WebKit2/UIProcess/API/Cocoa/WKUserContentController.h
Source/WebKit2/UIProcess/API/Cocoa/WKWebView.h
Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.h
Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h
Source/WebKit2/UIProcess/API/Cocoa/WKWindowFeatures.h
Source/WebKit2/UIProcess/API/Cocoa/_WKActivatedElementInfo.h
Source/WebKit2/UIProcess/API/Cocoa/_WKDownload.h
Source/WebKit2/UIProcess/API/Cocoa/_WKElementAction.h
Source/WebKit2/UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h
Source/WebKit2/UIProcess/API/Cocoa/_WKScriptWorld.h
Source/WebKit2/UIProcess/API/Cocoa/_WKThumbnailView.h
Source/WebKit2/UIProcess/API/Cocoa/_WKVisitedLinkProvider.h
Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataStore.h
Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
Source/WebKit2/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.h
Source/WebKit2/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInHitTestResult.h
Source/WebKit2/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.h
Source/WebKit2/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInPageGroup.h
Source/WebKit2/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInScriptWorld.h
Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKDOMDocument.h
Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKDOMElement.h
Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKDOMNode.h
Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKDOMRange.h
Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKDOMText.h
Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKDOMTextIterator.h
Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.h
Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.h
Source/WebKit2/mac/rewrite-availability-macros.sh [new file with mode: 0755]

index f5fce0977d44f201973d3ab407bf2acfb0da1e7a..18b0a62e5d09220d42b9b4e3f4b61e563432025a 100644 (file)
@@ -1,3 +1,71 @@
+2014-05-09  Anders Carlsson  <andersca@apple.com>
+
+        Update availability macros
+        https://bugs.webkit.org/show_bug.cgi?id=132763
+        <rdar://problem/15311800>
+
+        Reviewed by Dan Bernstein.
+
+        * Configurations/WebKit.xcconfig:
+        * Shared/API/Cocoa/WKBrowsingContextHandle.h:
+        * Shared/API/Cocoa/WKFoundation.h:
+        * Shared/API/Cocoa/_WKFrameHandle.h:
+        * Shared/API/Cocoa/_WKRemoteObjectInterface.h:
+        * Shared/API/Cocoa/_WKRemoteObjectRegistry.h:
+        * UIProcess/API/Cocoa/WKBackForwardList.h:
+        * UIProcess/API/Cocoa/WKBackForwardListItem.h:
+        * UIProcess/API/Cocoa/WKBackForwardListPrivate.h:
+        * UIProcess/API/Cocoa/WKBrowsingContextController.h:
+        * UIProcess/API/Cocoa/WKBrowsingContextGroup.h:
+        * UIProcess/API/Cocoa/WKConnection.h:
+        * UIProcess/API/Cocoa/WKFrameInfo.h:
+        * UIProcess/API/Cocoa/WKNavigation.h:
+        * UIProcess/API/Cocoa/WKNavigationAction.h:
+        (NS_ENUM):
+        * UIProcess/API/Cocoa/WKNavigationData.h:
+        * UIProcess/API/Cocoa/WKNavigationDelegate.h:
+        (NS_ENUM):
+        * UIProcess/API/Cocoa/WKNavigationResponse.h:
+        * UIProcess/API/Cocoa/WKPreferences.h:
+        * UIProcess/API/Cocoa/WKProcessGroup.h:
+        * UIProcess/API/Cocoa/WKProcessPool.h:
+        * UIProcess/API/Cocoa/WKScriptMessage.h:
+        * UIProcess/API/Cocoa/WKScriptMessageHandler.h:
+        * UIProcess/API/Cocoa/WKTypeRefWrapper.h:
+        * UIProcess/API/Cocoa/WKUIDelegate.h:
+        * UIProcess/API/Cocoa/WKUserContentController.h:
+        * UIProcess/API/Cocoa/WKWebView.h:
+        * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
+        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
+        (NS_OPTIONS):
+        (NS_ENUM):
+        * UIProcess/API/Cocoa/WKWindowFeatures.h:
+        * UIProcess/API/Cocoa/_WKActivatedElementInfo.h:
+        (NS_ENUM):
+        * UIProcess/API/Cocoa/_WKDownload.h:
+        * UIProcess/API/Cocoa/_WKElementAction.h:
+        (NS_ENUM):
+        * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
+        * UIProcess/API/Cocoa/_WKScriptWorld.h:
+        * UIProcess/API/Cocoa/_WKThumbnailView.h:
+        * UIProcess/API/Cocoa/_WKVisitedLinkProvider.h:
+        * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
+        * WebKit2.xcodeproj/project.pbxproj:
+        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.h:
+        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInHitTestResult.h:
+        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.h:
+        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInPageGroup.h:
+        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInScriptWorld.h:
+        * WebProcess/InjectedBundle/API/mac/WKDOMDocument.h:
+        * WebProcess/InjectedBundle/API/mac/WKDOMElement.h:
+        * WebProcess/InjectedBundle/API/mac/WKDOMNode.h:
+        * WebProcess/InjectedBundle/API/mac/WKDOMRange.h:
+        * WebProcess/InjectedBundle/API/mac/WKDOMText.h:
+        * WebProcess/InjectedBundle/API/mac/WKDOMTextIterator.h:
+        * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.h:
+        * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.h:
+        * mac/rewrite-availability-macros.sh: Added.
+
 2014-05-09  Joseph Pecoraro  <pecoraro@apple.com>
 
         Web Inspector: Allow Remote Inspector to entitlement check UIProcess through WebProcess
index a16a2ee0555438519cd0165e7f89fb842999701a..23aa2b811c774e1698a8a7c48311a8103ef6a04f 100644 (file)
@@ -47,3 +47,11 @@ EXCLUDED_SOURCE_FILE_NAMES_iphoneos = *.pdf com.apple.WebKit.DatabaseProcess.sb
 EXCLUDED_SOURCE_FILE_NAMES_iphonesimulator = $(EXCLUDED_SOURCE_FILE_NAMES_iphoneos);
 
 INSTALLHDRS_SCRIPT_PHASE = YES;
+
+WK_API_AVAILABILITY_ENABLED = $(WK_API_AVAILABILITY_ENABLED_$(PLATFORM_NAME));
+WK_API_AVAILABILITY_ENABLED_iphoneos = YES;
+WK_API_AVAILABILITY_ENABLED_iphonesimulator = YES;
+WK_API_AVAILABILITY_ENABLED_macosx = $(WK_API_AVAILABILITY_ENABLED_macosx_$(MAC_OS_X_VERSION_MAJOR));
+WK_API_AVAILABILITY_ENABLED_macosx_1080 = NO;
+WK_API_AVAILABILITY_ENABLED_macosx_1090 = NO;
+WK_API_AVAILABILITY_ENABLED_macosx_101000 = YES;
index a9b9dcd0f48099ee288afe6d5200dfa3a9fe7fcc..70e7c3fcb0592d1db2d62dc3872f8f9ea3c64f10 100644 (file)
@@ -57,3 +57,5 @@ NORMAL_PRODUCTION_FRAMEWORKS_DIR = $(NORMAL_PRODUCTION_FRAMEWORKS_DIR_$(PLATFORM
 NORMAL_PRODUCTION_FRAMEWORKS_DIR_iphoneos = $(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks;
 NORMAL_PRODUCTION_FRAMEWORKS_DIR_iphonesimulator = $(NORMAL_PRODUCTION_FRAMEWORKS_DIR_iphoneos);
 NORMAL_PRODUCTION_FRAMEWORKS_DIR_macosx = $(NEXT_ROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks;
+
+INSTALLHDRS_SCRIPT_PHASE = YES;
index 852f6784971c5ad4d996b15dcf28f0429ddefa3a..72f4cea386341d5545d8ebde1153eccdccb4b82c 100644 (file)
@@ -27,7 +27,7 @@
 
 #if WK_API_ENABLED
 
-WK_API_CLASS
+WK_CLASS_AVAILABLE(10_10, 8_0)
 @interface WKBrowsingContextHandle : NSObject <NSSecureCoding>
 @end
 
index 1fad23ccf19782f4117429eff05324a6b63aefdb..53ea6edcca6d178a4425d5e4c0263d0f3077f4ea 100644 (file)
 #if !defined(WK_API_ENABLED)
 #if TARGET_OS_IPHONE
 #define WK_API_ENABLED 1
-#define WK_API_CLASS NS_CLASS_AVAILABLE_IOS(7_0)
 #else
 #define WK_API_ENABLED (defined(__clang__) && defined(__APPLE__) && !defined(__i386__))
-#define WK_API_CLASS __attribute__((visibility("default")))
 #endif
 #endif
 
 #define WK_EXTERN extern __attribute__((visibility ("default")))
 #endif
 
+#ifndef WK_API_AVAILABILITY_ENABLED
+#define WK_AVAILABLE(_mac, _ios)
+#define WK_CLASS_AVAILABLE(_mac, _ios) __attribute__((visibility ("default")))
+#define WK_ENUM_AVAILABLE(_mac, _ios)
+#endif
+
 #define WK_DESIGNATED_INITIALIZER
index 36604210b5a3bbfc22a5c84d95588a03e6ac47f9..2be374e5ffac7d8208b4a968bae49c865586762a 100644 (file)
@@ -29,7 +29,7 @@
 
 #import <Foundation/Foundation.h>
 
-WK_API_CLASS
+WK_CLASS_AVAILABLE(10_10, 8_0)
 @interface _WKFrameHandle : NSObject <NSCopying, NSSecureCoding>
 
 @end
index 7a3d072c5c3d97adf19fbf0f8f5816dc15283350..d49dd5ec5246ae2eb4788682f3548322368a462d 100644 (file)
@@ -29,7 +29,7 @@
 
 #import <Foundation/Foundation.h>
 
-WK_API_CLASS
+WK_CLASS_AVAILABLE(10_10, 8_0)
 @interface _WKRemoteObjectInterface : NSObject
 
 + (instancetype)remoteObjectInterfaceWithProtocol:(Protocol *)protocol;
index e0acf04d138744b2871fc19ccfce26f67d3f98d7..0cdd68c5bc278062fd21393911f4b59454c5c279 100644 (file)
@@ -31,7 +31,7 @@
 
 @class _WKRemoteObjectInterface;
 
-WK_API_CLASS
+WK_CLASS_AVAILABLE(10_10, 8_0)
 @interface _WKRemoteObjectRegistry : NSObject
 
 - (void)registerExportedObject:(id)object interface:(_WKRemoteObjectInterface *)interface;
index 5b45521c7860f1c2af60f7273f35511132dc1e49..56cd4dbd9a624258cbcff62059490379b056a20f 100644 (file)
@@ -32,7 +32,7 @@
 /*! @abstract A @link WKWebView @/link's list of previously-visited webpages that can be reached by
  going back or forward.
  */
-WK_API_CLASS
+WK_CLASS_AVAILABLE(10_10, 8_0)
 @interface WKBackForwardList : NSObject
 
 /*! @abstract The current item.
@@ -65,4 +65,4 @@ WK_API_CLASS
 
 @end
 
-#endif // WK_API_ENABLED
+#endif
index 9ed3a68c2369dee6a6d5bd9df1e19a9cccccefc5..84a43c1c0ffd99d57e6c5edd550b8beb543267a7 100644 (file)
@@ -31,7 +31,7 @@
 
 /*! A @link WKBackForwardListItem @/link represents a visited page in a WKWebView's back-forward list.
  */
-WK_API_CLASS
+WK_CLASS_AVAILABLE(10_10, 8_0)
 @interface WKBackForwardListItem : NSObject
 
 /*! @abstract The URL of the page represented by this item.
@@ -48,4 +48,4 @@ WK_API_CLASS
 
 @end
 
-#endif // WK_API_ENABLED
+#endif
index 538d7abeb2dbacaae7881dda0f4f57037c57c538..28e8727608c60d6328668a7400bc02b5b0379b1a 100644 (file)
@@ -27,6 +27,6 @@
 
 #if WK_API_ENABLED
 
-WK_EXTERN NSString * const _WKBackForwardListDidChangeNotification;
+WK_EXTERN NSString * const _WKBackForwardListDidChangeNotification WK_AVAILABLE(10_0, 8_0);
 
 #endif
index 503cff20f1afba7039451edc3546bc22133c1a9e..636cedd385bddf238b6e14e10293a1b297d41f69 100644 (file)
@@ -37,7 +37,7 @@
 @protocol WKBrowsingContextLoadDelegate;
 @protocol WKBrowsingContextPolicyDelegate;
 
-WK_API_CLASS
+WK_CLASS_AVAILABLE(10_10, 8_0)
 @interface WKBrowsingContextController : NSObject
 
 #pragma mark Delegates
index 54f34e2d9e06362c4612635a79e80d4e9a24e338..59ddeb69be1aa9b0ae21dee7b8913cf4e04c726e 100644 (file)
@@ -30,7 +30,7 @@
 #import <Foundation/Foundation.h>
 #import <WebKit/WKUserScriptInjectionTime.h>
 
-WK_API_CLASS
+WK_CLASS_AVAILABLE(10_10, 8_0)
 @interface WKBrowsingContextGroup : NSObject
 
 - (id)initWithIdentifier:(NSString *)identifier;
index c899a0c8948c1dbe4e44147a48cbb3a0d6fc1ad0..bbf7d304e7361631ac8a745045b59996d2e5fc4b 100644 (file)
@@ -38,7 +38,7 @@
 
 @end
 
-WK_API_CLASS
+WK_CLASS_AVAILABLE(10_10, 8_0)
 @interface WKConnection : NSObject
 
 - (void)sendMessageWithName:(NSString *)messageName body:(id)messageBody;
index 537172e128e044debd7770108cc1b47cd92e57dd..5433b6c6ed07f0dfdb0b8a42c3d71e8930337b10 100644 (file)
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#import <Foundation/Foundation.h>
 #import <WebKit/WKFoundation.h>
 
 #if WK_API_ENABLED
 
+#import <Foundation/Foundation.h>
+
 /*! A @link WKFrameInfo @/link object contains information about a frame on a web page.
  @discussion WKFrameInfo objects are transient data only objects, they can not be used to uniquely 
  identify a frame across multiple delegate method calls.
  */
-WK_API_CLASS
+WK_CLASS_AVAILABLE(10_10, 8_0)
 @interface WKFrameInfo : NSObject
 
 /*! @abstract Whether the frame is the main frame or a subframe.
index bc4e63852beff43302a3d51af1bac489e72f3ff2..979112f65358dd5942e38b7e248965428fbe7eef 100644 (file)
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#import <Foundation/Foundation.h>
 #import <WebKit/WKFoundation.h>
 
 #if WK_API_ENABLED
 
+#import <Foundation/Foundation.h>
+
 /*! WKNavigation objects are returned from  the @link WKWebView @/link load methods and are passed to the 
  @link WKNavigationDelegate @/link methods, and can be used to track page loads from start to finish.
  */
-WK_API_CLASS
+WK_CLASS_AVAILABLE(10_10, 8_0)
 @interface WKNavigation : NSObject
 
 /*! @abstract The initial NSURLRequest used to perform the navigation.
index 3ef70c9f4bd8ac156759ffcb8b662afb438dcda3..d527af860f7a4a422740f36cfa36e03da0ef5c92 100644 (file)
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#import <Foundation/Foundation.h>
 #import <WebKit/WKFoundation.h>
 
 #if WK_API_ENABLED
 
+#import <Foundation/Foundation.h>
+
 @class WKFrameInfo;
 
 /*! @enum WKNavigationType
@@ -46,12 +47,12 @@ typedef NS_ENUM(NSInteger, WKNavigationType) {
     WKNavigationTypeReload,
     WKNavigationTypeFormResubmitted,
     WKNavigationTypeOther = -1,
-};
+} WK_ENUM_AVAILABLE(10_10, 8_0);
 
 
 /*! Contains information about an action that may cause a navigation, used for making policy decisions.
  */
-WK_API_CLASS
+WK_CLASS_AVAILABLE(10_10, 8_0)
 @interface WKNavigationAction : NSObject
 
 /*! @abstract Represents the frame that is requesting the navigation.
index 3744bb4331e9de2d3f07d6a8fd60766179c358ef..c3f757832770366b76037f2032a0e5dd8ac1d869 100644 (file)
@@ -33,7 +33,7 @@
 
 #import <Foundation/Foundation.h>
 
-WK_API_CLASS
+WK_CLASS_AVAILABLE(10_10, 8_0)
 @interface WKNavigationData : NSObject
 
 @property (readonly) NSString *title;
index f28217a174355cb71de4b3808f9b660189fc8257..33abb6f49ce5a830d27f65c41f6ea5c814c033ae 100644 (file)
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#import <Foundation/Foundation.h>
 #import <WebKit/WKFoundation.h>
 
 #if WK_API_ENABLED
 
+#import <Foundation/Foundation.h>
+
 @class WKNavigation;
 @class WKNavigationAction;
 @class WKNavigationResponse;
@@ -41,7 +42,7 @@
 typedef NS_ENUM(NSInteger, WKNavigationActionPolicy) {
     WKNavigationActionPolicyCancel,
     WKNavigationActionPolicyAllow,
-};
+} WK_ENUM_AVAILABLE(10_10, 8_0);
 
 /*! @enum WKNavigationResponsePolicy
  @abstract the policy to pass back to the decision handler in webView:decidePolicyForNavigationResponse:decisionHandler:.
@@ -51,7 +52,7 @@ typedef NS_ENUM(NSInteger, WKNavigationActionPolicy) {
 typedef NS_ENUM(NSInteger, WKNavigationResponsePolicy) {
     WKNavigationResponsePolicyCancel,
     WKNavigationResponsePolicyAllow,
-};
+} WK_ENUM_AVAILABLE(10_10, 8_0);
 
 /*! A class that conforms to WKNavigationDelegate can provide methods for deciding load policy for main frame and subframe loads
  and track load progress for main frame loads.
index aff6aab84ad960e3c0c554d3b1b59fbd53f5aa0b..21335e5b83651215bdaee8f9fb836159d7485c2a 100644 (file)
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#import <Foundation/Foundation.h>
 #import <WebKit/WKFoundation.h>
 
 #if WK_API_ENABLED
 
+#import <Foundation/Foundation.h>
+
 @class WKFrameInfo;
 
 /*! Contains information about a navigation response, used for making policy decisions.
  */
-WK_API_CLASS
+WK_CLASS_AVAILABLE(10_10, 8_0)
 @interface WKNavigationResponse : NSObject
 
 /*! @abstract Represents the frame that is being navigated.
index b19b048436294d103f55ada549eb65b16f9b7746..229c6b58ad2a7bd0872bccd8a38ae4a02ae2d350 100644 (file)
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#import <CoreGraphics/CoreGraphics.h>
-#import <Foundation/Foundation.h>
 #import <WebKit/WKFoundation.h>
 
 #if WK_API_ENABLED
 
+#import <CoreGraphics/CoreGraphics.h>
+#import <Foundation/Foundation.h>
+
 /*! WKPreferences encapsulates the preferences you can change for one or more WKWebViews. 
  A @link WKWebView @/link can specify which WKPreferences object it uses through its @link WKWebViewConfiguration @/link.
  */
-WK_API_CLASS
+WK_CLASS_AVAILABLE(10_10, 8_0)
 @interface WKPreferences : NSObject
 
 /*! @abstract Returns an initialized WKPreferences object.
@@ -89,4 +90,4 @@ WK_API_CLASS
 
 @end
 
-#endif // WK_API_ENABLED
+#endif
index 86a346052d8d764766c256aab07808239506bbc6..dce8086eb82d524f8462f77010979afe7cd807bb 100644 (file)
@@ -43,7 +43,7 @@
 
 @end
 
-WK_API_CLASS
+WK_CLASS_AVAILABLE(10_10, 8_0)
 @interface WKProcessGroup : NSObject
 
 - (id)initWithInjectedBundleURL:(NSURL *)bundleURL;
index 6ff5a5bb7666e4d5ffae91076b825ccc121bb392..d08de03812760ff39b400cc7b810e98246027c19 100644 (file)
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#import <Foundation/Foundation.h>
 #import <WebKit/WKFoundation.h>
 
 #if WK_API_ENABLED
 
+#import <Foundation/Foundation.h>
+
 /*! A pool of Web Content processes.
  A @link WKWebView @/link specifies from which pool the Web Content process backing it comes through its @link WKWebViewConfiguration @/link.
  Each WKWebView will get its own Web Content process until an implementation-defined process limit is reached; after that,
  web views with the same process pool end up sharing Web Content processes.
  */
-WK_API_CLASS
+WK_CLASS_AVAILABLE(10_10, 8_0)
 @interface WKProcessPool : NSObject
 @end
 
index f8639ed2600bffd6f92f460d681b5e8a3f60d1ae..15adce8e5db7aa5fec7ac23e9c8126a16eceea42 100644 (file)
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#import <Foundation/Foundation.h>
 #import <WebKit/WKFoundation.h>
 
 #if WK_API_ENABLED
 
+#import <Foundation/Foundation.h>
+
 @class WKWebView;
 
 /*! A @link WKScriptMessage @/link object contains information about a message being sent from a web page.
  */
-WK_API_CLASS
+WK_CLASS_AVAILABLE(10_10, 8_0)
 @interface WKScriptMessage : NSObject
 
 /*! @abstract The body of the message. Allowed types are NSDictionary, NSArray, NSNumber, NSNull, NSString, and NSDate. */
@@ -47,4 +48,3 @@ WK_API_CLASS
 @end
 
 #endif
-
index 664c4af077ebfb0e8b366771686b7d069189dba0..e8df20970f163a1f54af8e68a1b2ca4e51d4221c 100644 (file)
@@ -30,7 +30,7 @@
 #import <Foundation/Foundation.h>
 #import <WebKit/WKBase.h>
 
-WK_API_CLASS
+WK_CLASS_AVAILABLE(10_10, 8_0)
 @interface WKTypeRefWrapper : NSObject
 
 - (id)initWithObject:(WKTypeRef)object;
index 4d3038891d5b9e8a09d6eb2260f63232d6502afc..9e67a14a1aa7b05d7a6e36649ab26c8013050513 100644 (file)
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#import <Foundation/Foundation.h>
 #import <WebKit/WKFoundation.h>
 
 #if WK_API_ENABLED
 
+#import <Foundation/Foundation.h>
+
 @class WKFrameInfo;
 @class WKWebViewConfiguration;
 @class WKWindowFeatures;
@@ -82,4 +83,4 @@
 
 @end
 
-#endif // WK_API_ENABLED
+#endif
index 6b8ce3de2bd1481e69b59525f54a3bf44f280e1f..3dd68dfedc2aa54ec4fd9232bcf16301a74a068f 100644 (file)
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#import <Foundation/Foundation.h>
 #import <WebKit/WKFoundation.h>
 
 #if WK_API_ENABLED
 
+#import <Foundation/Foundation.h>
+
 @protocol WKScriptMessageHandler;
 
 /*! WKUserContentController provides a way for JavaScript to post messages to the @link WKWebView @/link.
  A @link WKWebView @/link can specify which WKUserContentController object it uses through its @link WKWebViewConfiguration @/link.
  */
-WK_API_CLASS
+WK_CLASS_AVAILABLE(10_10, 8_0)
 @interface WKUserContentController : NSObject
 
 /*! @abstract Adds a script message handler.
@@ -51,5 +52,3 @@ WK_API_CLASS
 @end
 
 #endif
-
-
index fccf20d9e9e5ce5444f31b9b9c861afade5945c6..b65176cf95d38bd4864faba886c0286e90dbbfc0 100644 (file)
@@ -23,7 +23,6 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#import <Foundation/Foundation.h>
 #import <WebKit/WKFoundation.h>
 
 #if WK_API_ENABLED
  Used to configure @link WKWebView @/link instances.
  */
 #if TARGET_OS_IPHONE
-WK_API_CLASS
+WK_CLASS_AVAILABLE(10_10, 8_0)
 @interface WKWebView : UIView
 #else
-WK_API_CLASS
+WK_CLASS_AVAILABLE(10_10, 8_0)
 @interface WKWebView : NSView
 #endif
 
index 357da8f7683ef0c3b7e03472e3b2d2c3707dbde0..63c1e218ddf769450a8c126d5c6031b7da71e7fc 100644 (file)
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#import <Foundation/Foundation.h>
 #import <WebKit/WKFoundation.h>
 
 #if WK_API_ENABLED
 
+#import <Foundation/Foundation.h>
+
 @class WKPreferences;
 @class WKProcessPool;
 @class WKUserContentController;
@@ -36,7 +37,7 @@
  view.
  @helps Contains properties used to configure a @link WKWebView @/link.
  */
-WK_API_CLASS
+WK_CLASS_AVAILABLE(10_10, 8_0)
 @interface WKWebViewConfiguration : NSObject <NSCopying>
 
 /*! @abstract The process pool from which the Web Content process for the view should come.
index 8b6c2a829d3c9dcda0ed1096f3531c2e6376c27a..e55be28025514ae3a3a9249769dc16ac35c6a3b9 100644 (file)
@@ -30,7 +30,7 @@
 typedef NS_OPTIONS(NSUInteger, _WKRenderingProgressEvents) {
     _WKRenderingProgressEventFirstLayout = 1 << 0,
     _WKRenderingProgressEventFirstPaintWithSignificantArea = 1 << 2,
-};
+} WK_ENUM_AVAILABLE(10_10, 8_0);
 
 typedef NS_ENUM(NSInteger, _WKPaginationMode) {
     _WKPaginationModeUnpaginated,
@@ -38,7 +38,7 @@ typedef NS_ENUM(NSInteger, _WKPaginationMode) {
     _WKPaginationModeRightToLeft,
     _WKPaginationModeTopToBottom,
     _WKPaginationModeBottomToTop,
-};
+} WK_ENUM_AVAILABLE(10_10, 8_0);
 
 typedef NS_OPTIONS(NSUInteger, _WKFindOptions) {
     _WKFindOptionsCaseInsensitive = 1 << 0,
@@ -50,7 +50,7 @@ typedef NS_OPTIONS(NSUInteger, _WKFindOptions) {
     _WKFindOptionsShowFindIndicator = 1 << 6,
     _WKFindOptionsShowHighlight = 1 << 7,
     _WKFindOptionsDetermineMatchIndex = 1 << 8,
-};
+} WK_ENUM_AVAILABLE(10_10, 8_0);
 
 @class WKBrowsingContextHandle;
 @class _WKRemoteObjectRegistry;
index b35804e3bfddae11f81b07dff176bd59dd88743a..6debb1304ce90a7ebfc4b4a1ecd8b050bfb3c980 100644 (file)
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#import <Foundation/Foundation.h>
 #import <WebKit/WKFoundation.h>
 
 #if WK_API_ENABLED
 
+#import <Foundation/Foundation.h>
+
 /*! WKWindowFeatures specifies optional attributes for the containing window when a new WKWebView is requested.
  */
-WK_API_CLASS
+WK_CLASS_AVAILABLE(10_10, 8_0)
 @interface WKWindowFeatures : NSObject
 
 /*! @abstract BOOL. Whether the menu bar should be visible. nil if menu bar visibility was not specified.
index aab116e1546bc5cf132c27458f936bc7610cf7db..3ef38fd6d8f5aaa78d39b691f1e2e6f786322fe3 100644 (file)
@@ -32,9 +32,9 @@
 typedef NS_ENUM(NSInteger, _WKActivatedElementType) {
     _WKActivatedElementTypeLink,
     _WKActivatedElementTypeImage,
-};
+} WK_ENUM_AVAILABLE(10_10, 8_0);
 
-WK_API_CLASS
+WK_CLASS_AVAILABLE(10_10, 8_0)
 @interface _WKActivatedElementInfo : NSObject
 
 @property (nonatomic, readonly) NSURL *URL;
index fbecadb98461eaed4395ca8b8a7278c6bc2feaa1..e94cf6b2d19b631572659b50be17b5de4523170c 100644 (file)
@@ -31,7 +31,7 @@
 
 @class WKWebView;
 
-WK_API_CLASS
+WK_CLASS_AVAILABLE(10_10, 8_0)
 @interface _WKDownload : NSObject
 
 - (void)cancel;
index b8bd02b3702bdf787a1300a4c98fa220dc9a5924..7e3a35dcbbf7493c9d43e202f6a062cb70427543 100644 (file)
@@ -39,9 +39,9 @@ typedef NS_ENUM(NSInteger, _WKElementActionType) {
     _WKElementActionTypeCopy,
     _WKElementActionTypeSaveImage,
     _WKElementActionTypeAddToReadingList,
-};
+} WK_ENUM_AVAILABLE(10_10, 8_0);
 
-WK_API_CLASS
+WK_CLASS_AVAILABLE(10_10, 8_0)
 @interface _WKElementAction : NSObject
 
 + (instancetype)elementActionWithType:(_WKElementActionType)type;
index 3c262057dda685c773d90324b7057679d0ebf17f..cffa07549210fa8b7aca5cf03a88402bab045a3f 100644 (file)
@@ -28,7 +28,7 @@
 
 #if WK_API_ENABLED
 
-WK_API_CLASS
+WK_CLASS_AVAILABLE(10_10, 8_0)
 @interface _WKProcessPoolConfiguration : NSObject <NSCopying>
 
 @property (nonatomic, copy) NSURL *injectedBundleURL;
index 39ab2940f8ba760c92d3dcdf1f108a7c5b57cd5c..28427037c39a1b2834d919611cc2ddca91d9c658 100644 (file)
@@ -28,7 +28,7 @@
 
 #if WK_API_ENABLED
 
-WK_API_CLASS
+WK_CLASS_AVAILABLE(10_10, 8_0)
 @interface _WKScriptWorld : NSObject
 
 + (instancetype)defaultWorld;
index 7d9f7c67c9c54efc237965ea34b696386635b029..48895941fa694b31d14a4c38a97f19ba72ea36b5 100644 (file)
@@ -33,7 +33,7 @@
 
 @class WKView;
 
-WK_API_CLASS
+WK_CLASS_AVAILABLE(10_10, 8_0)
 @interface _WKThumbnailView : NSView
 
 - (instancetype)initWithFrame:(NSRect)frame fromWKView:(WKView *)wkView;
index ce3ccc30fdb2b3bf87681f0d60c57221302f49e8..b5a3d4b78be98d07fe4355415104c93b52a923cb 100644 (file)
@@ -28,7 +28,7 @@
 
 #if WK_API_ENABLED
 
-WK_API_CLASS
+WK_CLASS_AVAILABLE(10_10, 8_0)
 @interface _WKVisitedLinkProvider : NSObject
 
 - (void)addVisitedLinkWithURL:(NSURL *)URL;
index cdcf28a5638663178d511640eab0dbe8aa5b731f..49edcb8a510840050d7d90645d5d8f412dd969a0 100644 (file)
@@ -29,7 +29,7 @@
 
 #import <Foundation/Foundation.h>
 
-WK_API_CLASS
+WK_CLASS_AVAILABLE(10_10, 8_0)
 @interface _WKWebsiteDataStore : NSObject
 
 // Returns the shared default data store.
index 02ded464211614ef28710ff65fa8eba3a7e5a101..b9fcf8e4aa08a10ccd1054425e7414c037af1fa1 100644 (file)
                1A1B0EB418A424950038481A /* WKNavigationResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKNavigationResponse.h; sourceTree = "<group>"; };
                1A1B0EB718A424CD0038481A /* WKNavigationResponseInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKNavigationResponseInternal.h; sourceTree = "<group>"; };
                1A1C648611F415B700553C19 /* WebContextMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebContextMac.mm; sourceTree = "<group>"; };
+               1A1D2116191D995C0001619F /* rewrite-availability-macros.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; name = "rewrite-availability-macros.sh"; path = "mac/rewrite-availability-macros.sh"; sourceTree = "<group>"; };
+               1A1D2117191D996C0001619F /* MigrateHeadersFromWebKitLegacy.make */ = {isa = PBXFileReference; lastKnownFileType = text; name = MigrateHeadersFromWebKitLegacy.make; path = mac/MigrateHeadersFromWebKitLegacy.make; sourceTree = "<group>"; };
                1A1D8B9F1731A36300141DA4 /* LocalStorageDatabase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LocalStorageDatabase.cpp; sourceTree = "<group>"; };
                1A1D8BA01731A36300141DA4 /* LocalStorageDatabase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LocalStorageDatabase.h; sourceTree = "<group>"; };
                1A1E093118861D3800D2DC49 /* WebProgressTrackerClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebProgressTrackerClient.cpp; sourceTree = "<group>"; };
                                B396EA5512E0ED2D00F4FEB7 /* config.h */,
                                32DBCF5E0370ADEE00C91783 /* WebKit2Prefix.h */,
                                C0CE72DB1247E8F700BC0EC4 /* DerivedSources.make */,
+                               1A1D2117191D996C0001619F /* MigrateHeadersFromWebKitLegacy.make */,
+                               1A1D2116191D995C0001619F /* rewrite-availability-macros.sh */,
                                BC2E6E74114196F000A63B1E /* Platform */,
                                1AADDF4B10D82AF000D3D63D /* Shared */,
                                BC032DC310F438260058C15A /* UIProcess */,
                                1ADAE12F1919A90C00F48E21 /* Update Info.plist with version information */,
                                1A07D2F51919AA8A00ECDA16 /* Make Frameworks Symbolic Link */,
                                8DC2EF500486A6940098B216 /* Headers */,
-                               375A248817E5048E00C9A086 /* Postprocess WKBase.h */,
                                1A6280C81919956B006AD9F9 /* Migrate WebKitLegacy Headers */,
+                               375A248817E5048E00C9A086 /* Postprocess WKBase.h */,
+                               1AD98ECF191D867300CAA6DF /* Postprocess WKFoundation.h */,
+                               1A1D2115191D96380001619F /* Rewrite Availability Macros in Framework Headers */,
                                8DC2EF520486A6940098B216 /* Resources */,
                                7CB16FEE1724BA05007A0A95 /* Copy Plug-in Sandbox Profiles */,
                                5D1A239215E760590023E981 /* Remove Compiled Python Files */,
                        shellPath = /bin/sh;
                        shellScript = "if [[ ${PLATFORM_NAME} == \"iphoneos\" || ${PLATFORM_NAME} == \"iphonesimulator\" ]]; then\nif [[ ! -d \"${INSTALL_DIR}/../PrivateFrameworks\" ]]; then\nmkdir -p \"${INSTALL_DIR}/../PrivateFrameworks\"\nfi\nif [[ -d \"${INSTALL_DIR}/../PrivateFrameworks/WebKit.framework\" && ! -L \"${INSTALL_DIR}/../PrivateFrameworks/WebKit.framework\" ]]; then\necho \"ERROR: Cannot create symlink. ${INSTALL_DIR}/../PrivateFrameworks/WebKit.framework already exists and is a directory.\"\nexit 1\nfi\n# If the symlink already exists, remove it and create the new one in its place.\nln -s -h -f ../Frameworks/WebKit.framework ${INSTALL_DIR}/../PrivateFrameworks/WebKit.framework\nfi";
                };
+               1A1D2115191D96380001619F /* Rewrite Availability Macros in Framework Headers */ = {
+                       isa = PBXShellScriptBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       inputPaths = (
+                       );
+                       name = "Rewrite Availability Macros in Framework Headers";
+                       outputPaths = (
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+                       shellPath = /bin/sh;
+                       shellScript = "if [ \"${ACTION}\" = \"build\" -o \"${ACTION}\" = \"install\" -o \"${ACTION}\" = \"installhdrs\" ]; then\n    exec ${SRCROOT}/mac/rewrite-availability-macros.sh\nfi";
+               };
                1A6280C81919956B006AD9F9 /* Migrate WebKitLegacy Headers */ = {
                        isa = PBXShellScriptBuildPhase;
                        buildActionMask = 2147483647;
                        shellPath = /bin/sh;
                        shellScript = "if [ \"${ACTION}\" = \"build\" -o \"${ACTION}\" = \"install\" -o \"${ACTION}\" = \"installhdrs\" ]; then\nmake -C mac -f \"MigrateHeadersFromWebKitLegacy.make\" -j `/usr/sbin/sysctl -n hw.activecpu`\nfi\n";
                };
+               1AD98ECF191D867300CAA6DF /* Postprocess WKFoundation.h */ = {
+                       isa = PBXShellScriptBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       inputPaths = (
+                               "$(TARGET_BUILD_DIR)/$(PUBLIC_HEADERS_FOLDER_PATH)/WKFoundation.h",
+                       );
+                       name = "Postprocess WKFoundation.h";
+                       outputPaths = (
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+                       shellPath = /bin/sh;
+                       shellScript = "WKFOUNDATION_H=${TARGET_BUILD_DIR}/${PUBLIC_HEADERS_FOLDER_PATH}/WKFoundation.h\n\nif [[ ${WK_API_AVAILABILITY_ENABLED} == \"YES\" ]]; then\n    UNIFDEF_OPTIONS=\"-DWK_API_AVAILABILITY_ENABLED\";\nelse\n    UNIFDEF_OPTIONS=\"-UWK_API_AVAILABILITY_ENABLED\";\nfi\n\nunifdef -B ${UNIFDEF_OPTIONS} -o ${WKFOUNDATION_H}.unifdef ${WKFOUNDATION_H}\n\ncase $? in\n0)\n    rm ${WKFOUNDATION_H}.unifdef\n    ;;\n1)\n    mv ${WKFOUNDATION_H}{.unifdef,}\n    ;;\n*)\n    exit 1\nesac\n";
+               };
                1ADAE12C1919A43F00F48E21 /* Migrate Headers to WebKit2 */ = {
                        isa = PBXShellScriptBuildPhase;
                        buildActionMask = 2147483647;
index 074c3b4cfec97d58a0cde8181015988a1c90fcd7..3604aacc17c889402345cf2b890e3e1c9b671bf6 100644 (file)
@@ -36,7 +36,7 @@
 @class WKWebProcessPlugInNodeHandle;
 @class WKWebProcessPlugInScriptWorld;
 
-WK_API_CLASS
+WK_CLASS_AVAILABLE(10_10, 8_0)
 @interface WKWebProcessPlugInFrame : NSObject
 
 @property (nonatomic, readonly) NSURL *URL;
index 019d431ef6f290ec9a401158571663ee11750787..a53b6c445ec0304b31cd33006734063e759aee58 100644 (file)
@@ -31,7 +31,7 @@
 
 @class WKWebProcessPlugInNodeHandle;
 
-WK_API_CLASS
+WK_CLASS_AVAILABLE(10_10, 8_0)
 @interface WKWebProcessPlugInHitTestResult : NSObject
 
 @property (readonly) WKWebProcessPlugInNodeHandle *nodeHandle;
index 327f846dca3d95605dcf1576c29c4963c0ca8e2c..e55f58c3aba48a2bc3e8d16a9a96df71e6c726b3 100644 (file)
@@ -32,7 +32,7 @@
 
 @class WKWebProcessPlugInFrame;
 
-WK_API_CLASS
+WK_CLASS_AVAILABLE(10_10, 8_0)
 @interface WKWebProcessPlugInNodeHandle : NSObject
 
 + (WKWebProcessPlugInNodeHandle *)nodeHandleWithJSValue:(JSValue *)value inContext:(JSContext *)context;
index 8752e09cf05db44ab1844113cacf7710a57171f9..6e4278ad34bb73ab216369868b593bdb3b579a5c 100644 (file)
@@ -29,7 +29,7 @@
 
 #import <Foundation/Foundation.h>
 
-WK_API_CLASS
+WK_CLASS_AVAILABLE(10_10, 8_0)
 @interface WKWebProcessPlugInPageGroup : NSObject
 
 @property (readonly) NSString *identifier;
index 34414a6bf8e4e04a04944ffad3e9bad02e0dbc40..ec5a55e8b9c3b081c3167e339dbe4264296ae090 100644 (file)
@@ -29,7 +29,7 @@
 
 #import <Foundation/Foundation.h>
 
-WK_API_CLASS
+WK_CLASS_AVAILABLE(10_10, 8_0)
 @interface WKWebProcessPlugInScriptWorld : NSObject
 
 + (WKWebProcessPlugInScriptWorld *)world;
index a94b0a3a1f1a663b8f5a4703f065cc94cae726be..6cca6bf3c3b4e66b3a5e27f2606f9b75810f6863 100644 (file)
@@ -32,7 +32,7 @@
 @class WKDOMElement;
 @class WKDOMText;
 
-WK_API_CLASS
+WK_CLASS_AVAILABLE(10_10, 8_0)
 @interface WKDOMDocument : WKDOMNode
 
 - (WKDOMElement *)createElement:(NSString *)tagName;
index 3bd25a1681df40d372a65671328614562c870e12..6d82a3fd1cd7a804857bcedf87fa947ff2b3e7b5 100644 (file)
@@ -29,7 +29,7 @@
 
 #import <WebKit/WKDOMNode.h>
 
-WK_API_CLASS
+WK_CLASS_AVAILABLE(10_10, 8_0)
 @interface WKDOMElement : WKDOMNode
 
 - (BOOL)hasAttribute:(NSString *)attribute;
index 8d927742a8cff0809841f23d91a0ac0201df6e22..31d3440fcd31be45798db3557b929442050f97cf 100644 (file)
@@ -31,7 +31,7 @@
 
 @class WKDOMDocument;
 
-WK_API_CLASS
+WK_CLASS_AVAILABLE(10_10, 8_0)
 @interface WKDOMNode : NSObject
 
 - (void)insertNode:(WKDOMNode *)node before:(WKDOMNode *)refNode;
index 7c589ee23bc3d7ee6b950bb6a802953f1afcd7be..1a7e383bd11fbafd5679b17178f8578e3fdf5f3a 100644 (file)
@@ -31,7 +31,7 @@
 
 @class WKDOMNode, WKDOMDocument;
 
-WK_API_CLASS
+WK_CLASS_AVAILABLE(10_10, 8_0)
 @interface WKDOMRange : NSObject
 
 - (id)initWithDocument:(WKDOMDocument *)document;
index 38f99f96fcb6a48445392786a1c5eee69a91a020..51bc25a4460829476dce21b0d15809835ef1604a 100644 (file)
@@ -29,7 +29,7 @@
 
 #import <WebKit/WKDOMNode.h>
 
-WK_API_CLASS
+WK_CLASS_AVAILABLE(10_10, 8_0)
 @interface WKDOMText : WKDOMNode
 
 @property(nonatomic, copy) NSString *data;
index eeaa8200aa944033f1909e80168d1f2bf4c11307..3a4fca872e3d943371d7619f7910af6f9de885e8 100644 (file)
@@ -31,7 +31,7 @@
 
 @class WKDOMRange;
 
-WK_API_CLASS
+WK_CLASS_AVAILABLE(10_10, 8_0)
 @interface WKDOMTextIterator : NSObject
 
 - (id)initWithRange:(WKDOMRange *)range;
index 6803b16d51f25f11448f53b734d73c4308f98515..f539e79fceac5220f7d4fc631f708e9531332d7e 100644 (file)
@@ -41,7 +41,7 @@
 - (void)webProcessPlugIn:(WKWebProcessPlugInController *)plugInController willDestroyBrowserContextController:(WKWebProcessPlugInBrowserContextController *)browserContextController;
 @end
 
-WK_API_CLASS
+WK_CLASS_AVAILABLE(10_10, 8_0)
 @interface WKWebProcessPlugInController : NSObject
 
 @property (readonly) WKConnection *connection;
index aa2ded0f8fdc33c0dcfb18b5b580c854ec9431e4..db53efbff569f89fed5d7faafaee4e16de9304c5 100644 (file)
@@ -35,7 +35,7 @@
 @class WKWebProcessPlugInPageGroup;
 @protocol WKWebProcessPlugInLoadDelegate;
 
-WK_API_CLASS
+WK_CLASS_AVAILABLE(10_10, 8_0)
 @interface WKWebProcessPlugInBrowserContextController : NSObject
 
 @property (readonly) WKDOMDocument *mainFrameDocument;
diff --git a/Source/WebKit2/mac/rewrite-availability-macros.sh b/Source/WebKit2/mac/rewrite-availability-macros.sh
new file mode 100755 (executable)
index 0000000..32b610f
--- /dev/null
@@ -0,0 +1,45 @@
+#!/bin/sh
+#
+# Copyright (C) 2014 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. AND ITS CONTRIBUTORS ``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 ITS CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+# THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+if [[ ${WK_API_AVAILABILITY_ENABLED} == "NO" ]]; then
+    exit 0;
+fi
+
+TIMESTAMP_PATH=${TARGET_TEMP_DIR}/${0##*/}
+
+function rewrite_headers () {
+    for HEADER_PATH in $1/*.h; do
+        if [[ $HEADER_PATH -nt $TIMESTAMP_PATH ]]; then
+            sed -e s/^WK_CLASS_AVAILABLE/NS_CLASS_AVAILABLE/ -e s/WK_AVAILABLE/NS_AVAILABLE/ -e s/WK_ENUM_AVAILABLE/NS_ENUM_AVAILABLE/ ${HEADER_PATH} > ${TARGET_TEMP_DIR}/${HEADER_PATH##*/} || exit $_;
+            mv ${TARGET_TEMP_DIR}/${HEADER_PATH##*/} $HEADER_PATH;
+        fi
+    done
+}
+
+rewrite_headers ${TARGET_BUILD_DIR}/${PUBLIC_HEADERS_FOLDER_PATH}
+rewrite_headers ${TARGET_BUILD_DIR}/${PRIVATE_HEADERS_FOLDER_PATH}
+
+touch ${TIMESTAMP_PATH}