Bug 195121 - Expose APINavigationAction.shouldPerformDownload() on WKNavigationAction
Summary: Expose APINavigationAction.shouldPerformDownload() on WKNavigationAction
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-02-27 14:07 PST by David Quesada
Modified: 2019-02-28 15:37 PST (History)
4 users (show)

See Also:


Attachments
Patch (2.76 KB, patch)
2019-02-27 14:52 PST, David Quesada
achristensen: review-
Details | Formatted Diff | Diff
Patch v2 (17.12 KB, patch)
2019-02-27 17:23 PST, David Quesada
no flags Details | Formatted Diff | Diff
Patch v3 (17.13 KB, patch)
2019-02-27 18:00 PST, David Quesada
no flags Details | Formatted Diff | Diff
Patch v4 (17.21 KB, patch)
2019-02-27 18:10 PST, David Quesada
achristensen: review+
Details | Formatted Diff | Diff
Patch for landing (17.18 KB, patch)
2019-02-28 14:58 PST, David Quesada
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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
<rdar://problem/48450302>
Comment 2 David Quesada 2019-02-27 14:52:18 PST
Created attachment 363135 [details]
Patch
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]
Patch

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.