https://bugs.webkit.org/show_bug.cgi?id=153718
Sam Weinig reviewed an earlier version of this change, and Simon Fraser rubber-stamped this version.
* Shared/API/Cocoa/WKFoundation.h: Removed definitions of WK_ASSUME_NONNULL_{BEGIN, END},
WK_NULLABLE, WK_NULL_UNSPECIFIED, and WK_NULLABLE_PROPERTY. Removed the
!__has_feature(assume_nonnull) case.
* mac/postprocess-framework-headers.sh: Removed rules for rewriting the above macros. Also
chanegd to rewrite WK_NULLABLE_SPECIFIER to the modern _Nullable instead of __nullable.
Replaced instances of the above macros with their expansions.
* UIProcess/API/Cocoa/WKBackForwardList.h:
* UIProcess/API/Cocoa/WKBackForwardListItem.h:
* UIProcess/API/Cocoa/WKError.h:
* UIProcess/API/Cocoa/WKFrameInfo.h:
* UIProcess/API/Cocoa/WKNavigationAction.h:
* UIProcess/API/Cocoa/WKNavigationDelegate.h:
* UIProcess/API/Cocoa/WKNavigationResponse.h:
* UIProcess/API/Cocoa/WKScriptMessage.h:
* UIProcess/API/Cocoa/WKScriptMessageHandler.h:
* UIProcess/API/Cocoa/WKSecurityOrigin.h:
* UIProcess/API/Cocoa/WKUIDelegate.h:
* UIProcess/API/Cocoa/WKUserContentController.h:
* UIProcess/API/Cocoa/WKUserScript.h:
* UIProcess/API/Cocoa/WKWebView.h:
* UIProcess/API/Cocoa/WKWebViewConfiguration.h:
* UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
* UIProcess/API/Cocoa/WKWebsiteDataStore.h:
* UIProcess/API/Cocoa/WKWindowFeatures.h:
* UIProcess/API/Cocoa/_WKContextMenuElementInfo.h:
* UIProcess/API/Cocoa/_WKElementInfo.h:
* UIProcess/API/Cocoa/_WKPreviewElementInfo.h:
* UIProcess/API/Cocoa/_WKUserStyleSheet.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@195922
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
2016-01-30 Dan Bernstein <mitz@apple.com>
+ [Cocoa] Get rid of many WK_ macros for nullability
+ https://bugs.webkit.org/show_bug.cgi?id=153718
+
+ Sam Weinig reviewed an earlier version of this change, and Simon Fraser rubber-stamped this version.
+
+ * Shared/API/Cocoa/WKFoundation.h: Removed definitions of WK_ASSUME_NONNULL_{BEGIN, END},
+ WK_NULLABLE, WK_NULL_UNSPECIFIED, and WK_NULLABLE_PROPERTY. Removed the
+ !__has_feature(assume_nonnull) case.
+
+ * mac/postprocess-framework-headers.sh: Removed rules for rewriting the above macros. Also
+ chanegd to rewrite WK_NULLABLE_SPECIFIER to the modern _Nullable instead of __nullable.
+
+ Replaced instances of the above macros with their expansions.
+
+ * UIProcess/API/Cocoa/WKBackForwardList.h:
+ * UIProcess/API/Cocoa/WKBackForwardListItem.h:
+ * UIProcess/API/Cocoa/WKError.h:
+ * UIProcess/API/Cocoa/WKFrameInfo.h:
+ * UIProcess/API/Cocoa/WKNavigationAction.h:
+ * UIProcess/API/Cocoa/WKNavigationDelegate.h:
+ * UIProcess/API/Cocoa/WKNavigationResponse.h:
+ * UIProcess/API/Cocoa/WKScriptMessage.h:
+ * UIProcess/API/Cocoa/WKScriptMessageHandler.h:
+ * UIProcess/API/Cocoa/WKSecurityOrigin.h:
+ * UIProcess/API/Cocoa/WKUIDelegate.h:
+ * UIProcess/API/Cocoa/WKUserContentController.h:
+ * UIProcess/API/Cocoa/WKUserScript.h:
+ * UIProcess/API/Cocoa/WKWebView.h:
+ * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
+ * UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
+ * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
+ * UIProcess/API/Cocoa/WKWindowFeatures.h:
+ * UIProcess/API/Cocoa/_WKContextMenuElementInfo.h:
+ * UIProcess/API/Cocoa/_WKElementInfo.h:
+ * UIProcess/API/Cocoa/_WKPreviewElementInfo.h:
+ * UIProcess/API/Cocoa/_WKUserStyleSheet.h:
+
+2016-01-30 Dan Bernstein <mitz@apple.com>
+
Reverted r195914, because at least one of the build.webkit.org builders still uses a compiler that doesn’t understand _Nullable.
* Shared/API/Cocoa/WKFoundation.h:
#define WK_UNAVAILABLE
#endif
-#if __has_feature(assume_nonnull)
-
-#ifdef NS_ASSUME_NONNULL_BEGIN
-#define WK_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
-#else
-#define WK_ASSUME_NONNULL_BEGIN _Pragma("clang assume_nonnull begin")
-#endif
-
-#ifdef NS_ASSUME_NONNULL_END
-#define WK_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END
-#else
-#define WK_ASSUME_NONNULL_END _Pragma("clang assume_nonnull end")
-#endif
-
-#define WK_NULLABLE nullable
-#define WK_NULL_UNSPECIFIED null_unspecified
#define WK_NULLABLE_SPECIFIER __nullable
-#define WK_NULLABLE_PROPERTY nullable,
-
-#else
-
-#define WK_ASSUME_NONNULL_BEGIN
-#define WK_ASSUME_NONNULL_END
-
-#define WK_NULLABLE
-#define WK_NULL_UNSPECIFIED
-#define WK_NULLABLE_SPECIFIER
-#define WK_NULLABLE_PROPERTY
-
-#endif
#endif
/*! @abstract A WKBackForwardList object is a list of webpages previously
visited in a web view that can be reached by going back or forward.
*/
-WK_ASSUME_NONNULL_BEGIN
+NS_ASSUME_NONNULL_BEGIN
WK_CLASS_AVAILABLE(10_10, 8_0)
@interface WKBackForwardList : NSObject
/*! @abstract The current item.
*/
-@property (WK_NULLABLE_PROPERTY nonatomic, readonly, strong) WKBackForwardListItem *currentItem;
+@property (nullable, nonatomic, readonly, strong) WKBackForwardListItem *currentItem;
/*! @abstract The item immediately preceding the current item, or nil
if there isn't one.
*/
-@property (WK_NULLABLE_PROPERTY nonatomic, readonly, strong) WKBackForwardListItem *backItem;
+@property (nullable, nonatomic, readonly, strong) WKBackForwardListItem *backItem;
/*! @abstract The item immediately following the current item, or nil
if there isn't one.
*/
-@property (WK_NULLABLE_PROPERTY nonatomic, readonly, strong) WKBackForwardListItem *forwardItem;
+@property (nullable, nonatomic, readonly, strong) WKBackForwardListItem *forwardItem;
/*! @abstract Returns the item at a specified distance from the current
item.
@result The item at the specified distance from the current item, or nil
if the index parameter exceeds the limits of the list.
*/
-- (WK_NULLABLE WKBackForwardListItem *)itemAtIndex:(NSInteger)index;
+- (nullable WKBackForwardListItem *)itemAtIndex:(NSInteger)index;
/*! @abstract The portion of the list preceding the current item.
@discussion The items are in the order in which they were originally
@end
-WK_ASSUME_NONNULL_END
+NS_ASSUME_NONNULL_END
#endif
/*! A WKBackForwardListItem object represents a webpage in the back-forward list of a web view.
*/
-WK_ASSUME_NONNULL_BEGIN
+NS_ASSUME_NONNULL_BEGIN
WK_CLASS_AVAILABLE(10_10, 8_0)
@interface WKBackForwardListItem : NSObject
/*! @abstract The title of the webpage represented by this item.
*/
-@property (WK_NULLABLE_PROPERTY readonly, copy) NSString *title;
+@property (nullable, readonly, copy) NSString *title;
/*! @abstract The URL of the initial request that created this item.
*/
@end
-WK_ASSUME_NONNULL_END
+NS_ASSUME_NONNULL_END
#endif
#import <Foundation/Foundation.h>
-WK_ASSUME_NONNULL_BEGIN
+NS_ASSUME_NONNULL_BEGIN
/*! @constant WKErrorDomain Indicates a WebKit error. */
WK_EXTERN NSString * const WKErrorDomain WK_AVAILABLE(10_10, 8_0);
WKErrorJavaScriptResultTypeIsUnsupported WK_ENUM_AVAILABLE(10_11, 9_0),
} WK_ENUM_AVAILABLE(10_10, 8_0);
-WK_ASSUME_NONNULL_END
+NS_ASSUME_NONNULL_END
#endif
it does not uniquely identify a frame across multiple delegate method
calls.
*/
-WK_ASSUME_NONNULL_BEGIN
+NS_ASSUME_NONNULL_BEGIN
WK_CLASS_AVAILABLE(10_10, 8_0)
@interface WKFrameInfo : NSObject <NSCopying>
@end
-WK_ASSUME_NONNULL_END
+NS_ASSUME_NONNULL_END
#endif
#import <AppKit/AppKit.h>
#endif
-WK_ASSUME_NONNULL_BEGIN
+NS_ASSUME_NONNULL_BEGIN
@class WKFrameInfo;
/*! @abstract The target frame, or nil if this is a new window navigation.
*/
-@property (WK_NULLABLE_PROPERTY nonatomic, readonly, copy) WKFrameInfo *targetFrame;
+@property (nullable, nonatomic, readonly, copy) WKFrameInfo *targetFrame;
/*! @abstract The type of action that triggered the navigation.
@discussion The value is one of the constants of the enumerated type WKNavigationType.
@end
-WK_ASSUME_NONNULL_END
+NS_ASSUME_NONNULL_END
#endif
#import <Foundation/Foundation.h>
-WK_ASSUME_NONNULL_BEGIN
+NS_ASSUME_NONNULL_BEGIN
@class WKNavigation;
@class WKNavigationAction;
@param webView The web view invoking the delegate method.
@param navigation The navigation.
*/
-- (void)webView:(WKWebView *)webView didStartProvisionalNavigation:(WK_NULL_UNSPECIFIED WKNavigation *)navigation;
+- (void)webView:(WKWebView *)webView didStartProvisionalNavigation:(null_unspecified WKNavigation *)navigation;
/*! @abstract Invoked when a server redirect is received for the main
frame.
@param webView The web view invoking the delegate method.
@param navigation The navigation.
*/
-- (void)webView:(WKWebView *)webView didReceiveServerRedirectForProvisionalNavigation:(WK_NULL_UNSPECIFIED WKNavigation *)navigation;
+- (void)webView:(WKWebView *)webView didReceiveServerRedirectForProvisionalNavigation:(null_unspecified WKNavigation *)navigation;
/*! @abstract Invoked when an error occurs while starting to load data for
the main frame.
@param navigation The navigation.
@param error The error that occurred.
*/
-- (void)webView:(WKWebView *)webView didFailProvisionalNavigation:(WK_NULL_UNSPECIFIED WKNavigation *)navigation withError:(NSError *)error;
+- (void)webView:(WKWebView *)webView didFailProvisionalNavigation:(null_unspecified WKNavigation *)navigation withError:(NSError *)error;
/*! @abstract Invoked when content starts arriving for the main frame.
@param webView The web view invoking the delegate method.
@param navigation The navigation.
*/
-- (void)webView:(WKWebView *)webView didCommitNavigation:(WK_NULL_UNSPECIFIED WKNavigation *)navigation;
+- (void)webView:(WKWebView *)webView didCommitNavigation:(null_unspecified WKNavigation *)navigation;
/*! @abstract Invoked when a main frame navigation completes.
@param webView The web view invoking the delegate method.
@param navigation The navigation.
*/
-- (void)webView:(WKWebView *)webView didFinishNavigation:(WK_NULL_UNSPECIFIED WKNavigation *)navigation;
+- (void)webView:(WKWebView *)webView didFinishNavigation:(null_unspecified WKNavigation *)navigation;
/*! @abstract Invoked when an error occurs during a committed main frame
navigation.
@param navigation The navigation.
@param error The error that occurred.
*/
-- (void)webView:(WKWebView *)webView didFailNavigation:(WK_NULL_UNSPECIFIED WKNavigation *)navigation withError:(NSError *)error;
+- (void)webView:(WKWebView *)webView didFailNavigation:(null_unspecified WKNavigation *)navigation withError:(NSError *)error;
/*! @abstract Invoked when the web view needs to respond to an authentication challenge.
@param webView The web view that received the authentication challenge.
@end
-WK_ASSUME_NONNULL_END
+NS_ASSUME_NONNULL_END
#endif
#import <Foundation/Foundation.h>
-WK_ASSUME_NONNULL_BEGIN
+NS_ASSUME_NONNULL_BEGIN
@class WKFrameInfo;
@end
-WK_ASSUME_NONNULL_END
+NS_ASSUME_NONNULL_END
#endif
#import <Foundation/Foundation.h>
-WK_ASSUME_NONNULL_BEGIN
+NS_ASSUME_NONNULL_BEGIN
@class WKFrameInfo;
@class WKWebView;
@property (nonatomic, readonly, copy) id body;
/*! @abstract The web view sending the message. */
-@property (WK_NULLABLE_PROPERTY nonatomic, readonly, weak) WKWebView *webView;
+@property (nullable, nonatomic, readonly, weak) WKWebView *webView;
/*! @abstract The frame sending the message. */
@property (nonatomic, readonly, copy) WKFrameInfo *frameInfo;
@end
-WK_ASSUME_NONNULL_END
+NS_ASSUME_NONNULL_END
#endif
#import <Foundation/Foundation.h>
-WK_ASSUME_NONNULL_BEGIN
+NS_ASSUME_NONNULL_BEGIN
@class WKScriptMessage;
@class WKUserContentController;
@end
-WK_ASSUME_NONNULL_END
+NS_ASSUME_NONNULL_END
#endif
it does not uniquely identify a security origin across multiple delegate method
calls.
*/
-WK_ASSUME_NONNULL_BEGIN
+NS_ASSUME_NONNULL_BEGIN
WK_CLASS_AVAILABLE(10_11, 9_0)
@interface WKSecurityOrigin : NSObject
@end
-WK_ASSUME_NONNULL_END
+NS_ASSUME_NONNULL_END
#endif
#import <Foundation/Foundation.h>
-WK_ASSUME_NONNULL_BEGIN
+NS_ASSUME_NONNULL_BEGIN
@class WKFrameInfo;
@class WKNavigationAction;
If you do not implement this method, the web view will cancel the navigation.
*/
-- (WK_NULLABLE WKWebView *)webView:(WKWebView *)webView createWebViewWithConfiguration:(WKWebViewConfiguration *)configuration forNavigationAction:(WKNavigationAction *)navigationAction windowFeatures:(WKWindowFeatures *)windowFeatures;
+- (nullable WKWebView *)webView:(WKWebView *)webView createWebViewWithConfiguration:(WKWebViewConfiguration *)configuration forNavigationAction:(WKNavigationAction *)navigationAction windowFeatures:(WKWindowFeatures *)windowFeatures;
/*! @abstract Notifies your app that the DOM window object's close() method completed successfully.
@param webView The web view invoking the delegate method.
If you do not implement this method, the web view will behave as if the user selected the Cancel button.
*/
-- (void)webView:(WKWebView *)webView runJavaScriptTextInputPanelWithPrompt:(NSString *)prompt defaultText:(WK_NULLABLE NSString *)defaultText initiatedByFrame:(WKFrameInfo *)frame completionHandler:(void (^)(NSString * WK_NULLABLE_SPECIFIER result))completionHandler;
+- (void)webView:(WKWebView *)webView runJavaScriptTextInputPanelWithPrompt:(NSString *)prompt defaultText:(nullable NSString *)defaultText initiatedByFrame:(WKFrameInfo *)frame completionHandler:(void (^)(NSString * WK_NULLABLE_SPECIFIER result))completionHandler;
@end
-WK_ASSUME_NONNULL_END
+NS_ASSUME_NONNULL_END
#endif
#import <Foundation/Foundation.h>
-WK_ASSUME_NONNULL_BEGIN
+NS_ASSUME_NONNULL_BEGIN
@class WKUserScript;
@protocol WKScriptMessageHandler;
@end
-WK_ASSUME_NONNULL_END
+NS_ASSUME_NONNULL_END
#endif
@constant WKUserScriptInjectionTimeAtDocumentStart Inject the script after the document element has been created, but before any other content has been loaded.
@constant WKUserScriptInjectionTimeAtDocumentEnd Inject the script after the document has finished loading, but before any subresources may have finished loading.
*/
-WK_ASSUME_NONNULL_BEGIN
+NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSInteger, WKUserScriptInjectionTime) {
WKUserScriptInjectionTimeAtDocumentStart,
@end
-WK_ASSUME_NONNULL_END
+NS_ASSUME_NONNULL_END
#endif
#import <AppKit/AppKit.h>
#endif
-WK_ASSUME_NONNULL_BEGIN
+NS_ASSUME_NONNULL_BEGIN
@class WKBackForwardList;
@class WKBackForwardListItem;
@property (nonatomic, readonly, copy) WKWebViewConfiguration *configuration;
/*! @abstract The web view's navigation delegate. */
-@property (WK_NULLABLE_PROPERTY nonatomic, weak) id <WKNavigationDelegate> navigationDelegate;
+@property (nullable, nonatomic, weak) id <WKNavigationDelegate> navigationDelegate;
/*! @abstract The web view's user interface delegate. */
-@property (WK_NULLABLE_PROPERTY nonatomic, weak) id <WKUIDelegate> UIDelegate;
+@property (nullable, nonatomic, weak) id <WKUIDelegate> UIDelegate;
/*! @abstract The web view's back-forward list. */
@property (nonatomic, readonly, strong) WKBackForwardList *backForwardList;
@param request The request specifying the URL to which to navigate.
@result A new navigation for the given request.
*/
-- (WK_NULLABLE WKNavigation *)loadRequest:(NSURLRequest *)request;
+- (nullable WKNavigation *)loadRequest:(NSURLRequest *)request;
/*! @abstract Navigates to the requested file URL on the filesystem.
@param URL The file URL to which to navigate.
If readAccessURL references a directory, files inside that file may be loaded by WebKit.
@result A new navigation for the given file URL.
*/
-- (WK_NULLABLE WKNavigation *)loadFileURL:(NSURL *)URL allowingReadAccessToURL:(NSURL *)readAccessURL WK_AVAILABLE(10_11, 9_0);
+- (nullable WKNavigation *)loadFileURL:(NSURL *)URL allowingReadAccessToURL:(NSURL *)readAccessURL WK_AVAILABLE(10_11, 9_0);
/*! @abstract Sets the webpage contents and base URL.
@param string The string to use as the contents of the webpage.
@param baseURL A URL that is used to resolve relative URLs within the document.
@result A new navigation.
*/
-- (WK_NULLABLE WKNavigation *)loadHTMLString:(NSString *)string baseURL:(WK_NULLABLE NSURL *)baseURL;
+- (nullable WKNavigation *)loadHTMLString:(NSString *)string baseURL:(nullable NSURL *)baseURL;
/*! @abstract Sets the webpage contents and base URL.
@param data The data to use as the contents of the webpage.
@param baseURL A URL that is used to resolve relative URLs within the document.
@result A new navigation.
*/
-- (WK_NULLABLE WKNavigation *)loadData:(NSData *)data MIMEType:(NSString *)MIMEType characterEncodingName:(NSString *)characterEncodingName baseURL:(NSURL *)baseURL WK_AVAILABLE(10_11, 9_0);
+- (nullable WKNavigation *)loadData:(NSData *)data MIMEType:(NSString *)MIMEType characterEncodingName:(NSString *)characterEncodingName baseURL:(NSURL *)baseURL WK_AVAILABLE(10_11, 9_0);
/*! @abstract Navigates to an item from the back-forward list and sets it
as the current item.
the current item or is not part of the web view's back-forward list.
@seealso backForwardList
*/
-- (WK_NULLABLE WKNavigation *)goToBackForwardListItem:(WKBackForwardListItem *)item;
+- (nullable WKNavigation *)goToBackForwardListItem:(WKBackForwardListItem *)item;
/*! @abstract The page title.
@discussion @link WKWebView @/link is key-value observing (KVO) compliant
for this property.
*/
-@property (WK_NULLABLE_PROPERTY nonatomic, readonly, copy) NSString *title;
+@property (nullable, nonatomic, readonly, copy) NSString *title;
/*! @abstract The active URL.
@discussion This is the URL that should be reflected in the user
@link WKWebView @/link is key-value observing (KVO) compliant for this
property.
*/
-@property (WK_NULLABLE_PROPERTY nonatomic, readonly, copy) NSURL *URL;
+@property (nullable, nonatomic, readonly, copy) NSURL *URL;
/*! @abstract A Boolean value indicating whether the view is currently
loading content.
@result A new navigation to the requested item, or nil if there is no back
item in the back-forward list.
*/
-- (WK_NULLABLE WKNavigation *)goBack;
+- (nullable WKNavigation *)goBack;
/*! @abstract Navigates to the forward item in the back-forward list.
@result A new navigation to the requested item, or nil if there is no
forward item in the back-forward list.
*/
-- (WK_NULLABLE WKNavigation *)goForward;
+- (nullable WKNavigation *)goForward;
/*! @abstract Reloads the current page.
@result A new navigation representing the reload.
*/
-- (WK_NULLABLE WKNavigation *)reload;
+- (nullable WKNavigation *)reload;
/*! @abstract Reloads the current page, performing end-to-end revalidation
using cache-validating conditionals if possible.
@result A new navigation representing the reload.
*/
-- (WK_NULLABLE WKNavigation *)reloadFromOrigin;
+- (nullable WKNavigation *)reloadFromOrigin;
/*! @abstract Stops loading all resources on the current page.
*/
/*! @abstract The custom user agent string or nil if no custom user agent string has been set.
*/
-@property (WK_NULLABLE_PROPERTY nonatomic, copy) NSString *customUserAgent WK_AVAILABLE(10_11, 9_0);
+@property (nullable, nonatomic, copy) NSString *customUserAgent WK_AVAILABLE(10_11, 9_0);
/*! @abstract A Boolean value indicating whether link preview is allowed for any
links inside this WKWebView.
back-forward list.
@param sender The object that sent this message.
*/
-- (IBAction)goBack:(WK_NULLABLE id)sender;
+- (IBAction)goBack:(nullable id)sender;
/*! @abstract Action method that navigates to the forward item in the
back-forward list.
@param sender The object that sent this message.
*/
-- (IBAction)goForward:(WK_NULLABLE id)sender;
+- (IBAction)goForward:(nullable id)sender;
/*! @abstract Action method that reloads the current page.
@param sender The object that sent this message.
*/
-- (IBAction)reload:(WK_NULLABLE id)sender;
+- (IBAction)reload:(nullable id)sender;
/*! @abstract Action method that reloads the current page, performing
end-to-end revalidation using cache-validating conditionals if possible.
@param sender The object that sent this message.
*/
-- (IBAction)reloadFromOrigin:(WK_NULLABLE id)sender;
+- (IBAction)reloadFromOrigin:(nullable id)sender;
/*! @abstract Action method that stops loading all resources on the current
page.
@param sender The object that sent this message.
*/
-- (IBAction)stopLoading:(WK_NULLABLE id)sender;
+- (IBAction)stopLoading:(nullable id)sender;
@end
#endif
-WK_ASSUME_NONNULL_END
+NS_ASSUME_NONNULL_END
#endif
#import <Foundation/Foundation.h>
-WK_ASSUME_NONNULL_BEGIN
+NS_ASSUME_NONNULL_BEGIN
@class WKPreferences;
@class WKProcessPool;
/*! @abstract The name of the application as used in the user agent string.
*/
-@property (WK_NULLABLE_PROPERTY nonatomic, copy) NSString *applicationNameForUserAgent WK_AVAILABLE(10_11, 9_0);
+@property (nullable, nonatomic, copy) NSString *applicationNameForUserAgent WK_AVAILABLE(10_11, 9_0);
/*! @abstract A Boolean value indicating whether AirPlay is allowed.
@discussion The default value is YES.
@end
-WK_ASSUME_NONNULL_END
+NS_ASSUME_NONNULL_END
#endif
#import <Foundation/Foundation.h>
-WK_ASSUME_NONNULL_BEGIN
+NS_ASSUME_NONNULL_BEGIN
/*! @constant WKWebsiteDataTypeDiskCache On-disk caches. */
WK_EXTERN NSString * const WKWebsiteDataTypeDiskCache WK_AVAILABLE(10_11, 9_0);
@end
-WK_ASSUME_NONNULL_END
+NS_ASSUME_NONNULL_END
#endif
#import <WebKit/WKWebsiteDataRecord.h>
-WK_ASSUME_NONNULL_BEGIN
+NS_ASSUME_NONNULL_BEGIN
/*! A WKWebsiteDataStore represents various types of data that a website might
make use of. This includes cookies, disk and memory caches, and persistent data such as WebSQL,
@end
-WK_ASSUME_NONNULL_END
+NS_ASSUME_NONNULL_END
#endif
/*! WKWindowFeatures specifies optional attributes for the containing window when a new WKWebView is requested.
*/
-WK_ASSUME_NONNULL_BEGIN
+NS_ASSUME_NONNULL_BEGIN
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.
*/
-@property (WK_NULLABLE_PROPERTY nonatomic, readonly) NSNumber *menuBarVisibility;
+@property (nullable, nonatomic, readonly) NSNumber *menuBarVisibility;
/*! @abstract BOOL. Whether the status bar should be visible. nil if status bar visibility was not specified.
*/
-@property (WK_NULLABLE_PROPERTY nonatomic, readonly) NSNumber *statusBarVisibility;
+@property (nullable, nonatomic, readonly) NSNumber *statusBarVisibility;
/*! @abstract BOOL. Whether toolbars should be visible. nil if toolbar visibility was not specified.
*/
-@property (WK_NULLABLE_PROPERTY nonatomic, readonly) NSNumber *toolbarsVisibility;
+@property (nullable, nonatomic, readonly) NSNumber *toolbarsVisibility;
/*! @abstract BOOL. Whether the containing window should be resizable. nil if resizability was not specified.
*/
-@property (WK_NULLABLE_PROPERTY nonatomic, readonly) NSNumber *allowsResizing;
+@property (nullable, nonatomic, readonly) NSNumber *allowsResizing;
/*! @abstract CGFloat. The x coordinate of the containing window. nil if the x coordinate was not specified.
*/
-@property (WK_NULLABLE_PROPERTY nonatomic, readonly) NSNumber *x;
+@property (nullable, nonatomic, readonly) NSNumber *x;
/*! @abstract CGFloat. The y coordinate of the containing window. nil if the y coordinate was not specified.
*/
-@property (WK_NULLABLE_PROPERTY nonatomic, readonly) NSNumber *y;
+@property (nullable, nonatomic, readonly) NSNumber *y;
/*! @abstract CGFloat. The width coordinate of the containing window. nil if the width was not specified.
*/
-@property (WK_NULLABLE_PROPERTY nonatomic, readonly) NSNumber *width;
+@property (nullable, nonatomic, readonly) NSNumber *width;
/*! @abstract CGFloat. The height coordinate of the containing window. nil if the height was not specified.
*/
-@property (WK_NULLABLE_PROPERTY nonatomic, readonly) NSNumber *height;
+@property (nullable, nonatomic, readonly) NSNumber *height;
@end
-WK_ASSUME_NONNULL_END
+NS_ASSUME_NONNULL_END
#endif
#import <WebKit/_WKElementInfo.h>
-WK_ASSUME_NONNULL_BEGIN
+NS_ASSUME_NONNULL_BEGIN
WK_CLASS_AVAILABLE(WK_MAC_TBA, NA)
@interface _WKContextMenuElementInfo : _WKElementInfo
@end
-WK_ASSUME_NONNULL_END
+NS_ASSUME_NONNULL_END
#endif
#if WK_API_ENABLED
-WK_ASSUME_NONNULL_BEGIN
+NS_ASSUME_NONNULL_BEGIN
WK_CLASS_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA)
@interface _WKElementInfo : NSObject <NSCopying>
@end
-WK_ASSUME_NONNULL_END
+NS_ASSUME_NONNULL_END
#endif
#import <WebKit/_WKElementInfo.h>
-WK_ASSUME_NONNULL_BEGIN
+NS_ASSUME_NONNULL_BEGIN
WK_CLASS_AVAILABLE(NA, WK_IOS_TBA)
@interface _WKPreviewElementInfo : _WKElementInfo
@end
-WK_ASSUME_NONNULL_END
+NS_ASSUME_NONNULL_END
#endif
#import <Foundation/Foundation.h>
-WK_ASSUME_NONNULL_BEGIN
+NS_ASSUME_NONNULL_BEGIN
WK_CLASS_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA)
@interface _WKUserStyleSheet : NSObject <NSCopying>
@end
-WK_ASSUME_NONNULL_END
+NS_ASSUME_NONNULL_END
#endif
-e 's/WK_ARRAY\(([^\)]+)\)/NSArray<\1>/g'
-e 's/WK_DICTIONARY\(([^\)]+)\)/NSDictionary<\1>/g'
-e 's/WK_SET\(([^\)]+)\)/NSSet<\1>/g'
- -e s/WK_ASSUME_NONNULL_BEGIN/NS_ASSUME_NONNULL_BEGIN/
- -e s/WK_ASSUME_NONNULL_END/NS_ASSUME_NONNULL_END/
-e s/WK_DESIGNATED_INITIALIZER/NS_DESIGNATED_INITIALIZER/
- -e s/WK_NULLABLE_PROPERTY/nullable,/
- -e s/WK_NULLABLE_SPECIFIER/__nullable/g
- -e s/WK_NULLABLE/nullable/g
- -e s/WK_NULL_UNSPECIFIED/null_unspecified/
+ -e s/WK_NULLABLE_SPECIFIER/_Nullable/g
-e s/WK_UNAVAILABLE/NS_UNAVAILABLE/
)