Diff
Modified: trunk/Source/WebKit/ChangeLog (260545 => 260546)
--- trunk/Source/WebKit/ChangeLog 2020-04-23 00:27:58 UTC (rev 260545)
+++ trunk/Source/WebKit/ChangeLog 2020-04-23 00:38:55 UTC (rev 260546)
@@ -1,5 +1,21 @@
2020-04-22 Chris Dumez <cdu...@apple.com>
+ [iOS] Expose -_webView:willGoToBackForwardListItem:inPageCache:
+ https://bugs.webkit.org/show_bug.cgi?id=210878
+ <rdar://problem/62202276>
+
+ Reviewed by Alex Christensen.
+
+ Expose -_webView:willGoToBackForwardListItem:inPageCache: on iOS.
+
+ * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
+ * UIProcess/Cocoa/NavigationState.h:
+ * UIProcess/Cocoa/NavigationState.mm:
+ (WebKit::NavigationState::setNavigationDelegate):
+ (WebKit::NavigationState::NavigationClient::willGoToBackForwardListItem):
+
+2020-04-22 Chris Dumez <cdu...@apple.com>
+
[iOS] Crash on RunningBoard process assertion invalidation
https://bugs.webkit.org/show_bug.cgi?id=210873
<rdar://problem/62194917>
Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h (260545 => 260546)
--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h 2020-04-23 00:27:58 UTC (rev 260545)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h 2020-04-23 00:38:55 UTC (rev 260546)
@@ -117,7 +117,6 @@
#else
- (void)_webView:(WKWebView *)webView webGLLoadPolicyForURL:(NSURL *)url decisionHandler:(void (^)(_WKWebGLLoadPolicy))decisionHandler WK_API_AVAILABLE(macos(10.13.4));
- (void)_webView:(WKWebView *)webView resolveWebGLLoadPolicyForURL:(NSURL *)url decisionHandler:(void (^)(_WKWebGLLoadPolicy))decisionHandler WK_API_AVAILABLE(macos(10.13.4));
-- (void)_webView:(WKWebView *)webView willGoToBackForwardListItem:(WKBackForwardListItem *)item inPageCache:(BOOL)inPageCache WK_API_AVAILABLE(macos(10.13.4));
- (void)_webView:(WKWebView *)webView didFailToInitializePlugInWithInfo:(NSDictionary *)info WK_API_AVAILABLE(macos(10.13.4));
- (void)_webView:(WKWebView *)webView didBlockInsecurePluginVersionWithInfo:(NSDictionary *)info WK_API_AVAILABLE(macos(10.14));
- (void)_webView:(WKWebView *)webView decidePolicyForPluginLoadWithCurrentPolicy:(_WKPluginModuleLoadPolicy)policy pluginInfo:(NSDictionary *)info completionHandler:(void (^)(_WKPluginModuleLoadPolicy policy, NSString * unavailabilityDescription))completionHandler WK_API_AVAILABLE(macos(10.14.4));
@@ -124,6 +123,7 @@
- (void)_webView:(WKWebView *)webView backForwardListItemAdded:(WKBackForwardListItem *)itemAdded removed:(NSArray<WKBackForwardListItem *> *)itemsRemoved WK_API_AVAILABLE(macos(10.13.4));
#endif
+- (void)_webView:(WKWebView *)webView willGoToBackForwardListItem:(WKBackForwardListItem *)item inPageCache:(BOOL)inPageCache WK_API_AVAILABLE(macos(10.13.4), ios(WK_IOS_TBA));
- (void)_webView:(WKWebView *)webView decidePolicyForSOAuthorizationLoadWithCurrentPolicy:(_WKSOAuthorizationLoadPolicy)policy forExtension:(NSString *)extension completionHandler:(void (^)(_WKSOAuthorizationLoadPolicy policy))completionHandler WK_API_AVAILABLE(macos(10.15), ios(13.0));
@end
Modified: trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.h (260545 => 260546)
--- trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.h 2020-04-23 00:27:58 UTC (rev 260545)
+++ trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.h 2020-04-23 00:38:55 UTC (rev 260546)
@@ -133,12 +133,12 @@
#if PLATFORM(MAC)
void webGLLoadPolicy(WebPageProxy&, const URL&, CompletionHandler<void(WebCore::WebGLLoadPolicy)>&&) const final;
void resolveWebGLLoadPolicy(WebPageProxy&, const URL&, CompletionHandler<void(WebCore::WebGLLoadPolicy)>&&) const final;
- bool willGoToBackForwardListItem(WebPageProxy&, WebBackForwardListItem&, bool inBackForwardCache) final;
bool didFailToInitializePlugIn(WebPageProxy&, API::Dictionary&) final;
bool didBlockInsecurePluginVersion(WebPageProxy&, API::Dictionary&) final;
void decidePolicyForPluginLoad(WebKit::WebPageProxy&, WebKit::PluginModuleLoadPolicy, API::Dictionary&, CompletionHandler<void(WebKit::PluginModuleLoadPolicy, const WTF::String&)>&&) final;
bool didChangeBackForwardList(WebPageProxy&, WebBackForwardListItem*, const Vector<Ref<WebBackForwardListItem>>&) final;
#endif
+ bool willGoToBackForwardListItem(WebPageProxy&, WebBackForwardListItem&, bool inBackForwardCache) final;
void contentRuleListNotification(WebPageProxy&, URL&&, WebCore::ContentRuleListResults&&) final;
void decidePolicyForNavigationAction(WebPageProxy&, Ref<API::NavigationAction>&&, Ref<WebFramePolicyListenerProxy>&&, API::Object* userData) override;
@@ -254,9 +254,9 @@
bool webViewBackForwardListItemAddedRemoved : 1;
bool webViewDidFailToInitializePlugInWithInfo : 1;
bool webViewDidBlockInsecurePluginVersionWithInfo : 1;
- bool webViewWillGoToBackForwardListItemInBackForwardCache : 1;
bool webViewDecidePolicyForPluginLoadWithCurrentPolicyPluginInfoCompletionHandler : 1;
#endif
+ bool webViewWillGoToBackForwardListItemInBackForwardCache : 1;
#if HAVE(APP_SSO)
bool webViewDecidePolicyForSOAuthorizationLoadWithCurrentPolicyForExtensionCompletionHandler : 1;
Modified: trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.mm (260545 => 260546)
--- trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.mm 2020-04-23 00:27:58 UTC (rev 260545)
+++ trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.mm 2020-04-23 00:38:55 UTC (rev 260546)
@@ -200,12 +200,12 @@
#if PLATFORM(MAC)
m_navigationDelegateMethods.webViewWebGLLoadPolicyForURL = [delegate respondsToSelector:@selector(_webView:webGLLoadPolicyForURL:decisionHandler:)];
m_navigationDelegateMethods.webViewResolveWebGLLoadPolicyForURL = [delegate respondsToSelector:@selector(_webView:resolveWebGLLoadPolicyForURL:decisionHandler:)];
- m_navigationDelegateMethods.webViewWillGoToBackForwardListItemInBackForwardCache = [delegate respondsToSelector:@selector(_webView:willGoToBackForwardListItem:inPageCache:)];
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.webViewDecidePolicyForPluginLoadWithCurrentPolicyPluginInfoCompletionHandler = [delegate respondsToSelector:@selector(_webView:decidePolicyForPluginLoadWithCurrentPolicy:pluginInfo:completionHandler:)];
#endif
+ m_navigationDelegateMethods.webViewWillGoToBackForwardListItemInBackForwardCache = [delegate respondsToSelector:@selector(_webView:willGoToBackForwardListItem:inPageCache:)];
#if HAVE(APP_SSO)
m_navigationDelegateMethods.webViewDecidePolicyForSOAuthorizationLoadWithCurrentPolicyForExtensionCompletionHandler = [delegate respondsToSelector:@selector(_webView:decidePolicyForSOAuthorizationLoadWithCurrentPolicy:forExtension:completionHandler:)];
#endif
@@ -469,6 +469,7 @@
[(id <WKNavigationDelegatePrivate>)navigationDelegate _webView:m_navigationState.m_webView backForwardListItemAdded:wrapper(added) removed:removedItems.get()];
return true;
}
+#endif
bool NavigationState::NavigationClient::willGoToBackForwardListItem(WebPageProxy&, WebBackForwardListItem& item, bool inBackForwardCache)
{
@@ -482,7 +483,6 @@
[(id <WKNavigationDelegatePrivate>)navigationDelegate _webView:m_navigationState.m_webView willGoToBackForwardListItem:wrapper(item) inPageCache:inBackForwardCache];
return true;
}
-#endif
static void trySOAuthorization(Ref<API::NavigationAction>&& navigationAction, WebPageProxy& page, Function<void(bool)>&& completionHandler)
{
Modified: trunk/Tools/ChangeLog (260545 => 260546)
--- trunk/Tools/ChangeLog 2020-04-23 00:27:58 UTC (rev 260545)
+++ trunk/Tools/ChangeLog 2020-04-23 00:38:55 UTC (rev 260546)
@@ -1,3 +1,15 @@
+2020-04-22 Chris Dumez <cdu...@apple.com>
+
+ [iOS] Expose -_webView:willGoToBackForwardListItem:inPageCache:
+ https://bugs.webkit.org/show_bug.cgi?id=210878
+ <rdar://problem/62202276>
+
+ Reviewed by Alex Christensen.
+
+ Enable corresponding API test on iOS.
+
+ * TestWebKitAPI/Tests/WebKitCocoa/Navigation.mm:
+
2020-04-22 Daniel Bates <daba...@apple.com>
Add a test for -focusTextInputContext on a field in detached frame
Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/Navigation.mm (260545 => 260546)
--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/Navigation.mm 2020-04-23 00:27:58 UTC (rev 260545)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/Navigation.mm 2020-04-23 00:38:55 UTC (rev 260546)
@@ -580,8 +580,6 @@
EXPECT_TRUE([delegate spiCalled]);
}
-#if PLATFORM(MAC)
-
static bool navigationComplete;
@interface BackForwardDelegate : NSObject<WKNavigationDelegatePrivate>
@@ -616,6 +614,8 @@
TestWebKitAPI::Util::run(&isDone);
}
+#if PLATFORM(MAC)
+
RetainPtr<WKBackForwardListItem> firstItem;
RetainPtr<WKBackForwardListItem> secondItem;