-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
21 changed files
with
199 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.