Bug 213418

Summary: Storage Access API: Add the capability to call the Storage Access API as a quirk, on behalf of websites that should be doing it themselves
Product: WebKit Reporter: John Wilander <wilander>
Component: WebKit Misc.Assignee: John Wilander <wilander>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, beidson, bfulgham, cdumez, cmarcelo, esprehn+autocc, ews-watchlist, ggaren, japhet, kangil.han, sam, simon.fraser, thorton, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 279581    
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

John Wilander
Reported 2020-06-19 16:44:56 PDT
There are websites and embedded content that should be calling the Storage Access API but currently are not. We should add the capability to call the API.
Attachments
Patch (46.56 KB, patch)
2020-06-19 17:24 PDT, John Wilander
no flags
Patch (46.67 KB, patch)
2020-06-22 16:40 PDT, John Wilander
no flags
Patch (46.98 KB, patch)
2020-06-22 19:12 PDT, John Wilander
no flags
Radar WebKit Bug Importer
Comment 1 2020-06-19 16:45:24 PDT
John Wilander
Comment 2 2020-06-19 16:45:58 PDT
Correction: We should add the capability to call the API *on their behalf*.
John Wilander
Comment 3 2020-06-19 17:24:35 PDT
John Wilander
Comment 4 2020-06-22 16:40:20 PDT
Alex Christensen
Comment 5 2020-06-22 16:47:37 PDT
Comment on attachment 402520 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=402520&action=review This seems ok to me. > Source/WebCore/dom/DocumentStorageAccess.cpp:111 > + // The existence of a frame and page has been checked in requestStorageAccessQuickCheck(). This might be true now, but it might not be true with future use of this code. I think it's a good idea to leave the null checks in place, maybe with assert_not_reached.
John Wilander
Comment 6 2020-06-22 18:55:49 PDT
(In reply to Alex Christensen from comment #5) > Comment on attachment 402520 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=402520&action=review > > This seems ok to me. Thanks for the review! > > Source/WebCore/dom/DocumentStorageAccess.cpp:111 > > + // The existence of a frame and page has been checked in requestStorageAccessQuickCheck(). > > This might be true now, but it might not be true with future use of this > code. I think it's a good idea to leave the null checks in place, maybe > with assert_not_reached. Right now I RELEASE_ASSERT which should force us to find the problem. Would you prefer an early return with just a debug assert?
John Wilander
Comment 7 2020-06-22 19:12:38 PDT
John Wilander
Comment 8 2020-06-22 19:13:25 PDT
Waiting for EWS to make sure I fixed the Windows build issue.
EWS
Comment 9 2020-06-22 21:13:28 PDT
Committed r263383: <https://trac.webkit.org/changeset/263383> All reviewed patches have been landed. Closing bug and clearing flags on attachment 402526 [details].
Simon Fraser (smfr)
Comment 10 2020-07-16 14:30:43 PDT
Comment on attachment 402526 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=402526&action=review > Source/WebCore/dom/Element.cpp:366 > + if (hasClass() && Quirks::StorageAccessResult::ShouldCancelEvent == document().quirks().triggerOptionalStorageAccessQuirk(eventType, classNames())) > + return false; This is such a weird place to add a quirk.
Note You need to log in before you can comment on or make changes to this bug.