Bug 183620 - Resource Load Statistics: Immediately forward cookie access for domains with previous user interaction when there's an opener document
Summary: Resource Load Statistics: Immediately forward cookie access for domains with ...
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: John Wilander
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-03-13 17:38 PDT by John Wilander
Modified: 2018-03-16 17:23 PDT (History)
11 users (show)

See Also:


Attachments
Patch (30.20 KB, patch)
2018-03-13 17:54 PDT, John Wilander
no flags Details | Formatted Diff | Diff
Patch (30.20 KB, patch)
2018-03-13 18:00 PDT, John Wilander
no flags Details | Formatted Diff | Diff
Patch (32.35 KB, patch)
2018-03-13 18:31 PDT, John Wilander
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John Wilander 2018-03-13 17:38:01 PDT
It turns out the fix in https://bugs.webkit.org/show_bug.cgi?id=183577 wasn't enough to address the compatibility issues with popups. Some of them just detect their unpartitioned cookies, auto-dismiss themselves, and expect their unpartitioned cookies to be available under the opener afterwards. We should grant them access if the popup's domain has had user interaction _previously_.

Note that we still need the part in https://bugs.webkit.org/show_bug.cgi?id=183577 because if the popup's domain has not received user interaction previously, we will not grant it storage access on just the window open.
Comment 1 John Wilander 2018-03-13 17:38:34 PDT
<rdar://problem/38431469>
Comment 2 John Wilander 2018-03-13 17:54:10 PDT
Created attachment 335750 [details]
Patch
Comment 3 John Wilander 2018-03-13 18:00:46 PDT
Created attachment 335752 [details]
Patch
Comment 4 John Wilander 2018-03-13 18:31:59 PDT
Created attachment 335754 [details]
Patch
Comment 5 John Wilander 2018-03-13 18:32:23 PDT
Added test cases as [ Pass ] in expectations files.
Comment 6 Brent Fulgham 2018-03-13 21:17:22 PDT
Comment on attachment 335754 [details]
Patch

R=me
Comment 7 John Wilander 2018-03-13 21:53:09 PDT
Comment on attachment 335754 [details]
Patch

Thanks, Brent!
Comment 8 WebKit Commit Bot 2018-03-13 22:18:02 PDT
Comment on attachment 335754 [details]
Patch

Clearing flags on attachment: 335754

Committed r229597: <https://trac.webkit.org/changeset/229597>
Comment 9 WebKit Commit Bot 2018-03-13 22:18:04 PDT
All reviewed patches have been landed.  Closing bug.
Comment 10 Ryan Haddad 2018-03-14 11:23:33 PDT
This change seems to have caused storageAccess LayoutTest failures:
https://build.webkit.org/results/Apple%20High%20Sierra%20Release%20WK2%20(Tests)/r229601%20(3439)/results.html
Comment 11 John Wilander 2018-03-14 11:42:01 PDT
(In reply to Ryan Haddad from comment #10)
> This change seems to have caused storageAccess LayoutTest failures:
> https://build.webkit.org/results/
> Apple%20High%20Sierra%20Release%20WK2%20(Tests)/r229601%20(3439)/results.html

It's probably the network process that keeps state between test runs. I'll try to come up with a fix.
Comment 12 John Wilander 2018-03-14 12:41:46 PDT
I have a fix I'll put up for review. Thanks for letting me know, Ryan!
Comment 13 John Wilander 2018-03-14 12:55:02 PDT
https://bugs.webkit.org/show_bug.cgi?id=183641 tracks the fix.