Title: [235332] trunk/Source/WebKit
Revision
235332
Author
[email protected]
Date
2018-08-24 13:36:56 -0700 (Fri, 24 Aug 2018)

Log Message

Remove -[WKNavigationDelegate _webView:decidePolicyForPluginLoadWithCurrentPolicy:pluginInfo:unavailabilityDescription:]
https://bugs.webkit.org/show_bug.cgi?id=188889

Reviewed by Alex Christensen.

* UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
Remove obsolete method.

* UIProcess/Cocoa/NavigationState.h:
Remove obsolete flag.

* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::setNavigationDelegate):
Remove obsolete flag.

(WebKit::NavigationState::NavigationClient::decidePolicyForPluginLoad):
Remove support for obsolete delegate method.

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (235331 => 235332)


--- trunk/Source/WebKit/ChangeLog	2018-08-24 20:14:50 UTC (rev 235331)
+++ trunk/Source/WebKit/ChangeLog	2018-08-24 20:36:56 UTC (rev 235332)
@@ -1,3 +1,23 @@
+2018-08-23  Jeff Miller  <[email protected]>
+
+        Remove -[WKNavigationDelegate _webView:decidePolicyForPluginLoadWithCurrentPolicy:pluginInfo:unavailabilityDescription:]
+        https://bugs.webkit.org/show_bug.cgi?id=188889
+
+        Reviewed by Alex Christensen.
+
+        * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
+        Remove obsolete method.
+
+        * UIProcess/Cocoa/NavigationState.h:
+        Remove obsolete flag.
+
+        * UIProcess/Cocoa/NavigationState.mm:
+        (WebKit::NavigationState::setNavigationDelegate):
+        Remove obsolete flag.
+
+        (WebKit::NavigationState::NavigationClient::decidePolicyForPluginLoad):
+        Remove support for obsolete delegate method.
+
 2018-08-24  Ryosuke Niwa  <[email protected]>
 
         Pass in IsComposed flag to Event constructors

Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h (235331 => 235332)


--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h	2018-08-24 20:14:50 UTC (rev 235331)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h	2018-08-24 20:36:56 UTC (rev 235332)
@@ -106,7 +106,6 @@
 - (void)_webView:(WKWebView *)webView willGoToBackForwardListItem:(WKBackForwardListItem *)item inPageCache:(BOOL)inPageCache WK_API_AVAILABLE(macosx(10.13.4));
 - (void)_webView:(WKWebView *)webView didFailToInitializePlugInWithInfo:(NSDictionary *)info WK_API_AVAILABLE(macosx(10.13.4));
 - (void)_webView:(WKWebView *)webView didBlockInsecurePluginVersionWithInfo:(NSDictionary *)info WK_API_AVAILABLE(macosx(WK_MAC_TBA));
-- (_WKPluginModuleLoadPolicy)_webView:(WKWebView *)webView decidePolicyForPluginLoadWithCurrentPolicy:(_WKPluginModuleLoadPolicy)policy pluginInfo:(NSDictionary *)info unavailabilityDescription:(NSString *)unavailabilityDescription WK_API_AVAILABLE(macosx(WK_MAC_TBA));
 - (void)_webView:(WKWebView *)webView decidePolicyForPluginLoadWithCurrentPolicy:(_WKPluginModuleLoadPolicy)policy pluginInfo:(NSDictionary *)info completionHandler:(void (^)(_WKPluginModuleLoadPolicy policy, NSString * unavailabilityDescription))completionHandler WK_API_AVAILABLE(macosx(WK_MAC_TBA));
 - (void)_webView:(WKWebView *)webView backForwardListItemAdded:(WKBackForwardListItem *)itemAdded removed:(NSArray<WKBackForwardListItem *> *)itemsRemoved WK_API_AVAILABLE(macosx(10.13.4));
 #endif

Modified: trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.h (235331 => 235332)


--- trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.h	2018-08-24 20:14:50 UTC (rev 235331)
+++ trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.h	2018-08-24 20:36:56 UTC (rev 235332)
@@ -229,7 +229,6 @@
         bool webViewDidFailToInitializePlugInWithInfo : 1;
         bool webViewDidBlockInsecurePluginVersionWithInfo : 1;
         bool webViewWillGoToBackForwardListItemInPageCache : 1;
-        bool webViewDecidePolicyForPluginLoadWithCurrentPolicyPluginInfoUnavailabilityDescription : 1;
         bool webViewDecidePolicyForPluginLoadWithCurrentPolicyPluginInfoCompletionHandler : 1;
 #endif
     } m_navigationDelegateMethods;

Modified: trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.mm (235331 => 235332)


--- trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.mm	2018-08-24 20:14:50 UTC (rev 235331)
+++ trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.mm	2018-08-24 20:36:56 UTC (rev 235332)
@@ -185,7 +185,6 @@
     m_navigationDelegateMethods.webViewDidFailToInitializePlugInWithInfo = [delegate respondsToSelector:@selector(_webView:didFailToInitializePlugInWithInfo:)];
     m_navigationDelegateMethods.webViewDidBlockInsecurePluginVersionWithInfo = [delegate respondsToSelector:@selector(_webView:didBlockInsecurePluginVersionWithInfo:)];
     m_navigationDelegateMethods.webViewBackForwardListItemAddedRemoved = [delegate respondsToSelector:@selector(_webView:backForwardListItemAdded:removed:)];
-    m_navigationDelegateMethods.webViewDecidePolicyForPluginLoadWithCurrentPolicyPluginInfoUnavailabilityDescription = [delegate respondsToSelector:@selector(_webView:decidePolicyForPluginLoadWithCurrentPolicy:pluginInfo:unavailabilityDescription:)];
     m_navigationDelegateMethods.webViewDecidePolicyForPluginLoadWithCurrentPolicyPluginInfoCompletionHandler = [delegate respondsToSelector:@selector(_webView:decidePolicyForPluginLoadWithCurrentPolicy:pluginInfo:completionHandler:)];
 #endif
 }
@@ -361,7 +360,7 @@
 
 void NavigationState::NavigationClient::decidePolicyForPluginLoad(WebKit::WebPageProxy&, WebKit::PluginModuleLoadPolicy currentPluginLoadPolicy, API::Dictionary& pluginInformation, CompletionHandler<void(WebKit::PluginModuleLoadPolicy, const String&)>&& completionHandler)
 {
-    if (!m_navigationState.m_navigationDelegateMethods.webViewDecidePolicyForPluginLoadWithCurrentPolicyPluginInfoUnavailabilityDescription && !m_navigationState.m_navigationDelegateMethods.webViewDecidePolicyForPluginLoadWithCurrentPolicyPluginInfoCompletionHandler)
+    if (!m_navigationState.m_navigationDelegateMethods.webViewDecidePolicyForPluginLoadWithCurrentPolicyPluginInfoCompletionHandler)
         completionHandler(currentPluginLoadPolicy, { });
     
     auto navigationDelegate = m_navigationState.m_navigationDelegate.get();
@@ -368,18 +367,13 @@
     if (!navigationDelegate)
         completionHandler(currentPluginLoadPolicy, { });
 
-    if (m_navigationState.m_navigationDelegateMethods.webViewDecidePolicyForPluginLoadWithCurrentPolicyPluginInfoCompletionHandler) {
-        auto checker = CompletionHandlerCallChecker::create(navigationDelegate.get(), @selector(_webView:decidePolicyForPluginLoadWithCurrentPolicy:pluginInfo:completionHandler:));
-        [(id <WKNavigationDelegatePrivate>)navigationDelegate _webView:m_navigationState.m_webView decidePolicyForPluginLoadWithCurrentPolicy:wkPluginModuleLoadPolicy(currentPluginLoadPolicy) pluginInfo:wrapper(pluginInformation) completionHandler:BlockPtr<void(_WKPluginModuleLoadPolicy, NSString *)>::fromCallable([completionHandler = WTFMove(completionHandler), checker = WTFMove(checker)](_WKPluginModuleLoadPolicy policy, NSString *unavailabilityDescription) mutable {
-            if (checker->completionHandlerHasBeenCalled())
-                return;
-            checker->didCallCompletionHandler();
-            completionHandler(pluginModuleLoadPolicy(policy), unavailabilityDescription);
-        }).get()];
-        return;
-    }
-
-    completionHandler(pluginModuleLoadPolicy([(id <WKNavigationDelegatePrivate>)navigationDelegate _webView:m_navigationState.m_webView decidePolicyForPluginLoadWithCurrentPolicy:wkPluginModuleLoadPolicy(currentPluginLoadPolicy) pluginInfo:wrapper(pluginInformation) unavailabilityDescription:nil]), { });
+    auto checker = CompletionHandlerCallChecker::create(navigationDelegate.get(), @selector(_webView:decidePolicyForPluginLoadWithCurrentPolicy:pluginInfo:completionHandler:));
+    [(id <WKNavigationDelegatePrivate>)navigationDelegate _webView:m_navigationState.m_webView decidePolicyForPluginLoadWithCurrentPolicy:wkPluginModuleLoadPolicy(currentPluginLoadPolicy) pluginInfo:wrapper(pluginInformation) completionHandler:BlockPtr<void(_WKPluginModuleLoadPolicy, NSString *)>::fromCallable([completionHandler = WTFMove(completionHandler), checker = WTFMove(checker)](_WKPluginModuleLoadPolicy policy, NSString *unavailabilityDescription) mutable {
+        if (checker->completionHandlerHasBeenCalled())
+            return;
+        checker->didCallCompletionHandler();
+        completionHandler(pluginModuleLoadPolicy(policy), unavailabilityDescription);
+    }).get()];
 }
 
 inline WebCore::WebGLLoadPolicy toWebCoreWebGLLoadPolicy(_WKWebGLLoadPolicy policy)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to