[webkit-changes] [WebKit/WebKit] 69d1d3: Trigger Storage Access API prompt quirk only on tr...
Matthew Finkel
noreply at github.com
Fri Mar 15 05:23:10 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 69d1d3985fd03d3adfe9ff9dd01d0a358dfc3a37
https://github.com/WebKit/WebKit/commit/69d1d3985fd03d3adfe9ff9dd01d0a358dfc3a37
Author: Matthew Finkel <sysrqb at apple.com>
Date: 2024-03-15 (Fri, 15 Mar 2024)
Changed paths:
M Source/WebCore/PAL/pal/cocoa/WebPrivacySoftLink.h
M Source/WebCore/PAL/pal/cocoa/WebPrivacySoftLink.mm
M Source/WebCore/PAL/pal/spi/cocoa/WebPrivacySPI.h
M Source/WebCore/platform/network/NetworkStorageSession.cpp
M Source/WebCore/platform/network/NetworkStorageSession.h
M Source/WebCore/platform/network/OrganizationStorageAccessPromptQuirk.h
M Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsStore.cpp
M Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp
M Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h
M Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in
M Source/WebKit/Platform/cocoa/WebPrivacyHelpers.mm
M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
M Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm
M Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h
M Source/WebKit/UIProcess/Cocoa/UIDelegate.mm
M Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
M Source/WebKit/UIProcess/WebProcessPool.cpp
M Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp
M Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h
M Source/WebKit/WebProcess/WebCoreSupport/WebLocalFrameLoaderClient.cpp
M Tools/TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm
Log Message:
-----------
Trigger Storage Access API prompt quirk only on triggering pages
https://bugs.webkit.org/show_bug.cgi?id=270204
rdar://problem/123727259
Reviewed by Wenson Hsieh.
We currently trigger the quirk on any page that matches the quirk's top-frame
site. This broad matching behavior can result in excessive and incorrect
prompting. This change introduces a notion of "triggering pages" which define
the exact pages where the quirk should be used. We can extend this to support
globs in the future.
Covered by existing API tests and a new one.
* Source/WebCore/PAL/pal/cocoa/WebPrivacySoftLink.h:
* Source/WebCore/PAL/pal/cocoa/WebPrivacySoftLink.mm:
Fix a typo and add a missing class
* Source/WebCore/PAL/pal/spi/cocoa/WebPrivacySPI.h:
* Source/WebCore/platform/network/NetworkStorageSession.cpp:
(WebCore::NetworkStorageSession::storageAccessQuirkForTopFrameDomain):
(WebCore::NetworkStorageSession::storageAccessQuirkForDomainPair):
* Source/WebCore/platform/network/NetworkStorageSession.h:
* Source/WebCore/platform/network/OrganizationStorageAccessPromptQuirk.h:
(WebCore::OrganizationStorageAccessPromptQuirk::OrganizationStorageAccessPromptQuirk):
* Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsStore.cpp:
(WebKit::ResourceLoadStatisticsStore::grantStorageAccess):
* Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::storageAccessQuirkForTopFrameDomain):
* Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h:
* Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in:
* Source/WebKit/Platform/cocoa/WebPrivacyHelpers.mm:
(WebKit::StorageAccessPromptQuirkController::setCachedQuirks):
(WebKit::quirkDomainsDictToMap):
(WebKit::quirkPagesArrayToVector):
(WebKit::StorageAccessPromptQuirkController::updateQuirks):
(WebKit::domainPairingsDictToMap): Deleted.
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:
* Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
(-[WKWebsiteDataStore _setStorageAccessPromptQuirkForTesting:withSubFrameDomains:withTriggerPages:completionHandler:]):
(-[WKWebsiteDataStore _setStorageAccessPromptQuirkForTesting:withSubFrameDomains:completionHandler:]): Deleted.
* Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
* Source/WebKit/UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::UIClient::requestStorageAccessConfirm):
* Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
* Source/WebKit/UIProcess/WebProcessPool.cpp:
* Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::setStorageAccessPromptQuirkForTesting):
* Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h:
* Source/WebKit/WebProcess/WebCoreSupport/WebLocalFrameLoaderClient.cpp:
(WebKit::WebLocalFrameLoaderClient::loadStorageAccessQuirksIfNeeded):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm:
(TEST):
Canonical link: https://commits.webkit.org/276151@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list