[webkit-changes] [WebKit/WebKit] f93c85: Consistently support storing multiple subresource ...

Matthew Finkel noreply at github.com
Sun Mar 10 09:38:48 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f93c856c879e9f46a2d8e2de3cdbc671769069b2
      https://github.com/WebKit/WebKit/commit/f93c856c879e9f46a2d8e2de3cdbc671769069b2
  Author: Matthew Finkel <sysrqb at apple.com>
  Date:   2024-03-10 (Sun, 10 Mar 2024)

  Changed paths:
    M Source/WebCore/loader/ResourceLoadObserver.h
    M Source/WebCore/page/Quirks.cpp
    M Source/WebCore/platform/network/NetworkStorageSession.cpp
    M Source/WebCore/platform/network/NetworkStorageSession.h
    M Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsStore.cpp
    M Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsStore.h
    M Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp
    M Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h
    M Source/WebKit/Shared/WebProcessDataStoreParameters.h
    M Source/WebKit/Shared/WebProcessDataStoreParameters.serialization.in
    M Source/WebKit/UIProcess/API/Cocoa/WKUIDelegatePrivate.h
    M Source/WebKit/UIProcess/Cocoa/UIDelegate.h
    M Source/WebKit/UIProcess/Cocoa/UIDelegate.mm
    M Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp
    M Source/WebKit/UIProcess/Network/NetworkProcessProxy.h
    M Source/WebKit/UIProcess/Network/NetworkProcessProxy.messages.in
    M Source/WebKit/UIProcess/WebProcessPool.cpp
    M Source/WebKit/UIProcess/WebProcessPool.h
    M Source/WebKit/WebProcess/WebCoreSupport/WebResourceLoadObserver.cpp
    M Source/WebKit/WebProcess/WebCoreSupport/WebResourceLoadObserver.h
    M Source/WebKit/WebProcess/WebPage/WebPage.cpp
    M Source/WebKit/WebProcess/WebPage/WebPage.h
    M Source/WebKit/WebProcess/WebProcess.cpp
    M Source/WebKit/WebProcess/WebProcess.h
    M Source/WebKit/WebProcess/WebProcess.messages.in
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm
    M Tools/TestWebKitAPI/cocoa/TestUIDelegate.h
    M Tools/TestWebKitAPI/cocoa/TestUIDelegate.mm

  Log Message:
  -----------
  Consistently support storing multiple subresource frames when storage access is granted
https://bugs.webkit.org/show_bug.cgi?id=269965
rdar://123485237

Reviewed by Sihui Liu.

Currently, some parts of ResourceLoadStatistics supports multiple subframe
domains for storing granted storage access, but others only support storing a
single domain. This change improves the consistency by storing a list of
subframe domains in a vector. I don't expect that the set of subframe domains
should be large, so iterating over a vector is probably more efficient than
using a HashSet.

Adds a new test that covers behavior.

* Source/WebCore/loader/ResourceLoadObserver.h:
(WebCore::ResourceLoadObserver::setDomainsWithCrossPageStorageAccess):
* Source/WebCore/page/Quirks.cpp:
(WebCore::Quirks::requestStorageAccessAndHandleClick const):
* Source/WebCore/platform/network/NetworkStorageSession.cpp:
(WebCore::NetworkStorageSession::setDomainsWithCrossPageStorageAccess):
(WebCore::NetworkStorageSession::hasStorageAccess const):
* Source/WebCore/platform/network/NetworkStorageSession.h:
* Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsStore.cpp:
(WebKit::ResourceLoadStatisticsStore::domainsWithStorageAccess const):
* Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsStore.h:
* Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
(WebKit::WebResourceLoadStatisticsStore::callUpdatePrevalentDomainsToBlockCookiesForHandler):
* Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
* Source/WebKit/Shared/WebProcessDataStoreParameters.h:
* Source/WebKit/Shared/WebProcessDataStoreParameters.serialization.in:
* Source/WebKit/UIProcess/API/APIUIClient.h:
(API::UIClient::requestStorageAccessConfirm):
* Source/WebKit/UIProcess/API/C/WKPage.cpp:
(WKPageSetPageUIClient):
* Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _setShouldDirectlyCallRequestStorageAccessConfirmDelegateForTesting:]):
* Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h:
* Source/WebKit/UIProcess/API/glib/WebKitUIClient.cpp:
* Source/WebKit/UIProcess/Cocoa/UIDelegate.h:
* Source/WebKit/UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::UIClient::requestStorageAccessConfirm):
* Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::setDomainsWithCrossPageStorageAccess):
* Source/WebKit/UIProcess/Network/NetworkProcessProxy.h:
* Source/WebKit/UIProcess/Network/NetworkProcessProxy.messages.in:
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::requestStorageAccessConfirm):
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::setDomainsWithCrossPageStorageAccess):
* Source/WebKit/UIProcess/WebProcessPool.h:
* Source/WebKit/WebProcess/WebCoreSupport/WebResourceLoadObserver.cpp:
(WebKit::WebResourceLoadObserver::setDomainsWithCrossPageStorageAccess):
* Source/WebKit/WebProcess/WebCoreSupport/WebResourceLoadObserver.h:
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::addDomainWithPageLevelStorageAccess):
(WebKit::WebPage::hasPageLevelStorageAccess const):
* Source/WebKit/WebProcess/WebPage/WebPage.h:
* Source/WebKit/WebProcess/WebProcess.cpp:
(WebKit::WebProcess::setDomainsWithCrossPageStorageAccess):
* Source/WebKit/WebProcess/WebProcess.h:
* Source/WebKit/WebProcess/WebProcess.messages.in:
* Tools/TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm:
(TEST):
* Tools/TestWebKitAPI/cocoa/TestUIDelegate.h:
* Tools/TestWebKitAPI/cocoa/TestUIDelegate.mm:
(-[TestUIDelegate _webView:requestStorageAccessPanelForDomain:underCurrentDomain:completionHandler:]):

Canonical link: https://commits.webkit.org/275890@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