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 | ||||||||||
Attachments: |
|
Description
John Wilander
2020-06-19 16:44:56 PDT
Correction: We should add the capability to call the API *on their behalf*. Created attachment 402357 [details]
Patch
Created attachment 402520 [details]
Patch
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. (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? Created attachment 402526 [details]
Patch
Waiting for EWS to make sure I fixed the Windows build issue. Committed r263383: <https://trac.webkit.org/changeset/263383> All reviewed patches have been landed. Closing bug and clearing flags on attachment 402526 [details]. 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. |