Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 2173fe1250ad9034b35bac7d1495e7ae2fdcacdc https://github.com/WebKit/WebKit/commit/2173fe1250ad9034b35bac7d1495e7ae2fdcacdc Author: Sihui Liu <sihui_...@apple.com> Date: 2024-02-16 (Fri, 16 Feb 2024)
Changed paths: M LayoutTests/http/tests/storageAccess/request-throw-exception-on-grant-until-reload.html M LayoutTests/http/tests/storageAccess/resources/request-throw-exception-on-grant-until-reload-iframe.html M Source/WebCore/dom/DocumentStorageAccess.cpp M Source/WebCore/page/LocalFrame.cpp M Source/WebCore/page/LocalFrame.h Log Message: ----------- Skip user activation check in requestStorageAccess if frame ever gets NoModificationAllowedError https://bugs.webkit.org/show_bug.cgi?id=269557 Reviewed by Alex Christensen. If an iframe gets NoModificationAllowedError on requestStorageAccess, it means the request is granted but iframe needs to reload to get the access. However, after reloading, the iframe would lose user activation, which stops it from invoking requestStorageAccess again (Storage Access API requires user activation). To solve this, frame now stores user activation for domains that ever get NoModificationAllowedError. If document does not have active user activation, but its domain has user activation based on frame's records, then we will not reject the storage access request. Updated test: http/tests/storageAccess/request-throw-exception-on-grant-until-reload.html. The test is modified to invoke requestStorageAccess automatically (without another click) after reload. * LayoutTests/http/tests/storageAccess/request-throw-exception-on-grant-until-reload.html: * LayoutTests/http/tests/storageAccess/resources/request-throw-exception-on-grant-until-reload-iframe.html: * Source/WebCore/dom/DocumentStorageAccess.cpp: (WebCore::DocumentStorageAccess::requestStorageAccessQuickCheck): (WebCore::DocumentStorageAccess::requestStorageAccess): * Source/WebCore/page/LocalFrame.cpp: (WebCore::LocalFrame::storageAccessExceptionReceivedForDomain): (WebCore::LocalFrame::requestSkipUserActivationCheckForStorageAccess): * Source/WebCore/page/LocalFrame.h: Canonical link: https://commits.webkit.org/274887@main To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes