Bug 211913 - Attribute non-network loads and loads with html strings as automatically app-bound
Summary: Attribute non-network loads and loads with html strings as automatically app-...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Kate Cheney
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-05-14 11:59 PDT by Kate Cheney
Modified: 2020-05-14 18:22 PDT (History)
3 users (show)

See Also:


Attachments
Patch (19.01 KB, patch)
2020-05-14 13:49 PDT, Kate Cheney
no flags Details | Formatted Diff | Diff
Patch (20.16 KB, patch)
2020-05-14 14:25 PDT, Kate Cheney
no flags Details | Formatted Diff | Diff
Patch for landing (20.15 KB, patch)
2020-05-14 17:50 PDT, Kate Cheney
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kate Cheney 2020-05-14 11:59:42 PDT
We should consider any non-network loads or WebView loads with html strings as app-bound.
Comment 1 Kate Cheney 2020-05-14 13:49:29 PDT
Created attachment 399403 [details]
Patch
Comment 2 Kate Cheney 2020-05-14 14:25:27 PDT
Created attachment 399408 [details]
Patch
Comment 3 Kate Cheney 2020-05-14 15:58:09 PDT
<rdar://problem/63157801>
Comment 4 Brent Fulgham 2020-05-14 17:35:42 PDT
Comment on attachment 399408 [details]
Patch

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

Looks good! I had a couple of minor suggestions.

> Source/WebKit/UIProcess/WebPageProxy.cpp:1394
> +    if (MIMEType == String("text/html") && !WEB_PAGE_PROXY_ADDITIONS_SETISNAVIGATINGTOAPPBOUNDDOMAIN)

if (MIMEType == "text/html"_s && !WEB_PAGE_PROXY_ADDITIONS_SETISNAVIGATINGTOAPPBOUNDDOMAIN)

> Source/WebKit/UIProcess/WebPageProxy.cpp:3120
> +    return requestURL.protocolIsAbout() || requestURL.protocolIsData() || requestURL.protocolIsBlob() || requestURL.isLocalFile() || requestURL.protocolIsJavaScript();

Didn't Chris have some comment on a different URL method to use for this? I can't find his comment right now. :-\
Comment 5 Kate Cheney 2020-05-14 17:46:38 PDT
(In reply to Brent Fulgham from comment #4)
> Comment on attachment 399408 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=399408&action=review
> 
> Looks good! I had a couple of minor suggestions.
> 

Thanks!

> > Source/WebKit/UIProcess/WebPageProxy.cpp:1394
> > +    if (MIMEType == String("text/html") && !WEB_PAGE_PROXY_ADDITIONS_SETISNAVIGATINGTOAPPBOUNDDOMAIN)
> 
> if (MIMEType == "text/html"_s &&
> !WEB_PAGE_PROXY_ADDITIONS_SETISNAVIGATINGTOAPPBOUNDDOMAIN)
> 

Will change!

> > Source/WebKit/UIProcess/WebPageProxy.cpp:3120
> > +    return requestURL.protocolIsAbout() || requestURL.protocolIsData() || requestURL.protocolIsBlob() || requestURL.isLocalFile() || requestURL.protocolIsJavaScript();
> 
> Didn't Chris have some comment on a different URL method to use for this? I
> can't find his comment right now. :-\

He suggested using !requestURL.protocolIsInHTTPFamily() in https://bugs.webkit.org/show_bug.cgi?id=208893. Since the tests use a custom URL scheme handler, they would also be included in this check. So I don't think that will work unless we figure out a way around the testing.
Comment 6 Kate Cheney 2020-05-14 17:50:30 PDT
Created attachment 399431 [details]
Patch for landing
Comment 7 EWS 2020-05-14 18:21:24 PDT
Committed r261727: <https://trac.webkit.org/changeset/261727>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 399431 [details].
Comment 8 Radar WebKit Bug Importer 2020-05-14 18:22:17 PDT
<rdar://problem/63252340>