RESOLVED FIXED 208893
Some common domains should always be App-bound domains
https://bugs.webkit.org/show_bug.cgi?id=208893
Summary Some common domains should always be App-bound domains
Kate Cheney
Reported 2020-03-10 16:31:43 PDT
Attachments
Patch (2.30 KB, patch)
2020-03-10 17:36 PDT, Kate Cheney
no flags
Patch (2.21 KB, patch)
2020-03-10 18:10 PDT, Brent Fulgham
no flags
Kate Cheney
Comment 1 2020-03-10 17:36:25 PDT
Brent Fulgham
Comment 2 2020-03-10 17:39:52 PDT
Comment on attachment 393191 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=393191&action=review > Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:483 > + || startsWithLettersIgnoringASCIICase(domain.string(), "data:")); I don't think this will work, because RegistrableDomains are just things like "apple.com" or "webkit.org". I don't think we retain the protocol in the class.
Chris Dumez
Comment 3 2020-03-10 17:42:03 PDT
Comment on attachment 393191 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=393191&action=review >> Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:483 >> + || startsWithLettersIgnoringASCIICase(domain.string(), "data:")); > > I don't think this will work, because RegistrableDomains are just things like "apple.com" or "webkit.org". I don't think we retain the protocol in the class. Correct. Can this be tested somehow?
Brent Fulgham
Comment 4 2020-03-10 18:10:32 PDT
Kate Cheney
Comment 5 2020-03-10 18:14:29 PDT
(In reply to Brent Fulgham from comment #4) > Created attachment 393196 [details] > Patch Looks good, Unofficial r=me
WebKit Commit Bot
Comment 6 2020-03-10 19:00:21 PDT
Comment on attachment 393196 [details] Patch Clearing flags on attachment: 393196 Committed r258247: <https://trac.webkit.org/changeset/258247>
WebKit Commit Bot
Comment 7 2020-03-10 19:00:22 PDT
All reviewed patches have been landed. Closing bug.
Chris Dumez
Comment 8 2020-03-11 08:04:54 PDT
Comment on attachment 393196 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=393196&action=review > Source/WebKit/UIProcess/WebPageProxy.cpp:3098 > + return requestURL.protocolIsAbout() || requestURL.protocolIsData() || requestURL.protocolIsBlob() || requestURL.isLocalFile(); Would !requestURL.protocolIsInHTTPFamily() have worked? Or do you expect there are other non HTTP-family protocols that should not be treated as AppBound? I am asking because !requestURL.protocolIsInHTTPFamily() would be more concise and more efficient. Technically, I think registrable domains only make sense for HTTP-Family protocol anyway. > Source/WebKit/UIProcess/WebPageProxy.cpp:3105 > + if (isNavigatingToAppBoundDomain == NavigatingToAppBoundDomain::No && shouldBeTreatedAsAppBound(requestURL)) This does not seems ideally to me. Am I right that for those special protocols you are still going to extract the registrable domain and check if it is part of app bounds domains, and then ignore the result of that work and simply set that value to false? I think a much better way would be to call setIsNavigatingToAppBoundDomain(NavigatingToAppBoundDomain::No) right away for non-http URLs instead of doing the whole registrable check logic unnecessarily.
Chris Dumez
Comment 9 2020-03-11 08:07:23 PDT
Comment on attachment 393196 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=393196&action=review > Source/WebKit/ChangeLog:3 > + Some common domains should always be App-bound domains Also, the title talks about domains but this has nothing to do with domains, it is really about non-http protocols. > Source/WebKit/ChangeLog:9 > + Some domains, like about:blank and pages loaded from files should Same, this sentence does not make sense.
Kate Cheney
Comment 10 2020-03-25 09:30:03 PDT
(In reply to Chris Dumez from comment #8) > Comment on attachment 393196 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=393196&action=review > > > Source/WebKit/UIProcess/WebPageProxy.cpp:3098 > > + return requestURL.protocolIsAbout() || requestURL.protocolIsData() || requestURL.protocolIsBlob() || requestURL.isLocalFile(); > > Would !requestURL.protocolIsInHTTPFamily() have worked? Or do you expect > there are other non HTTP-family protocols that should not be treated as > AppBound? I am asking because !requestURL.protocolIsInHTTPFamily() would be > more concise and more efficient. > Technically, I think registrable domains only make sense for HTTP-Family > protocol anyway. > > > Source/WebKit/UIProcess/WebPageProxy.cpp:3105 > > + if (isNavigatingToAppBoundDomain == NavigatingToAppBoundDomain::No && shouldBeTreatedAsAppBound(requestURL)) > > This does not seems ideally to me. Am I right that for those special > protocols you are still going to extract the registrable domain and check if > it is part of app bounds domains, and then ignore the result of that work > and simply set that value to false? > I think a much better way would be to call > setIsNavigatingToAppBoundDomain(NavigatingToAppBoundDomain::No) right away > for non-http URLs instead of doing the whole registrable check logic > unnecessarily. Late but agree this should be changed. Tracking this in rdar://problem/60875376.
Note You need to log in before you can comment on or make changes to this bug.