Deprecate ObjC SPI in Deprecated Xcode group
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 1 Oct 2018 17:16:54 +0000 (17:16 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 1 Oct 2018 17:16:54 +0000 (17:16 +0000)
https://bugs.webkit.org/show_bug.cgi?id=189850

Reviewed by Andy Estes.

* Shared/Cocoa/APIObject.mm:
(API::Object::newObject):
* Shared/mac/ObjCObjectGraph.mm:
(WebKit::typeFromObject):
(WebKit::ObjCObjectGraph::encode):
(WebKit::ObjCObjectGraph::decode):
* UIProcess/API/Cocoa/WKBrowsingContextController.h:
* UIProcess/API/Cocoa/WKBrowsingContextController.mm:
(didStartProvisionalNavigation):
(didReceiveServerRedirectForProvisionalNavigation):
(didFailProvisionalNavigation):
(didCommitNavigation):
(didFinishNavigation):
(didFailNavigation):
(canAuthenticateAgainstProtectionSpace):
(didReceiveAuthenticationChallenge):
(processDidCrash):
(setUpPagePolicyClient):
* UIProcess/API/Cocoa/WKBrowsingContextGroup.h:
* UIProcess/API/Cocoa/WKBrowsingContextGroupInternal.h:
* UIProcess/API/Cocoa/WKBrowsingContextHistoryDelegate.h:
* UIProcess/API/Cocoa/WKBrowsingContextLoadDelegate.h:
* UIProcess/API/Cocoa/WKBrowsingContextLoadDelegatePrivate.h:
* UIProcess/API/Cocoa/WKBrowsingContextPolicyDelegate.h:
* UIProcess/API/Cocoa/WKNSURLAuthenticationChallenge.h:
* UIProcess/API/Cocoa/WKNSURLAuthenticationChallenge.mm:
(-[WKNSURLAuthenticationChallengeSender cancelAuthenticationChallenge:]):
(-[WKNSURLAuthenticationChallengeSender continueWithoutCredentialForAuthenticationChallenge:]):
(-[WKNSURLAuthenticationChallengeSender useCredential:forAuthenticationChallenge:]):
(-[WKNSURLAuthenticationChallengeSender performDefaultHandlingForAuthenticationChallenge:]):
(-[WKNSURLAuthenticationChallengeSender rejectProtectionSpaceAndContinueWithChallenge:]):
* UIProcess/API/Cocoa/WKNavigationData.h:
* UIProcess/API/Cocoa/WKNavigationDataInternal.h:
* UIProcess/API/Cocoa/WKProcessGroup.h:
* UIProcess/API/Cocoa/WKProcessGroup.mm:
(didCreateConnection):
(getInjectedBundleInitializationUserData):
(didNavigateWithNavigationData):
(didPerformClientRedirect):
(didPerformServerRedirect):
(didUpdateHistoryTitle):
* UIProcess/API/Cocoa/WKTypeRefWrapper.h:
* UIProcess/API/Cocoa/WKView.h:
(WK_CLASS_DEPRECATED_WITH_REPLACEMENT):
* UIProcess/API/Cocoa/_WKThumbnailView.h:
* UIProcess/API/Cocoa/_WKThumbnailView.mm:
* UIProcess/Cocoa/WebProcessProxyCocoa.mm:
(WebKit::WebProcessProxy::transformHandlesToObjects):
(WebKit::WebProcessProxy::transformObjectsToHandles):
* UIProcess/Cocoa/WebViewImpl.h:
* UIProcess/Cocoa/WebViewImpl.mm:
* UIProcess/Gamepad/mac/UIGamepadProviderMac.mm:
(WebKit::UIGamepadProvider::platformWebPageProxyForGamepadInput):
* UIProcess/ios/WKContentView.h:
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::inspectedViewFrameDidChange):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::transformHandlesToObjects):
(WebKit::WebProcess::transformObjectsToHandles):

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

32 files changed:
Source/WebKit/ChangeLog
Source/WebKit/Shared/Cocoa/APIObject.mm
Source/WebKit/Shared/mac/ObjCObjectGraph.mm
Source/WebKit/UIProcess/API/Cocoa/WKBrowsingContextController.h
Source/WebKit/UIProcess/API/Cocoa/WKBrowsingContextController.mm
Source/WebKit/UIProcess/API/Cocoa/WKBrowsingContextGroup.h
Source/WebKit/UIProcess/API/Cocoa/WKBrowsingContextGroup.mm
Source/WebKit/UIProcess/API/Cocoa/WKBrowsingContextGroupInternal.h
Source/WebKit/UIProcess/API/Cocoa/WKBrowsingContextHistoryDelegate.h
Source/WebKit/UIProcess/API/Cocoa/WKBrowsingContextLoadDelegate.h
Source/WebKit/UIProcess/API/Cocoa/WKBrowsingContextLoadDelegatePrivate.h
Source/WebKit/UIProcess/API/Cocoa/WKBrowsingContextPolicyDelegate.h
Source/WebKit/UIProcess/API/Cocoa/WKNSURLAuthenticationChallenge.h
Source/WebKit/UIProcess/API/Cocoa/WKNSURLAuthenticationChallenge.mm
Source/WebKit/UIProcess/API/Cocoa/WKNavigationData.h
Source/WebKit/UIProcess/API/Cocoa/WKNavigationDataInternal.h
Source/WebKit/UIProcess/API/Cocoa/WKProcessGroup.h
Source/WebKit/UIProcess/API/Cocoa/WKProcessGroup.mm
Source/WebKit/UIProcess/API/Cocoa/WKTypeRefWrapper.h
Source/WebKit/UIProcess/API/Cocoa/WKView.h
Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
Source/WebKit/UIProcess/API/Cocoa/_WKThumbnailView.h
Source/WebKit/UIProcess/API/Cocoa/_WKThumbnailView.mm
Source/WebKit/UIProcess/API/mac/WKView.mm
Source/WebKit/UIProcess/Cocoa/WebProcessProxyCocoa.mm
Source/WebKit/UIProcess/Cocoa/WebViewImpl.h
Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm
Source/WebKit/UIProcess/Gamepad/mac/UIGamepadProviderMac.mm
Source/WebKit/UIProcess/ios/WKContentView.h
Source/WebKit/UIProcess/ios/WKContentView.mm
Source/WebKit/UIProcess/mac/WebInspectorProxyMac.mm
Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm

index 117ffa8..e387621 100644 (file)
@@ -1,3 +1,70 @@
+2018-10-01  Alex Christensen  <achristensen@webkit.org>
+
+        Deprecate ObjC SPI in Deprecated Xcode group
+        https://bugs.webkit.org/show_bug.cgi?id=189850
+
+        Reviewed by Andy Estes.
+
+        * Shared/Cocoa/APIObject.mm:
+        (API::Object::newObject):
+        * Shared/mac/ObjCObjectGraph.mm:
+        (WebKit::typeFromObject):
+        (WebKit::ObjCObjectGraph::encode):
+        (WebKit::ObjCObjectGraph::decode):
+        * UIProcess/API/Cocoa/WKBrowsingContextController.h:
+        * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
+        (didStartProvisionalNavigation):
+        (didReceiveServerRedirectForProvisionalNavigation):
+        (didFailProvisionalNavigation):
+        (didCommitNavigation):
+        (didFinishNavigation):
+        (didFailNavigation):
+        (canAuthenticateAgainstProtectionSpace):
+        (didReceiveAuthenticationChallenge):
+        (processDidCrash):
+        (setUpPagePolicyClient):
+        * UIProcess/API/Cocoa/WKBrowsingContextGroup.h:
+        * UIProcess/API/Cocoa/WKBrowsingContextGroupInternal.h:
+        * UIProcess/API/Cocoa/WKBrowsingContextHistoryDelegate.h:
+        * UIProcess/API/Cocoa/WKBrowsingContextLoadDelegate.h:
+        * UIProcess/API/Cocoa/WKBrowsingContextLoadDelegatePrivate.h:
+        * UIProcess/API/Cocoa/WKBrowsingContextPolicyDelegate.h:
+        * UIProcess/API/Cocoa/WKNSURLAuthenticationChallenge.h:
+        * UIProcess/API/Cocoa/WKNSURLAuthenticationChallenge.mm:
+        (-[WKNSURLAuthenticationChallengeSender cancelAuthenticationChallenge:]):
+        (-[WKNSURLAuthenticationChallengeSender continueWithoutCredentialForAuthenticationChallenge:]):
+        (-[WKNSURLAuthenticationChallengeSender useCredential:forAuthenticationChallenge:]):
+        (-[WKNSURLAuthenticationChallengeSender performDefaultHandlingForAuthenticationChallenge:]):
+        (-[WKNSURLAuthenticationChallengeSender rejectProtectionSpaceAndContinueWithChallenge:]):
+        * UIProcess/API/Cocoa/WKNavigationData.h:
+        * UIProcess/API/Cocoa/WKNavigationDataInternal.h:
+        * UIProcess/API/Cocoa/WKProcessGroup.h:
+        * UIProcess/API/Cocoa/WKProcessGroup.mm:
+        (didCreateConnection):
+        (getInjectedBundleInitializationUserData):
+        (didNavigateWithNavigationData):
+        (didPerformClientRedirect):
+        (didPerformServerRedirect):
+        (didUpdateHistoryTitle):
+        * UIProcess/API/Cocoa/WKTypeRefWrapper.h:
+        * UIProcess/API/Cocoa/WKView.h:
+        (WK_CLASS_DEPRECATED_WITH_REPLACEMENT):
+        * UIProcess/API/Cocoa/_WKThumbnailView.h:
+        * UIProcess/API/Cocoa/_WKThumbnailView.mm:
+        * UIProcess/Cocoa/WebProcessProxyCocoa.mm:
+        (WebKit::WebProcessProxy::transformHandlesToObjects):
+        (WebKit::WebProcessProxy::transformObjectsToHandles):
+        * UIProcess/Cocoa/WebViewImpl.h:
+        * UIProcess/Cocoa/WebViewImpl.mm:
+        * UIProcess/Gamepad/mac/UIGamepadProviderMac.mm:
+        (WebKit::UIGamepadProvider::platformWebPageProxyForGamepadInput):
+        * UIProcess/ios/WKContentView.h:
+        * UIProcess/mac/WebInspectorProxyMac.mm:
+        (WebKit::WebInspectorProxy::inspectedViewFrameDidChange):
+        * WebProcess/cocoa/WebProcessCocoa.mm:
+        (WebKit::WebProcess::transformHandlesToObjects):
+        (WebKit::WebProcess::transformObjectsToHandles):
+
 2018-10-01  Youenn Fablet  <youenn@apple.com>
 
         [macOS Sierra] Layout Test http/wpt/cache-storage/cache-put-keys.https.any.worker.html is a flaky failure
index ecc352f..9fbd9b5 100644 (file)
@@ -143,7 +143,9 @@ void* Object::newObject(size_t size, Type type)
 #endif
 
     case Type::AuthenticationChallenge:
+        ALLOW_DEPRECATED_DECLARATIONS_BEGIN
         wrapper = allocateWKObject([WKNSURLAuthenticationChallenge self], size);
+        ALLOW_DEPRECATED_DECLARATIONS_END
         break;
 
     case Type::AutomationSession:
@@ -252,7 +254,9 @@ void* Object::newObject(size_t size, Type type)
         break;
 
     case Type::NavigationData:
+        ALLOW_DEPRECATED_DECLARATIONS_BEGIN
         wrapper = [WKNavigationData alloc];
+        ALLOW_DEPRECATED_DECLARATIONS_END
         break;
 
     case Type::NavigationResponse:
@@ -266,7 +270,9 @@ void* Object::newObject(size_t size, Type type)
 #endif
 
     case Type::PageGroup:
+        ALLOW_DEPRECATED_DECLARATIONS_BEGIN
         wrapper = [WKBrowsingContextGroup alloc];
+        ALLOW_DEPRECATED_DECLARATIONS_END
         break;
 
     case Type::SecurityOrigin:
index 70dc909..47eec87 100644 (file)
@@ -133,8 +133,10 @@ static std::optional<ObjCType> typeFromObject(id object)
 #if WK_API_ENABLED
     if (dynamic_objc_cast<WKBrowsingContextHandle>(object))
         return ObjCType::WKBrowsingContextHandle;
+    ALLOW_DEPRECATED_DECLARATIONS_BEGIN
     if (dynamic_objc_cast<WKTypeRefWrapper>(object))
         return ObjCType::WKTypeRefWrapper;
+    ALLOW_DEPRECATED_DECLARATIONS_END
 #endif
 
     return std::nullopt;
@@ -196,7 +198,9 @@ void ObjCObjectGraph::encode(IPC::Encoder& encoder, id object)
         break;
 
     case ObjCType::WKTypeRefWrapper:
+        ALLOW_DEPRECATED_DECLARATIONS_BEGIN
         UserData::encode(encoder, toImpl(static_cast<WKTypeRefWrapper *>(object).object));
+        ALLOW_DEPRECATED_DECLARATIONS_END
         break;
 #endif
 
@@ -317,7 +321,9 @@ bool ObjCObjectGraph::decode(IPC::Decoder& decoder, RetainPtr<id>& result)
         if (!UserData::decode(decoder, object))
             return false;
 
+        ALLOW_DEPRECATED_DECLARATIONS_BEGIN
         result = adoptNS([[WKTypeRefWrapper alloc] initWithObject:toAPI(object.get())]);
+        ALLOW_DEPRECATED_DECLARATIONS_END
         break;
     }
 #endif
index aa83e2a..ef5fab4 100644 (file)
@@ -36,7 +36,7 @@
 @protocol WKBrowsingContextLoadDelegate;
 @protocol WKBrowsingContextPolicyDelegate;
 
-WK_CLASS_AVAILABLE(macosx(10.10), ios(8.0))
+WK_CLASS_DEPRECATED_WITH_REPLACEMENT("WKWebView", macos(10.10, WK_MAC_TBA), ios(8.0, WK_IOS_TBA))
 @interface WKBrowsingContextController : NSObject
 
 #pragma mark Delegates
@@ -47,8 +47,8 @@ WK_CLASS_AVAILABLE(macosx(10.10), ios(8.0))
 
 #pragma mark Loading
 
-+ (void)registerSchemeForCustomProtocol:(NSString *)scheme;
-+ (void)unregisterSchemeForCustomProtocol:(NSString *)scheme;
++ (void)registerSchemeForCustomProtocol:(NSString *)scheme WK_API_DEPRECATED_WITH_REPLACEMENT("WKURLSchemeHandler", macos(10.10, WK_MAC_TBA), ios(8.0, WK_IOS_TBA));
++ (void)unregisterSchemeForCustomProtocol:(NSString *)scheme WK_API_DEPRECATED_WITH_REPLACEMENT("WKURLSchemeHandler", macos(10.10, WK_MAC_TBA), ios(8.0, WK_IOS_TBA));
 
 /* Load a request. This is only valid for requests of non-file: URLs. Passing a
    file: URL will throw an exception. */
index 176858e..35cd5c7 100644 (file)
@@ -80,11 +80,13 @@ NSString * const WKActionCanShowMIMETypeKey = @"WKActionCanShowMIMETypeKey";
     WeakObjCPtr<id <WKBrowsingContextPolicyDelegate>> _policyDelegate;
 }
 
+ALLOW_DEPRECATED_DECLARATIONS_BEGIN
 static HashMap<WebKit::WebPageProxy*, __unsafe_unretained WKBrowsingContextController *>& browsingContextControllerMap()
 {
     static NeverDestroyed<HashMap<WebKit::WebPageProxy*, __unsafe_unretained WKBrowsingContextController *>> browsingContextControllerMap;
     return browsingContextControllerMap;
 }
+ALLOW_DEPRECATED_DECLARATIONS_END
 
 - (void)dealloc
 {
@@ -319,7 +321,9 @@ static HashMap<WebKit::WebPageProxy*, __unsafe_unretained WKBrowsingContextContr
 
 static void didStartProvisionalNavigation(WKPageRef page, WKNavigationRef, WKTypeRef userData, const void* clientInfo)
 {
+    ALLOW_DEPRECATED_DECLARATIONS_BEGIN
     auto browsingContext = (__bridge WKBrowsingContextController *)clientInfo;
+    ALLOW_DEPRECATED_DECLARATIONS_END
     auto loadDelegate = browsingContext->_loadDelegate.get();
 
     if ([loadDelegate respondsToSelector:@selector(browsingContextControllerDidStartProvisionalLoad:)])
@@ -328,7 +332,9 @@ static void didStartProvisionalNavigation(WKPageRef page, WKNavigationRef, WKTyp
 
 static void didReceiveServerRedirectForProvisionalNavigation(WKPageRef page, WKNavigationRef, WKTypeRef userData, const void* clientInfo)
 {
+    ALLOW_DEPRECATED_DECLARATIONS_BEGIN
     auto browsingContext = (__bridge WKBrowsingContextController *)clientInfo;
+    ALLOW_DEPRECATED_DECLARATIONS_END
     auto loadDelegate = browsingContext->_loadDelegate.get();
 
     if ([loadDelegate respondsToSelector:@selector(browsingContextControllerDidReceiveServerRedirectForProvisionalLoad:)])
@@ -337,7 +343,9 @@ static void didReceiveServerRedirectForProvisionalNavigation(WKPageRef page, WKN
 
 static void didFailProvisionalNavigation(WKPageRef page, WKNavigationRef, WKErrorRef error, WKTypeRef userData, const void* clientInfo)
 {
+    ALLOW_DEPRECATED_DECLARATIONS_BEGIN
     auto browsingContext = (__bridge WKBrowsingContextController *)clientInfo;
+    ALLOW_DEPRECATED_DECLARATIONS_END
     auto loadDelegate = browsingContext->_loadDelegate.get();
 
     if ([loadDelegate respondsToSelector:@selector(browsingContextController:didFailProvisionalLoadWithError:)])
@@ -346,7 +354,9 @@ static void didFailProvisionalNavigation(WKPageRef page, WKNavigationRef, WKErro
 
 static void didCommitNavigation(WKPageRef page, WKNavigationRef, WKTypeRef userData, const void* clientInfo)
 {
+    ALLOW_DEPRECATED_DECLARATIONS_BEGIN
     auto browsingContext = (__bridge WKBrowsingContextController *)clientInfo;
+    ALLOW_DEPRECATED_DECLARATIONS_END
     auto loadDelegate = browsingContext->_loadDelegate.get();
 
     if ([loadDelegate respondsToSelector:@selector(browsingContextControllerDidCommitLoad:)])
@@ -355,7 +365,9 @@ static void didCommitNavigation(WKPageRef page, WKNavigationRef, WKTypeRef userD
 
 static void didFinishNavigation(WKPageRef page, WKNavigationRef, WKTypeRef userData, const void* clientInfo)
 {
+    ALLOW_DEPRECATED_DECLARATIONS_BEGIN
     auto browsingContext = (__bridge WKBrowsingContextController *)clientInfo;
+    ALLOW_DEPRECATED_DECLARATIONS_END
     auto loadDelegate = browsingContext->_loadDelegate.get();
 
     if ([loadDelegate respondsToSelector:@selector(browsingContextControllerDidFinishLoad:)])
@@ -364,7 +376,9 @@ static void didFinishNavigation(WKPageRef page, WKNavigationRef, WKTypeRef userD
 
 static void didFailNavigation(WKPageRef page, WKNavigationRef, WKErrorRef error, WKTypeRef userData, const void* clientInfo)
 {
+    ALLOW_DEPRECATED_DECLARATIONS_BEGIN
     auto browsingContext = (__bridge WKBrowsingContextController *)clientInfo;
+    ALLOW_DEPRECATED_DECLARATIONS_END
     auto loadDelegate = browsingContext->_loadDelegate.get();
 
     if ([loadDelegate respondsToSelector:@selector(browsingContextController:didFailLoadWithError:)])
@@ -373,7 +387,9 @@ static void didFailNavigation(WKPageRef page, WKNavigationRef, WKErrorRef error,
 
 static bool canAuthenticateAgainstProtectionSpace(WKPageRef page, WKProtectionSpaceRef protectionSpace, const void *clientInfo)
 {
+    ALLOW_DEPRECATED_DECLARATIONS_BEGIN
     auto browsingContext = (__bridge WKBrowsingContextController *)clientInfo;
+    ALLOW_DEPRECATED_DECLARATIONS_END
     auto loadDelegate = browsingContext->_loadDelegate.get();
 
     if ([loadDelegate respondsToSelector:@selector(browsingContextController:canAuthenticateAgainstProtectionSpace:)])
@@ -384,7 +400,9 @@ static bool canAuthenticateAgainstProtectionSpace(WKPageRef page, WKProtectionSp
 
 static void didReceiveAuthenticationChallenge(WKPageRef page, WKAuthenticationChallengeRef authenticationChallenge, const void *clientInfo)
 {
+    ALLOW_DEPRECATED_DECLARATIONS_BEGIN
     auto browsingContext = (__bridge WKBrowsingContextController *)clientInfo;
+    ALLOW_DEPRECATED_DECLARATIONS_END
     auto loadDelegate = browsingContext->_loadDelegate.get();
 
     if ([loadDelegate respondsToSelector:@selector(browsingContextController:didReceiveAuthenticationChallenge:)])
@@ -393,7 +411,9 @@ static void didReceiveAuthenticationChallenge(WKPageRef page, WKAuthenticationCh
 
 static void processDidCrash(WKPageRef page, const void* clientInfo)
 {
+    ALLOW_DEPRECATED_DECLARATIONS_BEGIN
     auto browsingContext = (__bridge WKBrowsingContextController *)clientInfo;
+    ALLOW_DEPRECATED_DECLARATIONS_END
     auto loadDelegate = browsingContext->_loadDelegate.get();
 
     if ([loadDelegate respondsToSelector:@selector(browsingContextControllerWebProcessDidCrash:)])
@@ -453,7 +473,9 @@ static void setUpPagePolicyClient(WKBrowsingContextController *browsingContext,
 
     policyClient.decidePolicyForNavigationAction = [](WKPageRef page, WKFrameRef frame, WKFrameNavigationType navigationType, WKEventModifiers modifiers, WKEventMouseButton mouseButton, WKFrameRef originatingFrame, WKURLRequestRef originalRequest, WKURLRequestRef request, WKFramePolicyListenerRef listener, WKTypeRef userData, const void* clientInfo)
     {
+        ALLOW_DEPRECATED_DECLARATIONS_BEGIN
         auto browsingContext = (__bridge WKBrowsingContextController *)clientInfo;
+        ALLOW_DEPRECATED_DECLARATIONS_END
         auto policyDelegate = browsingContext->_policyDelegate.get();
 
         if ([policyDelegate respondsToSelector:@selector(browsingContextController:decidePolicyForNavigationAction:decisionHandler:)]) {
@@ -478,7 +500,9 @@ static void setUpPagePolicyClient(WKBrowsingContextController *browsingContext,
 
     policyClient.decidePolicyForNewWindowAction = [](WKPageRef page, WKFrameRef frame, WKFrameNavigationType navigationType, WKEventModifiers modifiers, WKEventMouseButton mouseButton, WKURLRequestRef request, WKStringRef frameName, WKFramePolicyListenerRef listener, WKTypeRef userData, const void* clientInfo)
     {
+        ALLOW_DEPRECATED_DECLARATIONS_BEGIN
         auto browsingContext = (__bridge WKBrowsingContextController *)clientInfo;
+        ALLOW_DEPRECATED_DECLARATIONS_END
         auto policyDelegate = browsingContext->_policyDelegate.get();
 
         if ([policyDelegate respondsToSelector:@selector(browsingContextController:decidePolicyForNewWindowAction:decisionHandler:)]) {
@@ -498,7 +522,9 @@ static void setUpPagePolicyClient(WKBrowsingContextController *browsingContext,
 
     policyClient.decidePolicyForResponse = [](WKPageRef page, WKFrameRef frame, WKURLResponseRef response, WKURLRequestRef request, bool canShowMIMEType, WKFramePolicyListenerRef listener, WKTypeRef userData, const void* clientInfo)
     {
+        ALLOW_DEPRECATED_DECLARATIONS_BEGIN
         auto browsingContext = (__bridge WKBrowsingContextController *)clientInfo;
+        ALLOW_DEPRECATED_DECLARATIONS_END
         auto policyDelegate = browsingContext->_policyDelegate.get();
 
         if ([policyDelegate respondsToSelector:@selector(browsingContextController:decidePolicyForResponseAction:decisionHandler:)]) {
@@ -591,6 +617,7 @@ static void setUpPagePolicyClient(WKBrowsingContextController *browsingContext,
 
 @end
 
+ALLOW_DEPRECATED_DECLARATIONS_BEGIN
 @implementation WKBrowsingContextController (Private)
 
 - (WKPageRef)_pageRef
@@ -713,5 +740,6 @@ static void setUpPagePolicyClient(WKBrowsingContextController *browsingContext,
 }
 
 @end
+ALLOW_DEPRECATED_DECLARATIONS_END
 
 #endif // WK_API_ENABLED
index cb8453f..4fd6e38 100644 (file)
@@ -30,7 +30,7 @@
 #import <Foundation/Foundation.h>
 #import <WebKit/WKUserScriptInjectionTime.h>
 
-WK_CLASS_AVAILABLE(macosx(10.10), ios(8.0))
+WK_CLASS_DEPRECATED_WITH_REPLACEMENT("WKUserContentController and WKPreferences", macos(10.10, WK_MAC_TBA), ios(8.0, WK_IOS_TBA))
 @interface WKBrowsingContextGroup : NSObject
 
 - (id)initWithIdentifier:(NSString *)identifier;
index a28a81e..2a7e1da 100644 (file)
@@ -175,6 +175,7 @@ static WKRetainPtr<WKArrayRef> createWKArray(NSArray *array)
 
 @end
 
+ALLOW_DEPRECATED_DECLARATIONS_BEGIN
 @implementation WKBrowsingContextGroup (Private)
 
 - (WKPageGroupRef)_pageGroupRef
@@ -183,5 +184,6 @@ static WKRetainPtr<WKArrayRef> createWKArray(NSArray *array)
 }
 
 @end
+ALLOW_DEPRECATED_DECLARATIONS_END
 
 #endif // WK_API_ENABLED
index c88652a..8325289 100644 (file)
@@ -33,7 +33,9 @@
 namespace WebKit {
 
 template<> struct WrapperTraits<WebPageGroup> {
+    ALLOW_DEPRECATED_DECLARATIONS_BEGIN
     using WrapperClass = WKBrowsingContextGroup;
+    ALLOW_DEPRECATED_DECLARATIONS_END
 };
 
 }
index 3662336..984f0b1 100644 (file)
@@ -31,6 +31,7 @@
 #import <WebKit/WKBrowsingContextController.h>
 #import <WebKit/WKNavigationData.h>
 
+WK_CLASS_DEPRECATED_WITH_REPLACEMENT("WKBackForwardList", macos(10.10, WK_MAC_TBA), ios(8.0, WK_IOS_TBA))
 @protocol WKBrowsingContextHistoryDelegate <NSObject>
 @optional
 
index d8979d1..e1b3e5d 100644 (file)
@@ -32,6 +32,7 @@
 
 @class WKBackForwardListItem;
 
+WK_CLASS_DEPRECATED_WITH_REPLACEMENT("WKNavigationDelegate", macos(10.10, WK_MAC_TBA), ios(8.0, WK_IOS_TBA))
 @protocol WKBrowsingContextLoadDelegate <NSObject>
 @optional
 
index 8ed6231..d3a8ff4 100644 (file)
@@ -25,6 +25,8 @@
 
 #import <WebKit/WKBrowsingContextLoadDelegate.h>
 
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
 @protocol WKBrowsingContextLoadDelegatePrivate <WKBrowsingContextLoadDelegate>
 @optional
 
@@ -34,3 +36,4 @@
 - (void)browsingContextControllerWebProcessDidCrash:(WKBrowsingContextController *)sender;
 
 @end
+#pragma clang diagnostic pop
index d270e36..ec49584 100644 (file)
@@ -47,6 +47,7 @@ typedef NS_ENUM(NSUInteger, WKPolicyDecision) {
 
 typedef void (^WKPolicyDecisionHandler)(WKPolicyDecision);
 
+WK_CLASS_DEPRECATED_WITH_REPLACEMENT("WKNavigationDelegate", macos(10.10, WK_MAC_TBA), ios(8.0, WK_IOS_TBA))
 @protocol WKBrowsingContextPolicyDelegate <NSObject>
 @optional
 
index 8f79e6e..011a6a3 100644 (file)
@@ -38,6 +38,7 @@ template<> struct WrapperTraits<AuthenticationChallengeProxy> {
 
 }
 
+WK_CLASS_DEPRECATED_WITH_REPLACEMENT("WKNavigationDelegate", macos(10.10, WK_MAC_TBA), ios(8.0, WK_IOS_TBA))
 @interface WKNSURLAuthenticationChallenge : WKObject
 @end
 
index 8699a1d..d203264 100644 (file)
 
 static void checkChallenge(NSURLAuthenticationChallenge *challenge)
 {
+    ALLOW_DEPRECATED_DECLARATIONS_BEGIN
     if ([challenge class] != [WKNSURLAuthenticationChallenge class])
         [NSException raise:NSInvalidArgumentException format:@"The challenge was not sent by the receiver."];
+    ALLOW_DEPRECATED_DECLARATIONS_END
 }
 
 - (void)cancelAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge
 {
     checkChallenge(challenge);
+    ALLOW_DEPRECATED_DECLARATIONS_BEGIN
     WebKit::AuthenticationChallengeProxy& webChallenge = ((WKNSURLAuthenticationChallenge *)challenge)._web_authenticationChallengeProxy;
+    ALLOW_DEPRECATED_DECLARATIONS_END
     webChallenge.listener().completeChallenge(WebKit::AuthenticationChallengeDisposition::Cancel);
 }
 
 - (void)continueWithoutCredentialForAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge
 {
     checkChallenge(challenge);
+    ALLOW_DEPRECATED_DECLARATIONS_BEGIN
     WebKit::AuthenticationChallengeProxy& webChallenge = ((WKNSURLAuthenticationChallenge *)challenge)._web_authenticationChallengeProxy;
+    ALLOW_DEPRECATED_DECLARATIONS_END
     webChallenge.listener().completeChallenge(WebKit::AuthenticationChallengeDisposition::UseCredential);
 }
 
 - (void)useCredential:(NSURLCredential *)credential forAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge
 {
     checkChallenge(challenge);
+    ALLOW_DEPRECATED_DECLARATIONS_BEGIN
     WebKit::AuthenticationChallengeProxy& webChallenge = ((WKNSURLAuthenticationChallenge *)challenge)._web_authenticationChallengeProxy;
+    ALLOW_DEPRECATED_DECLARATIONS_END
     webChallenge.listener().completeChallenge(WebKit::AuthenticationChallengeDisposition::UseCredential, WebCore::Credential(credential));
 }
 
 - (void)performDefaultHandlingForAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge
 {
     checkChallenge(challenge);
+    ALLOW_DEPRECATED_DECLARATIONS_BEGIN
     WebKit::AuthenticationChallengeProxy& webChallenge = ((WKNSURLAuthenticationChallenge *)challenge)._web_authenticationChallengeProxy;
+    ALLOW_DEPRECATED_DECLARATIONS_END
     webChallenge.listener().completeChallenge(WebKit::AuthenticationChallengeDisposition::PerformDefaultHandling);
 }
 
 - (void)rejectProtectionSpaceAndContinueWithChallenge:(NSURLAuthenticationChallenge *)challenge
 {
     checkChallenge(challenge);
+    ALLOW_DEPRECATED_DECLARATIONS_BEGIN
     WebKit::AuthenticationChallengeProxy& webChallenge = ((WKNSURLAuthenticationChallenge *)challenge)._web_authenticationChallengeProxy;
+    ALLOW_DEPRECATED_DECLARATIONS_END
     webChallenge.listener().completeChallenge(WebKit::AuthenticationChallengeDisposition::RejectProtectionSpaceAndContinue);
 }
 
index 493f5c4..84ae65f 100644 (file)
@@ -33,7 +33,7 @@
 
 #import <Foundation/Foundation.h>
 
-WK_CLASS_AVAILABLE(macosx(10.10), ios(8.0))
+WK_CLASS_DEPRECATED_WITH_REPLACEMENT("WKNavigation", macos(10.10, WK_MAC_TBA), ios(8.0, WK_IOS_TBA))
 @interface WKNavigationData : NSObject
 
 @property (readonly) NSString *title;
index 5526cd4..50a0f33 100644 (file)
@@ -33,7 +33,9 @@
 namespace WebKit {
 
 template<> struct WrapperTraits<API::NavigationData> {
+    ALLOW_DEPRECATED_DECLARATIONS_BEGIN
     using WrapperClass = WKNavigationData;
+    ALLOW_DEPRECATED_DECLARATIONS_END
 };
 
 }
index 267c41a..11c93e8 100644 (file)
@@ -43,7 +43,7 @@
 
 @end
 
-WK_CLASS_AVAILABLE(macosx(10.10), ios(8.0))
+WK_CLASS_DEPRECATED_WITH_REPLACEMENT("WKProcessPool", macos(10.10, WK_MAC_TBA), ios(8.0, WK_IOS_TBA))
 @interface WKProcessGroup : NSObject
 
 - (id)initWithInjectedBundleURL:(NSURL *)bundleURL;
index 89f2d88..fec74aa 100644 (file)
@@ -64,7 +64,9 @@
 
 static void didCreateConnection(WKContextRef, WKConnectionRef connectionRef, const void* clientInfo)
 {
+    ALLOW_DEPRECATED_DECLARATIONS_BEGIN
     auto processGroup = (__bridge WKProcessGroup *)clientInfo;
+    ALLOW_DEPRECATED_DECLARATIONS_END
     auto delegate = processGroup->_delegate.get();
 
     if ([delegate respondsToSelector:@selector(processGroup:didCreateConnectionToWebProcessPlugIn:)])
@@ -85,7 +87,9 @@ static void setUpConnectionClient(WKProcessGroup *processGroup, WKContextRef con
 
 static WKTypeRef getInjectedBundleInitializationUserData(WKContextRef, const void* clientInfo)
 {
+    ALLOW_DEPRECATED_DECLARATIONS_BEGIN
     auto processGroup = (__bridge WKProcessGroup *)clientInfo;
+    ALLOW_DEPRECATED_DECLARATIONS_END
     auto delegate = processGroup->_delegate.get();
 
     if ([delegate respondsToSelector:@selector(processGroupWillCreateConnectionToWebProcessPlugIn:)]) {
@@ -114,7 +118,9 @@ static void didNavigateWithNavigationData(WKContextRef, WKPageRef pageRef, WKNav
     if (!WebKit::toImpl(frameRef)->isMainFrame())
         return;
 
+    ALLOW_DEPRECATED_DECLARATIONS_BEGIN
     WKBrowsingContextController *controller = [WKBrowsingContextController _browsingContextControllerForPageRef:pageRef];
+    ALLOW_DEPRECATED_DECLARATIONS_END
     auto historyDelegate = controller->_historyDelegate.get();
 
     if ([historyDelegate respondsToSelector:@selector(browsingContextController:didNavigateWithNavigationData:)])
@@ -126,7 +132,9 @@ static void didPerformClientRedirect(WKContextRef, WKPageRef pageRef, WKURLRef s
     if (!WebKit::toImpl(frameRef)->isMainFrame())
         return;
 
+    ALLOW_DEPRECATED_DECLARATIONS_BEGIN
     WKBrowsingContextController *controller = [WKBrowsingContextController _browsingContextControllerForPageRef:pageRef];
+    ALLOW_DEPRECATED_DECLARATIONS_END
     auto historyDelegate = controller->_historyDelegate.get();
 
     if ([historyDelegate respondsToSelector:@selector(browsingContextController:didPerformClientRedirectFromURL:toURL:)])
@@ -138,7 +146,9 @@ static void didPerformServerRedirect(WKContextRef, WKPageRef pageRef, WKURLRef s
     if (!WebKit::toImpl(frameRef)->isMainFrame())
         return;
 
+    ALLOW_DEPRECATED_DECLARATIONS_BEGIN
     WKBrowsingContextController *controller = [WKBrowsingContextController _browsingContextControllerForPageRef:pageRef];
+    ALLOW_DEPRECATED_DECLARATIONS_END
     auto historyDelegate = controller->_historyDelegate.get();
 
     if ([historyDelegate respondsToSelector:@selector(browsingContextController:didPerformServerRedirectFromURL:toURL:)])
@@ -150,7 +160,9 @@ static void didUpdateHistoryTitle(WKContextRef, WKPageRef pageRef, WKStringRef t
     if (!WebKit::toImpl(frameRef)->isMainFrame())
         return;
 
+    ALLOW_DEPRECATED_DECLARATIONS_BEGIN
     WKBrowsingContextController *controller = [WKBrowsingContextController _browsingContextControllerForPageRef:pageRef];
+    ALLOW_DEPRECATED_DECLARATIONS_END
     auto historyDelegate = controller->_historyDelegate.get();
 
     if ([historyDelegate respondsToSelector:@selector(browsingContextController:didUpdateHistoryTitle:forURL:)])
@@ -207,6 +219,7 @@ static void setUpHistoryClient(WKProcessGroup *processGroup, WKContextRef contex
 
 @end
 
+ALLOW_DEPRECATED_DECLARATIONS_BEGIN
 @implementation WKProcessGroup (Private)
 
 - (WKContextRef)_contextRef
@@ -229,5 +242,6 @@ static void setUpHistoryClient(WKProcessGroup *processGroup, WKContextRef contex
 #endif // PLATFORM(IOS)
 
 @end
+ALLOW_DEPRECATED_DECLARATIONS_END
 
 #endif // WK_API_ENABLED
index 0d00501..12105fe 100644 (file)
@@ -30,7 +30,7 @@
 #import <Foundation/Foundation.h>
 #import <WebKit/WKBase.h>
 
-WK_CLASS_AVAILABLE(macosx(10.10), ios(8.0))
+WK_CLASS_DEPRECATED_WITH_REPLACEMENT("WKObject", macos(10.10, WK_MAC_TBA), ios(8.0, WK_IOS_TBA))
 @interface WKTypeRefWrapper : NSObject
 
 - (id)initWithObject:(WKTypeRef)object;
index 1993b9a..c722118 100644 (file)
@@ -35,7 +35,7 @@
 @class WKProcessGroup;
 @class WKViewData;
 
-WK_EXPORT
+WK_CLASS_DEPRECATED_WITH_REPLACEMENT("WKWebView", macos(10.10, WK_MAC_TBA), ios(8.0, WK_IOS_TBA))
 @interface WKView : NSView <NSTextInputClient> {
 @private
     WKViewData *_data;
@@ -47,7 +47,10 @@ WK_EXPORT
 - (id)initWithFrame:(NSRect)frame processGroup:(WKProcessGroup *)processGroup browsingContextGroup:(WKBrowsingContextGroup *)browsingContextGroup;
 - (id)initWithFrame:(NSRect)frame processGroup:(WKProcessGroup *)processGroup browsingContextGroup:(WKBrowsingContextGroup *)browsingContextGroup relatedToView:(WKView *)relatedView;
 
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
 @property(readonly) WKBrowsingContextController *browsingContextController;
+#pragma clang diagnostic pop
 
 #endif // WK_API_ENABLED
 
index 879f932..57b4f5d 100644 (file)
@@ -1338,10 +1338,12 @@ static NSDictionary *dictionaryRepresentationForEditorState(const WebKit::Editor
     return _scrollView.get();
 }
 
+ALLOW_DEPRECATED_DECLARATIONS_BEGIN
 - (WKBrowsingContextController *)browsingContextController
 {
     return [_contentView browsingContextController];
 }
+ALLOW_DEPRECATED_DECLARATIONS_END
 
 - (BOOL)becomeFirstResponder
 {
index d535edb..26239a0 100644 (file)
 WK_CLASS_AVAILABLE(macosx(10.10), ios(8.0))
 @interface _WKThumbnailView : NSView
 
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
 - (instancetype)initWithFrame:(NSRect)frame fromWKView:(WKView *)wkView;
+#pragma clang diagnostic pop
 - (instancetype)initWithFrame:(NSRect)frame fromWKWebView:(WKWebView *)webView;
 
 @property (nonatomic) CGFloat scale;
index 34b10f0..c9bb1b5 100644 (file)
@@ -44,7 +44,9 @@
 // FIXME: We should switch to the low-resolution scale if a view we have high-resolution tiles for repaints.
 
 @implementation _WKThumbnailView {
+    ALLOW_DEPRECATED_DECLARATIONS_BEGIN
     RetainPtr<WKView> _wkView;
+    ALLOW_DEPRECATED_DECLARATIONS_END
     RetainPtr<WKWebView> _wkWebView;
     WebKit::WebPageProxy* _webPageProxy;
 
@@ -75,6 +77,7 @@
     return self;
 }
 
+ALLOW_DEPRECATED_DECLARATIONS_BEGIN
 - (instancetype)initWithFrame:(NSRect)frame fromWKView:(WKView *)wkView
 {
     if (!(self = [self initWithFrame:frame]))
@@ -87,6 +90,7 @@
 
     return self;
 }
+ALLOW_DEPRECATED_DECLARATIONS_END
 
 - (instancetype)initWithFrame:(NSRect)frame fromWKWebView:(WKWebView *)webView
 {
index 7da0c7e..e0a0b9b 100644 (file)
@@ -872,6 +872,7 @@ Some other editing-related methods still unimplemented:
 - (void)maybeInstallIconLoadingClient
 {
 #if WK_API_ENABLED
+    ALLOW_DEPRECATED_DECLARATIONS_BEGIN
     class IconLoadingClient : public API::IconLoadingClient {
     public:
         explicit IconLoadingClient(WKView *wkView)
@@ -907,6 +908,7 @@ Some other editing-related methods still unimplemented:
 
         WKView *m_wkView;
     };
+    ALLOW_DEPRECATED_DECLARATIONS_END
 
     if ([self respondsToSelector:IconLoadingClient::delegateSelector()])
         _data->_impl->page().setIconLoadingClient(std::make_unique<IconLoadingClient>(self));
@@ -1118,6 +1120,7 @@ Some other editing-related methods still unimplemented:
 
 @end
 
+ALLOW_DEPRECATED_DECLARATIONS_BEGIN
 @implementation WKView (Private)
 
 - (void)saveBackForwardSnapshotForCurrentItem
@@ -1675,5 +1678,6 @@ static _WKOverlayScrollbarStyle toAPIScrollbarStyle(std::optional<WebCore::Scrol
 }
 
 @end
+ALLOW_DEPRECATED_DECLARATIONS_END
 
 #endif // PLATFORM(MAC)
index 9de5f20..7b0da18 100644 (file)
@@ -62,8 +62,10 @@ RefPtr<ObjCObjectGraph> WebProcessProxy::transformHandlesToObjects(ObjCObjectGra
             if (dynamic_objc_cast<WKBrowsingContextHandle>(object))
                 return true;
 
+            ALLOW_DEPRECATED_DECLARATIONS_BEGIN
             if (dynamic_objc_cast<WKTypeRefWrapper>(object))
                 return true;
+            ALLOW_DEPRECATED_DECLARATIONS_END
 #endif
             return false;
         }
@@ -72,15 +74,19 @@ RefPtr<ObjCObjectGraph> WebProcessProxy::transformHandlesToObjects(ObjCObjectGra
         {
 #if WK_API_ENABLED
             if (auto* handle = dynamic_objc_cast<WKBrowsingContextHandle>(object)) {
-                if (auto* webPageProxy = m_webProcessProxy.webPage(handle.pageID))
+                if (auto* webPageProxy = m_webProcessProxy.webPage(handle.pageID)) {
+                    ALLOW_DEPRECATED_DECLARATIONS_BEGIN
                     return [WKBrowsingContextController _browsingContextControllerForPageRef:toAPI(webPageProxy)];
+                    ALLOW_DEPRECATED_DECLARATIONS_END
+                }
 
                 return [NSNull null];
             }
 
+            ALLOW_DEPRECATED_DECLARATIONS_BEGIN
             if (auto* wrapper = dynamic_objc_cast<WKTypeRefWrapper>(object))
                 return adoptNS([[WKTypeRefWrapper alloc] initWithObject:toAPI(m_webProcessProxy.transformHandlesToObjects(toImpl(wrapper.object)).get())]);
-
+            ALLOW_DEPRECATED_DECLARATIONS_END
 #endif
             return object;
         }
@@ -97,11 +103,12 @@ RefPtr<ObjCObjectGraph> WebProcessProxy::transformObjectsToHandles(ObjCObjectGra
         bool shouldTransformObject(id object) const override
         {
 #if WK_API_ENABLED
+            ALLOW_DEPRECATED_DECLARATIONS_BEGIN
             if (dynamic_objc_cast<WKBrowsingContextController>(object))
                 return true;
-
             if (dynamic_objc_cast<WKTypeRefWrapper>(object))
                 return true;
+            ALLOW_DEPRECATED_DECLARATIONS_END
 #endif
             return false;
         }
@@ -109,12 +116,12 @@ RefPtr<ObjCObjectGraph> WebProcessProxy::transformObjectsToHandles(ObjCObjectGra
         RetainPtr<id> transformObject(id object) const override
         {
 #if WK_API_ENABLED
+            ALLOW_DEPRECATED_DECLARATIONS_BEGIN
             if (auto* controller = dynamic_objc_cast<WKBrowsingContextController>(object))
                 return controller.handle;
-
             if (auto* wrapper = dynamic_objc_cast<WKTypeRefWrapper>(object))
                 return adoptNS([[WKTypeRefWrapper alloc] initWithObject:toAPI(transformObjectsToHandles(toImpl(wrapper.object)).get())]);
-
+            ALLOW_DEPRECATED_DECLARATIONS_END
 #endif
 
             return object;
index d99922d..647fa7f 100644 (file)
@@ -427,7 +427,9 @@ public:
 
     _WKRemoteObjectRegistry *remoteObjectRegistry();
 
+    ALLOW_DEPRECATED_DECLARATIONS_BEGIN
     WKBrowsingContextController *browsingContextController();
+    ALLOW_DEPRECATED_DECLARATIONS_END
 #endif // WK_API_ENABLED
 
 #if ENABLE(DRAG_SUPPORT)
@@ -749,7 +751,9 @@ private:
 
     RetainPtr<_WKRemoteObjectRegistry> m_remoteObjectRegistry;
 
+    ALLOW_DEPRECATED_DECLARATIONS_BEGIN
     RetainPtr<WKBrowsingContextController> m_browsingContextController;
+    ALLOW_DEPRECATED_DECLARATIONS_END
 #endif
 
     std::unique_ptr<ViewGestureController> m_gestureController;
index c187f47..1523d6c 100644 (file)
@@ -3789,6 +3789,7 @@ _WKRemoteObjectRegistry *WebViewImpl::remoteObjectRegistry()
     return m_remoteObjectRegistry.get();
 }
 
+ALLOW_DEPRECATED_DECLARATIONS_BEGIN
 WKBrowsingContextController *WebViewImpl::browsingContextController()
 {
     if (!m_browsingContextController)
@@ -3796,6 +3797,7 @@ WKBrowsingContextController *WebViewImpl::browsingContextController()
 
     return m_browsingContextController.get();
 }
+ALLOW_DEPRECATED_DECLARATIONS_END
 #endif // WK_API_ENABLED
 
 #if ENABLE(DRAG_SUPPORT)
index 895d42c..5d2ec7e 100644 (file)
@@ -46,8 +46,10 @@ WebPageProxy* UIGamepadProvider::platformWebPageProxyForGamepadInput()
         return ((WKWebView *)responder)->_page.get();
 #endif
 
+    ALLOW_DEPRECATED_DECLARATIONS_BEGIN
     if ([responder isKindOfClass:[WKView class]])
         return toImpl(((WKView *)responder).pageRef);
+    ALLOW_DEPRECATED_DECLARATIONS_END
 
     return nullptr;
 }
index 00c02d4..687a20b 100644 (file)
@@ -55,7 +55,10 @@ class WebProcessPool;
     WKWebView *_webView;
 }
 
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
 @property (nonatomic, readonly) WKBrowsingContextController *browsingContextController;
+#pragma clang diagnostic pop
 
 @property (nonatomic, readonly) WebKit::WebPageProxy* page;
 @property (nonatomic, readonly) BOOL isAssistingNode;
index fd528ef..6822544 100644 (file)
@@ -172,7 +172,9 @@ private:
 
 @implementation WKContentView {
     std::unique_ptr<PageClientImpl> _pageClient;
+    ALLOW_DEPRECATED_DECLARATIONS_BEGIN
     RetainPtr<WKBrowsingContextController> _browsingContextController;
+    ALLOW_DEPRECATED_DECLARATIONS_END
 
     RetainPtr<UIView> _rootContentView;
     RetainPtr<UIView> _fixedClippingView;
@@ -275,6 +277,7 @@ private:
     }
 }
 
+ALLOW_DEPRECATED_DECLARATIONS_BEGIN
 - (WKBrowsingContextController *)browsingContextController
 {
     if (!_browsingContextController)
@@ -282,6 +285,7 @@ private:
 
     return _browsingContextController.get();
 }
+ALLOW_DEPRECATED_DECLARATIONS_END
 
 - (WKPageRef)_pageRef
 {
index a685deb..d9f4645 100644 (file)
@@ -524,8 +524,10 @@ void WebInspectorProxy::inspectedViewFrameDidChange(CGFloat currentDimension)
         // top position for the inspector view since the banners only stretch as wide as the inspected view.
         inspectedViewFrame = NSMakeRect(0, 0, parentWidth - inspectorWidth, inspectedViewTop);
         CGFloat insetExcludingBanners = 0;
+        ALLOW_DEPRECATED_DECLARATIONS_BEGIN
         if ([inspectedView isKindOfClass:[WKView class]])
             insetExcludingBanners = ((WKView *)inspectedView)._topContentInset - ((WKView *)inspectedView)._totalHeightOfBanners;
+        ALLOW_DEPRECATED_DECLARATIONS_END
         if ([inspectedView isKindOfClass:[WKWebView class]])
             insetExcludingBanners = ((WKWebView *)inspectedView)._topContentInset - ((WKWebView *)inspectedView)._totalHeightOfBanners;
         newInspectorViewFrame = NSMakeRect(parentWidth - inspectorWidth, 0, inspectorWidth, NSHeight(parentBounds) - insetExcludingBanners);
@@ -543,8 +545,10 @@ void WebInspectorProxy::inspectedViewFrameDidChange(CGFloat currentDimension)
         // top position for the inspector view since the banners only stretch as wide as the inspected view.
         inspectedViewFrame = NSMakeRect(inspectorWidth, 0, parentWidth - inspectorWidth, inspectedViewTop);
         CGFloat insetExcludingBanners = 0;
+        ALLOW_DEPRECATED_DECLARATIONS_BEGIN
         if ([inspectedView isKindOfClass:[WKView class]])
             insetExcludingBanners = ((WKView *)inspectedView)._topContentInset - ((WKView *)inspectedView)._totalHeightOfBanners;
+        ALLOW_DEPRECATED_DECLARATIONS_END
         if ([inspectedView isKindOfClass:[WKWebView class]])
             insetExcludingBanners = ((WKWebView *)inspectedView)._topContentInset - ((WKWebView *)inspectedView)._totalHeightOfBanners;
         newInspectorViewFrame = NSMakeRect(0, 0, inspectorWidth, NSHeight(parentBounds) - insetExcludingBanners);
index 17cfb34..544a953 100644 (file)
@@ -505,8 +505,10 @@ RefPtr<ObjCObjectGraph> WebProcess::transformHandlesToObjects(ObjCObjectGraph& o
             if (dynamic_objc_cast<WKBrowsingContextHandle>(object))
                 return true;
 
+            ALLOW_DEPRECATED_DECLARATIONS_BEGIN
             if (dynamic_objc_cast<WKTypeRefWrapper>(object))
                 return true;
+            ALLOW_DEPRECATED_DECLARATIONS_END
 #endif
             return false;
         }
@@ -521,8 +523,10 @@ RefPtr<ObjCObjectGraph> WebProcess::transformHandlesToObjects(ObjCObjectGraph& o
                 return [NSNull null];
             }
 
+            ALLOW_DEPRECATED_DECLARATIONS_BEGIN
             if (auto* wrapper = dynamic_objc_cast<WKTypeRefWrapper>(object))
                 return adoptNS([[WKTypeRefWrapper alloc] initWithObject:toAPI(m_webProcess.transformHandlesToObjects(toImpl(wrapper.object)).get())]);
+            ALLOW_DEPRECATED_DECLARATIONS_END
 #endif
             return object;
         }
@@ -542,8 +546,10 @@ RefPtr<ObjCObjectGraph> WebProcess::transformObjectsToHandles(ObjCObjectGraph& o
             if (dynamic_objc_cast<WKWebProcessPlugInBrowserContextController>(object))
                 return true;
 
+            ALLOW_DEPRECATED_DECLARATIONS_BEGIN
             if (dynamic_objc_cast<WKTypeRefWrapper>(object))
                 return true;
+            ALLOW_DEPRECATED_DECLARATIONS_END
 #endif
 
             return false;
@@ -555,8 +561,10 @@ RefPtr<ObjCObjectGraph> WebProcess::transformObjectsToHandles(ObjCObjectGraph& o
             if (auto* controller = dynamic_objc_cast<WKWebProcessPlugInBrowserContextController>(object))
                 return controller.handle;
 
+            ALLOW_DEPRECATED_DECLARATIONS_BEGIN
             if (auto* wrapper = dynamic_objc_cast<WKTypeRefWrapper>(object))
                 return adoptNS([[WKTypeRefWrapper alloc] initWithObject:toAPI(transformObjectsToHandles(toImpl(wrapper.object)).get())]);
+            ALLOW_DEPRECATED_DECLARATIONS_END
 #endif
             return object;
         }