WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
232506
[iOS] Need API for marking file requests as non-app-initiated
https://bugs.webkit.org/show_bug.cgi?id=232506
Summary
[iOS] Need API for marking file requests as non-app-initiated
Ali Juma
Reported
2021-10-29 14:40:00 PDT
Chrome for iOS uses a file-based session restoration approach for cases where [WKWebView setInteractionState:] cannot be used. These cases include syncing tabs across devices, reopening closed tabs (i.e., where the user closes a tab, but decides later that they want the tab back), and users upgrading from iOS 14. Network requests in such tabs should be marked as non-app-initiated, but there's currently no way to set request attribution for file requests. The result is that all back/forward and link-tap navigations in such tabs get marked as app-initiated, until the next call to [WKWebView loadRequest:] (in practice, this means that all navigation is marked as app-initiated until the next time the user types a URL in the URL bar instead of tapping on links). Specifically: 1) [WKWebView loadFileRequest:allowingReadAccessToURL:] only looks at the URL in the given request, and ignores everything else, including the request's |attribution| property. 2) [WKWebView loadFile:allowingReadAccessToURL:] doesn't have any way to set attribution.
Attachments
Patch
(11.40 KB, patch)
2021-11-02 16:21 PDT
,
Kate Cheney
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Patch
(11.51 KB, patch)
2021-11-02 16:32 PDT
,
Kate Cheney
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2021-10-29 14:55:18 PDT
<
rdar://problem/84824703
>
Brent Fulgham
Comment 2
2021-10-29 15:05:09 PDT
This sounds like a bug: [WKWebView loadFileRequest:allowingReadAccessToURL:] The NSURLRequest passed to this load argument, along with the attribution for that request, should be honored by the system. Let me look into this.
Kate Cheney
Comment 3
2021-11-02 16:21:19 PDT
Created
attachment 443142
[details]
Patch
Brent Fulgham
Comment 4
2021-11-02 16:25:18 PDT
Comment on
attachment 443142
[details]
Patch r=me, though EWS might be having some issues.
Kate Cheney
Comment 5
2021-11-02 16:32:03 PDT
Created
attachment 443144
[details]
Patch
Kate Cheney
Comment 6
2021-11-02 16:32:27 PDT
Thanks! I think this patch should fix mac EWS, let's see...
EWS
Comment 7
2021-11-03 09:17:28 PDT
Committed
r285208
(
243834@main
): <
https://commits.webkit.org/243834@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 443144
[details]
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug