Bug 195121

Summary: Expose APINavigationAction.shouldPerformDownload() on WKNavigationAction
Product: WebKit Reporter: David Quesada <david_quesada>
Component: WebKit2Assignee: Nobody <webkit-unassigned>
Severity: Normal CC: achristensen, commit-queue, ggaren, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Description Flags
achristensen: review-
Patch v2
Patch v3
Patch v4
achristensen: review+
Patch for landing none

Description David Quesada 2019-02-27 14:07:32 PST
When allowing a navigation action, a client might want to know whether WebKit will forcibly convert the load to a download due to a 'download' anchor attribute.
Comment 1 Radar WebKit Bug Importer 2019-02-27 14:23:12 PST
Comment 2 David Quesada 2019-02-27 14:52:18 PST
Created attachment 363135 [details]
Comment 3 Alex Christensen 2019-02-27 15:01:12 PST
This needs more motivation justification.  What do you intend to do with this information?  What are we planning to do that we have never done before that this would enable?
Comment 4 Alex Christensen 2019-02-27 15:13:43 PST
Comment on attachment 363135 [details]

We will need this, and maybe something else, too.  We'll figure that out in another patch.

r- because I think this should have a test.
Comment 5 David Quesada 2019-02-27 17:23:57 PST
Created attachment 363162 [details]
Patch v2
Comment 6 David Quesada 2019-02-27 18:00:21 PST
Created attachment 363172 [details]
Patch v3

Try to fix the broken EWS builds.
Comment 7 David Quesada 2019-02-27 18:10:03 PST
Created attachment 363173 [details]
Patch v4
Comment 8 Alex Christensen 2019-02-28 14:46:49 PST
Comment on attachment 363173 [details]
Patch v4

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

> Tools/TestWebKitAPI/Tests/WebKitCocoa/NavigationAction.mm:97
> +    auto baseURL = adoptNS([[NSURL alloc] initWithString:@"https://example.com/index.html"]);

This is a little simpler:
[NSURL URLWithString:@"https://example.com/index.html"]
Comment 9 David Quesada 2019-02-28 14:58:24 PST
Created attachment 363264 [details]
Patch for landing
Comment 10 WebKit Commit Bot 2019-02-28 15:37:48 PST
Comment on attachment 363264 [details]
Patch for landing

Clearing flags on attachment: 363264

Committed r242236: <https://trac.webkit.org/changeset/242236>
Comment 11 WebKit Commit Bot 2019-02-28 15:37:50 PST
All reviewed patches have been landed.  Closing bug.