Bug 196283

Summary: Add SPI stub for decidePolicyForNavigationResponse with a continuation WKWebView
Product: WebKit Reporter: Alex Christensen <achristensen>
Component: New BugsAssignee: Alex Christensen <achristensen>
Status: NEW ---    
Severity: Normal CC: beidson, cdumez, ggaren, sam
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Alex Christensen 2019-03-26 19:10:38 PDT
Add SPI stub for decidePolicyForNavigationResponse with a continuation WKWebView
Comment 1 Alex Christensen 2019-03-26 19:11:49 PDT
Created attachment 366040 [details]
Patch
Comment 2 Sam Weinig 2019-03-26 19:20:57 PDT
Comment on attachment 366040 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=366040&action=review

> Source/WebKit/ChangeLog:6
> +        Add SPI stub for decidePolicyForNavigationResponse with a continuation WKWebView
> +        https://bugs.webkit.org/show_bug.cgi?id=196283
> +
> +        Reviewed by NOBODY (OOPS!).

What will this SPI do? (please try to include more information in the ChangeLog. It's not here solely to document the reviewer :) ).
Comment 3 Alex Christensen 2019-03-26 22:57:23 PDT
The current plan is to continue the load we've just decided about in a new WKWebView.  That'll require some interesting work to hook up, and this was a good milestone.
Comment 4 Chris Dumez 2019-03-27 14:15:18 PDT
Comment on attachment 366040 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=366040&action=review

> Source/WebKit/UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:93
> +- (void)_webView:(WKWebView *)webView decidePolicyForNavigationResponse:(WKNavigationResponse *)navigationResponse decisionHandler:(void (^)(WKNavigationResponsePolicy, WKWebView *continuationWebView))decisionHandler WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));

I personally find this is a weird SPI. Why is it WebKit's responsibility to transition the load in a new view? The client started the load in this view. If they want a new view, they could always cancel this load and start it again in a new view.
Comment 5 Alex Christensen 2019-03-27 14:30:16 PDT
Comment on attachment 366040 [details]
Patch

That won't work for some loads.
Since the timeline for this has changed, I'm removing r?