Bug 196283 - Add SPI stub for decidePolicyForNavigationResponse with a continuation WKWebView
Summary: Add SPI stub for decidePolicyForNavigationResponse with a continuation WKWebView
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alex Christensen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-26 19:10 PDT by Alex Christensen
Modified: 2019-03-27 14:30 PDT (History)
4 users (show)

See Also:


Attachments
Patch (25.55 KB, patch)
2019-03-26 19:11 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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?