We need to add an additional parameter to WKPageLoadURLRequestReturningNavigation() to control whether app link is allowed to be used.
Created attachment 409699 [details]
Comment on attachment 409699 [details]
WKPageLoadURLRequestReturningNavigation should not be changed, to keep binary compatibility. This should be new SPI, and it should be ObjC in WKWebViewPrivate.h
It looks like what we need is something similar to _loadRequest:shouldOpenExternalURLs: but that uses ShouldAllowExternalSchemesButNotAppLinks
Created attachment 409770 [details]
Committed r267619: <https://trac.webkit.org/changeset/267619>
All reviewed patches have been landed. Closing bug and clearing flags on attachment 409770 [details].
Comment on attachment 409770 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=409770&action=review
> - (void)_loadAlternateHTMLString:(NSString *)string baseURL:(NSURL *)baseURL forUnreachableURL:(NSURL *)unreachableURL;
> - (WKNavigation *)_loadData:(NSData *)data MIMEType:(NSString *)MIMEType characterEncodingName:(NSString *)characterEncodingName baseURL:(NSURL *)baseURL userData:(id)userData WK_API_AVAILABLE(macos(10.12), ios(10.0));
> - (WKNavigation *)_loadRequest:(NSURLRequest *)request shouldOpenExternalURLs:(BOOL)shouldOpenExternalURLs WK_API_AVAILABLE(macos(10.13), ios(11.0));
> +- (WKNavigation *)_loadRequest:(NSURLRequest *)request shouldOpenExternalURLsPolicy:(_WKShouldOpenExternalURLsPolicy)shouldOpenExternalURLsPolicy WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));
Why is all of this SPI instead of API? Don’t we want some of this as API?
This control has been requested, but I don't think this location is where it should go in public API. I think it should be a WKNavigationDelegate callback asking whether we should open a particular link.