[Cocoa] Get rid of WK_NULLABLE_SPECIFIER now that all supported compilers understand...
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Jul 2016 19:07:20 +0000 (19:07 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Jul 2016 19:07:20 +0000 (19:07 +0000)
https://bugs.webkit.org/show_bug.cgi?id=159361

Reviewed by Anders Carlsson.

* Shared/API/Cocoa/WKFoundation.h:
* UIProcess/API/Cocoa/WKNavigationDelegate.h:
* UIProcess/API/Cocoa/WKUIDelegate.h:
* UIProcess/API/Cocoa/WKWebView.h:
* mac/postprocess-framework-headers.sh:

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

Source/WebKit2/ChangeLog
Source/WebKit2/Shared/API/Cocoa/WKFoundation.h
Source/WebKit2/UIProcess/API/Cocoa/WKNavigationDelegate.h
Source/WebKit2/UIProcess/API/Cocoa/WKUIDelegate.h
Source/WebKit2/UIProcess/API/Cocoa/WKWebView.h
Source/WebKit2/mac/postprocess-framework-headers.sh

index 3fb2042..6c7915d 100644 (file)
@@ -1,3 +1,16 @@
+2016-07-01  Dan Bernstein  <mitz@apple.com>
+
+        [Cocoa] Get rid of WK_NULLABLE_SPECIFIER now that all supported compilers understand _Nullable
+        https://bugs.webkit.org/show_bug.cgi?id=159361
+
+        Reviewed by Anders Carlsson.
+
+        * Shared/API/Cocoa/WKFoundation.h:
+        * UIProcess/API/Cocoa/WKNavigationDelegate.h:
+        * UIProcess/API/Cocoa/WKUIDelegate.h:
+        * UIProcess/API/Cocoa/WKWebView.h:
+        * mac/postprocess-framework-headers.sh:
+
 2016-07-01  Youenn Fablet  <youennf@gmail.com>
 
         Add a runtime flag for DOM iterators
index 3dda2d4..db7f94d 100644 (file)
@@ -64,9 +64,5 @@
 
 #endif
 
-#ifdef __OBJC__
-#define WK_NULLABLE_SPECIFIER __nullable
-#endif
-
 #endif
 
index e4807e5..493c30f 100644 (file)
@@ -137,7 +137,7 @@ typedef NS_ENUM(NSInteger, WKNavigationResponsePolicy) {
  credential.
  @discussion If you do not implement this method, the web view will respond to the authentication challenge with the NSURLSessionAuthChallengeRejectProtectionSpace disposition.
  */
-- (void)webView:(WKWebView *)webView didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition disposition, NSURLCredential *WK_NULLABLE_SPECIFIER credential))completionHandler;
+- (void)webView:(WKWebView *)webView didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition disposition, NSURLCredential * _Nullable credential))completionHandler;
 
 /*! @abstract Invoked when the web view's web content process is terminated.
  @param webView The web view whose underlying web content process was terminated.
index 9456294..a6a3301 100644 (file)
@@ -115,7 +115,7 @@ NS_ASSUME_NONNULL_BEGIN
 
  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:(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 * _Nullable result))completionHandler;
 
 #if TARGET_OS_IPHONE
 
@@ -164,7 +164,7 @@ NS_ASSUME_NONNULL_BEGIN
 
  If you do not implement this method, the web view will behave as if the user selected the Cancel button.
  */
-- (void)webView:(WKWebView *)webView runOpenPanelWithParameters:(WKOpenPanelParameters *)parameters initiatedByFrame:(WKFrameInfo *)frame completionHandler:(void (^)(WK_ARRAY(NSURL *) * WK_NULLABLE_SPECIFIER URLs))completionHandler WK_AVAILABLE(WK_MAC_TBA, NA);
+- (void)webView:(WKWebView *)webView runOpenPanelWithParameters:(WKOpenPanelParameters *)parameters initiatedByFrame:(WKFrameInfo *)frame completionHandler:(void (^)(WK_ARRAY(NSURL *) * _Nullable URLs))completionHandler WK_AVAILABLE(WK_MAC_TBA, NA);
 
 #endif
 
index 231976d..71b78cd 100644 (file)
@@ -218,7 +218,7 @@ WK_CLASS_AVAILABLE(10_10, 8_0)
  @param completionHandler A block to invoke when script evaluation completes or fails.
  @discussion The completionHandler is passed the result of the script evaluation or an error.
 */
-- (void)evaluateJavaScript:(NSString *)javaScriptString completionHandler:(void (^ WK_NULLABLE_SPECIFIER)(WK_NULLABLE_SPECIFIER id, NSError * WK_NULLABLE_SPECIFIER error))completionHandler;
+- (void)evaluateJavaScript:(NSString *)javaScriptString completionHandler:(void (^ _Nullable)(_Nullable id, NSError * _Nullable error))completionHandler;
 
 /*! @abstract A Boolean value indicating whether horizontal swipe gestures
  will trigger back-forward list navigations.
index f5aa758..00af61e 100755 (executable)
@@ -61,7 +61,6 @@ function rewrite_headers () {
         -e 's/WK_ARRAY\(([^\)]+)\)/NSArray<\1>/g'
         -e 's/WK_DICTIONARY\(([^\)]+)\)/NSDictionary<\1>/g'
         -e 's/WK_SET\(([^\)]+)\)/NSSet<\1>/g'
-        -e s/WK_NULLABLE_SPECIFIER/_Nullable/g
     )
 
     if [[ -n "$OSX_VERSION" && -n "$IOS_VERSION" ]]; then