Bug 209246 - Pass isNavigatingToAppBoundDomain for speculative loads, preconnect tasks and downloads
Summary: Pass isNavigatingToAppBoundDomain for speculative loads, preconnect tasks and...
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-03-18 13:02 PDT by Kate Cheney
Modified: 2020-03-18 16:10 PDT (History)
7 users (show)

See Also:


Attachments
Patch (58.07 KB, patch)
2020-03-18 13:24 PDT, Kate Cheney
no flags Details | Formatted Diff | Diff
Patch for landing (58.95 KB, patch)
2020-03-18 14:48 PDT, Kate Cheney
no flags Details | Formatted Diff | Diff
Patch for landing (58.29 KB, patch)
2020-03-18 15:36 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-03-18 13:02:03 PDT
Currently this parameter is only being passed to the NetworkLoad object in NetworkResourceLoader::startNetworkLoad(). This is not the only way to load resources, so isNavigatingToAppBoundDomain should be updated to reflect that.
Comment 1 Kate Cheney 2020-03-18 13:02:37 PDT
<rdar://problem/60552712>
Comment 2 Kate Cheney 2020-03-18 13:24:34 PDT
Created attachment 393895 [details]
Patch
Comment 3 John Wilander 2020-03-18 13:32:39 PDT
Comment on attachment 393895 [details]
Patch

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

> Source/WebKit/Shared/NavigatingToAppBoundDomain.h:42
> +};

We don't need EnumTraits for boolean enum classes.

> Source/WebKit/Shared/PolicyDecision.h:104
>  template<> struct EnumTraits<WebKit::NavigatedAwayFromAppBoundDomain> {

You should be able to remove this one too but that's untreated to this patch.
Comment 4 John Wilander 2020-03-18 13:33:04 PDT
(In reply to John Wilander from comment #3)
> Comment on attachment 393895 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=393895&action=review
> 
> > Source/WebKit/Shared/NavigatingToAppBoundDomain.h:42
> > +};
> 
> We don't need EnumTraits for boolean enum classes.
> 
> > Source/WebKit/Shared/PolicyDecision.h:104
> >  template<> struct EnumTraits<WebKit::NavigatedAwayFromAppBoundDomain> {
> 
> You should be able to remove this one too but that's untreated to this patch.

*unrelated
Comment 5 Brent Fulgham 2020-03-18 13:42:55 PDT
Comment on attachment 393895 [details]
Patch

I think the overall approach of this patch seems good. I'll check with Chris or Alex to see if they have any other concerns.
Comment 6 Chris Dumez 2020-03-18 14:18:47 PDT
I defer to Alex or Youenn here.
Comment 7 Alex Christensen 2020-03-18 14:30:42 PDT
Comment on attachment 393895 [details]
Patch

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

I think the name NavigatingToAppBoundDomain is no longer correct, but I'm ok with it in this patch as long as there's a plan to rename it.
r=me

> Source/WebKit/Shared/NavigatingToAppBoundDomain.h:36
> +template<> struct EnumTraits<WebKit::NavigatingToAppBoundDomain> {

Yes, I agree with John.  Please remove this unneeded bit.

> Source/WebKit/WebProcess/WebPage/WebFrame.cpp:307
> +    webProcess.ensureNetworkProcessConnection().connection().send(Messages::NetworkConnectionToWebProcess::ConvertMainResourceLoadToDownload(mainResourceLoadIdentifier, policyDownloadID, request, response, page()->isNavigatingToAppBoundDomain()), 0);

We should probably null check page here and above.
Comment 8 Kate Cheney 2020-03-18 14:48:00 PDT
Created attachment 393907 [details]
Patch for landing
Comment 9 Kate Cheney 2020-03-18 14:49:20 PDT
(In reply to Alex Christensen from comment #7)
> Comment on attachment 393895 [details]
> Patch
> 

Thanks Alex! This patch has the changes you and John suggested. I will create a radar to rename isNavigatingToAppBoundDomain.
Comment 10 Kate Cheney 2020-03-18 15:36:40 PDT
Created attachment 393910 [details]
Patch for landing
Comment 11 EWS 2020-03-18 16:09:59 PDT
Committed r258667: <https://trac.webkit.org/changeset/258667>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 393910 [details].