Bug 216019 - Storage Access API: Allow requests for storage access from nested iframes
Summary: Storage Access API: Allow requests for storage access from nested iframes
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: John Wilander
URL:
Keywords: InRadar
: 205370 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-08-31 17:45 PDT by John Wilander
Modified: 2021-02-10 11:03 PST (History)
9 users (show)

See Also:


Attachments
Patch (18.98 KB, patch)
2020-08-31 17:51 PDT, John Wilander
no flags Details | Formatted Diff | Diff
Patch (18.52 KB, patch)
2020-09-01 13:14 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 2020-08-31 17:45:21 PDT
It was decided browsers should support requests for storage access from nested iframes as part of the standardization of the Storage Access API. The issue is discussed here: https://github.com/privacycg/storage-access/issues/10
Comment 1 Radar WebKit Bug Importer 2020-08-31 17:45:49 PDT
<rdar://problem/68109918>
Comment 2 John Wilander 2020-08-31 17:51:58 PDT
Created attachment 407641 [details]
Patch
Comment 3 John Wilander 2020-09-01 08:29:53 PDT
The mac-debug-wk1 bot seems to be in bad shape, exiting testing early.
Comment 4 Kate Cheney 2020-09-01 09:12:26 PDT
Comment on attachment 407641 [details]
Patch

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

LGTM, it is one of those patches where the testing is far more complicated than the change!

> LayoutTests/http/tests/storageAccess/request-and-grant-access-cross-origin-sandboxed-nested-iframe-database.html:42
> +            testRunner.setStatisticsShouldBlockThirdPartyCookies(false, function() {

I believe this is set to false in WKWebsiteDataStoreStatisticsResetToConsistentState(), which is called between every test, so it should not be needed here.

> LayoutTests/http/tests/storageAccess/request-and-grant-access-cross-origin-sandboxed-nested-iframe.html:42
> +            testRunner.setStatisticsShouldBlockThirdPartyCookies(false, function() {

Ditto, this can just be setEnableFeature(false, finishJSTest);
Comment 5 John Wilander 2020-09-01 11:33:04 PDT
(In reply to katherine_cheney from comment #4)
> Comment on attachment 407641 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=407641&action=review
> 
> LGTM, it is one of those patches where the testing is far more complicated
> than the change!

So true! But satisfying to make the change and immediately getting a failed test case.

> > LayoutTests/http/tests/storageAccess/request-and-grant-access-cross-origin-sandboxed-nested-iframe-database.html:42
> > +            testRunner.setStatisticsShouldBlockThirdPartyCookies(false, function() {
> 
> I believe this is set to false in
> WKWebsiteDataStoreStatisticsResetToConsistentState(), which is called
> between every test, so it should not be needed here.

Oh, I'll confirm and fix.

> > LayoutTests/http/tests/storageAccess/request-and-grant-access-cross-origin-sandboxed-nested-iframe.html:42
> > +            testRunner.setStatisticsShouldBlockThirdPartyCookies(false, function() {
> 
> Ditto, this can just be setEnableFeature(false, finishJSTest);

Ditto.

Thanks, Kate!
Comment 6 John Wilander 2020-09-01 13:14:01 PDT
Created attachment 407708 [details]
Patch
Comment 7 John Wilander 2020-09-02 11:46:34 PDT
Comment on attachment 407708 [details]
Patch

Thanks, Alex!
Comment 8 EWS 2020-09-02 12:19:58 PDT
Committed r266479: <https://trac.webkit.org/changeset/266479>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 407708 [details].
Comment 9 John Wilander 2020-09-02 13:00:08 PDT
*** Bug 205370 has been marked as a duplicate of this bug. ***