Bug 216624 - Deprecate WKPageLoadURLRequestReturningNavigation
Summary: Deprecate WKPageLoadURLRequestReturningNavigation
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit API (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-16 16:35 PDT by Hoa Dinh
Modified: 2020-09-17 13:10 PDT (History)
7 users (show)

See Also:


Attachments
Patch (3.09 KB, patch)
2020-09-16 22:16 PDT, Hoa Dinh
no flags Details | Formatted Diff | Diff
Patch (11.20 KB, patch)
2020-09-16 23:33 PDT, Hoa Dinh
achristensen: review-
ews-feeder: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Hoa Dinh 2020-09-16 16:35:02 PDT
Using WKPageLoadURLRequestReturningNavigation() for now will call underlying WebKit:: WebPageProxy::loadRequest() with shouldOpenExternalURLsPolicy set to ShouldAllowExternalSchemes.
It won't allow opening universal links with the proper application.

Instead, WKPageLoadURLRequestReturningNavigation() should be using shouldOpenExternalURLsPolicy set to ShouldAllow.
Comment 1 Hoa Dinh 2020-09-16 22:16:56 PDT
Created attachment 408989 [details]
Patch
Comment 2 Darin Adler 2020-09-16 22:21:51 PDT
Comment on attachment 408989 [details]
Patch

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

> Source/WebCore/loader/FrameLoaderTypes.h:141
> +    // Don't allow external URLs.
>      ShouldNotAllow,
> +    // External schemes are allowed but App Links are not.
>      ShouldAllowExternalSchemes,
> +    // Allow external URLs.
>      ShouldAllow,

Please revise the names instead of adding comments. We want these names clear everywhere they are used, not just when reading this header.

    ShouldAllowExternalSchemesButNotAppLinks
Comment 3 Hoa Dinh 2020-09-16 23:33:22 PDT
Created attachment 408994 [details]
Patch
Comment 4 Darin Adler 2020-09-16 23:59:05 PDT
Comment on attachment 408994 [details]
Patch

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

> Source/WebKit/ChangeLog:24
> +        * UIProcess/API/C/mac/WKPagePrivateMac.mm:
> +        (WKPageLoadURLRequestReturningNavigation): Allow universal links.

What’s the rationale for this? I’m not sure there’s anything in the name that makes it clear it should allow universal links. I presume this is the behavior Safari wants, but is that clear enough in the SPI contract for this function? Are there non-Safari clients who might want different behavior?
Comment 5 Alex Christensen 2020-09-17 09:37:27 PDT
Comment on attachment 408994 [details]
Patch

Safari should use WKWebView._loadRequest:shouldOpenExternalURLs: instead of this.
Comment 6 Hoa Dinh 2020-09-17 13:10:24 PDT
It's a deprecated API. It won't be fixed.