Diff
Modified: trunk/LayoutTests/ChangeLog (258420 => 258421)
--- trunk/LayoutTests/ChangeLog 2020-03-13 19:33:39 UTC (rev 258420)
+++ trunk/LayoutTests/ChangeLog 2020-03-13 19:43:43 UTC (rev 258421)
@@ -1,3 +1,27 @@
+2020-03-13 Kate Cheney <katherine_che...@apple.com>
+
+ Report all third party loads on a per-page basis
+ https://bugs.webkit.org/show_bug.cgi?id=209032
+ <rdar://problem/60397323>
+
+ Reviewed by Chris Dumez.
+
+ Now that we report all loaded third party domains, we no longer need
+ ITP to test this call. We can eliminate the dual testing for
+ memory/database setup and any logic related to setting a resource
+ as prevalent.
+
+ * http/tests/resourceLoadStatistics/loaded-registrable-domains-get-reported-expected.txt: Copied from LayoutTests/http/tests/websocket/web-socket-loads-captured-in-per-page-domains-expected.txt.
+ * http/tests/resourceLoadStatistics/loaded-registrable-domains-get-reported.html: Added.
+ * http/tests/resourceLoadStatistics/prevalent-domains-per-page-database-expected.txt: Removed.
+ * http/tests/resourceLoadStatistics/prevalent-domains-per-page-database.html: Removed.
+ * http/tests/resourceLoadStatistics/prevalent-domains-per-page.html: Removed.
+ * http/tests/websocket/web-socket-loads-captured-in-per-page-domains-expected.txt:
+ * http/tests/websocket/web-socket-loads-captured-in-per-page-domains.html:
+ * platform/ios/TestExpectations:
+ Since this test no longer uses UIHelper.activateAt, it can be
+ unskipped in iOS
+
2020-03-13 Jason Lawrence <lawrenc...@apple.com>
[ Mac Debug ] http/tests/css/shared-stylesheet-mutation-preconstruct.html is flaky failing.
Copied: trunk/LayoutTests/http/tests/resourceLoadStatistics/loaded-registrable-domains-get-reported-expected.txt (from rev 258420, trunk/LayoutTests/http/tests/websocket/web-socket-loads-captured-in-per-page-domains-expected.txt) (0 => 258421)
--- trunk/LayoutTests/http/tests/resourceLoadStatistics/loaded-registrable-domains-get-reported-expected.txt (rev 0)
+++ trunk/LayoutTests/http/tests/resourceLoadStatistics/loaded-registrable-domains-get-reported-expected.txt 2020-03-13 19:43:43 UTC (rev 258421)
@@ -0,0 +1,10 @@
+Tests that a iframe gets reported as a loaded third party domain.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS Loaded domain was successfully captured.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/http/tests/resourceLoadStatistics/loaded-registrable-domains-get-reported.html (0 => 258421)
--- trunk/LayoutTests/http/tests/resourceLoadStatistics/loaded-registrable-domains-get-reported.html (rev 0)
+++ trunk/LayoutTests/http/tests/resourceLoadStatistics/loaded-registrable-domains-get-reported.html 2020-03-13 19:43:43 UTC (rev 258421)
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <script src=""
+ <script src=""
+ <script src=""
+ <script>
+ description("Tests that a iframe gets reported as a loaded third party domain.");
+ jsTestIsAsync = true;
+
+ function askForLoadedThirdPartyDomains() {
+ testRunner.loadedThirdPartyDomains(function (arrayOfDomains) {
+ if (arrayOfDomains.length == 0) {
+ askForLoadedThirdPartyDomains();
+ return;
+ }
+ if (arrayOfDomains.includes("localhost"))
+ testPassed("Loaded domain was successfully captured.");
+ else
+ testFailed("Loaded domain was not successfully captured.");
+ setEnableFeature(false, finishJSTest);
+ });
+ }
+ </script>
+</head>
+<body>
+<iframe _onload_='askForLoadedThirdPartyDomains()' src=""
+</iframe>
+</body>
+</html>
Deleted: trunk/LayoutTests/http/tests/resourceLoadStatistics/prevalent-domains-per-page-database-expected.txt (258420 => 258421)
--- trunk/LayoutTests/http/tests/resourceLoadStatistics/prevalent-domains-per-page-database-expected.txt 2020-03-13 19:33:39 UTC (rev 258420)
+++ trunk/LayoutTests/http/tests/resourceLoadStatistics/prevalent-domains-per-page-database-expected.txt 2020-03-13 19:43:43 UTC (rev 258421)
@@ -1,10 +0,0 @@
-Tests that a iframe from a prevalent domain will be reported as prevalent under this page.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS Domain was successfully marked prevalent.
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
Deleted: trunk/LayoutTests/http/tests/resourceLoadStatistics/prevalent-domains-per-page-database.html (258420 => 258421)
--- trunk/LayoutTests/http/tests/resourceLoadStatistics/prevalent-domains-per-page-database.html 2020-03-13 19:33:39 UTC (rev 258420)
+++ trunk/LayoutTests/http/tests/resourceLoadStatistics/prevalent-domains-per-page-database.html 2020-03-13 19:43:43 UTC (rev 258421)
@@ -1,74 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <script src=""
- <script src=""
- <script src=""
- <script>
- description("Tests that a iframe from a prevalent domain will be reported as prevalent under this page.");
- jsTestIsAsync = true;
-
- function finishTest() {
- setEnableFeature(false, finishJSTest);
- }
-
- const iframeID = "iFrameFromPrevalentDomain";
- function askForPrevalentResources() {
- testRunner.getPrevalentDomains(function (arrayOfDomains) {
- var passed = true;
- for (var i = 0; i < arrayOfDomains.length; ++i) {
- if (arrayOfDomains[i] === "localhost") {
- passed = true;
- break;
- }
- }
- if (passed)
- testPassed("Domain was successfully marked prevalent.");
- else
- testFailed("Domain was not successfully marked prevalent.");
- finishTest();
- });
- }
-
- function activateElement(elementId) {
- var element = document.getElementById(elementId);
- var centerX = element.offsetLeft + element.offsetWidth / 2;
- var centerY = element.offsetTop + element.offsetHeight / 2;
- UIHelper.activateAt(centerX, centerY).then(
- function () { },
- function () {
- testFailed("Promise rejected.");
- finishTest();
- }
- );
- askForPrevalentResources();
- }
-
- function runTest() {
- if (document.location.hash !== "#elementActivated") {
- document.location.hash = "elementActivated";
- activateElement(iframeID);
- }
- }
-
- const hostUnderTest = "localhost:8000";
- const statisticsUrl = "http://" + hostUnderTest;
-
- testRunner.setUseITPDatabase(true);
- setEnableFeature(true, function() {
- testRunner.setStatisticsPrevalentResource(statisticsUrl, true, function() {
- if (!testRunner.isStatisticsPrevalentResource(statisticsUrl))
- testFailed("Host did not get set as prevalent resource.");
-
- let iframeElement = document.createElement("iframe");
- iframeElement._onload_ = runTest;
- iframeElement.id = "iFrameFromPrevalentDomain";
- iframeElement.src = ""
- document.body.appendChild(iframeElement);
- });
- });
- </script>
-</head>
-<body>
-</body>
-</html>
Deleted: trunk/LayoutTests/http/tests/resourceLoadStatistics/prevalent-domains-per-page.html (258420 => 258421)
--- trunk/LayoutTests/http/tests/resourceLoadStatistics/prevalent-domains-per-page.html 2020-03-13 19:33:39 UTC (rev 258420)
+++ trunk/LayoutTests/http/tests/resourceLoadStatistics/prevalent-domains-per-page.html 2020-03-13 19:43:43 UTC (rev 258421)
@@ -1,73 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <script src=""
- <script src=""
- <script src=""
- <script>
- description("Tests that a iframe from a prevalent domain will be reported as prevalent under this page.");
- jsTestIsAsync = true;
-
- function finishTest() {
- setEnableFeature(false, finishJSTest);
- }
-
- const iframeID = "iFrameFromPrevalentDomain";
- function askForPrevalentResources() {
- testRunner.getPrevalentDomains(function (arrayOfDomains) {
- var passed = false;
- for (var i = 0; i < arrayOfDomains.length; ++i) {
- if (arrayOfDomains[i] === "localhost") {
- passed = true;
- break;
- }
- }
- if (passed)
- testPassed("Domain was successfully marked prevalent.");
- else
- testFailed("Domain was not successfully marked prevalent.");
- finishTest();
- });
- }
-
- function activateElement(elementId) {
- var element = document.getElementById(elementId);
- var centerX = element.offsetLeft + element.offsetWidth / 2;
- var centerY = element.offsetTop + element.offsetHeight / 2;
- UIHelper.activateAt(centerX, centerY).then(
- function () { },
- function () {
- testFailed("Promise rejected.");
- finishTest();
- }
- );
- askForPrevalentResources();
- }
-
- function runTest() {
- if (document.location.hash !== "#elementActivated") {
- document.location.hash = "elementActivated";
- activateElement(iframeID);
- }
- }
-
- const hostUnderTest = "localhost:8000";
- const statisticsUrl = "http://" + hostUnderTest;
-
- setEnableFeature(true, function() {
- testRunner.setStatisticsPrevalentResource(statisticsUrl, true, function() {
- if (!testRunner.isStatisticsPrevalentResource(statisticsUrl))
- testFailed("Host did not get set as prevalent resource.");
-
- let iframeElement = document.createElement("iframe");
- iframeElement._onload_ = runTest;
- iframeElement.id = "iFrameFromPrevalentDomain";
- iframeElement.src = ""
- document.body.appendChild(iframeElement);
- });
- });
- </script>
-</head>
-<body>
-</body>
-</html>
Modified: trunk/LayoutTests/http/tests/websocket/web-socket-loads-captured-in-per-page-domains-expected.txt (258420 => 258421)
--- trunk/LayoutTests/http/tests/websocket/web-socket-loads-captured-in-per-page-domains-expected.txt 2020-03-13 19:33:39 UTC (rev 258420)
+++ trunk/LayoutTests/http/tests/websocket/web-socket-loads-captured-in-per-page-domains-expected.txt 2020-03-13 19:43:43 UTC (rev 258421)
@@ -1,9 +1,9 @@
-Ensure web socket loads are captured by per-page prevalent domain logging.
+Ensure web socket loads are reported as loaded third party domains.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-PASS Domain was successfully marked prevalent.
+PASS Loaded domain was successfully captured.
PASS successfullyParsed is true
TEST COMPLETE
Modified: trunk/LayoutTests/http/tests/websocket/web-socket-loads-captured-in-per-page-domains.html (258420 => 258421)
--- trunk/LayoutTests/http/tests/websocket/web-socket-loads-captured-in-per-page-domains.html 2020-03-13 19:33:39 UTC (rev 258420)
+++ trunk/LayoutTests/http/tests/websocket/web-socket-loads-captured-in-per-page-domains.html 2020-03-13 19:43:43 UTC (rev 258421)
@@ -5,7 +5,7 @@
</head>
<body _onload_="runTest()">
<script>
- description('Ensure web socket loads are captured by per-page prevalent domain logging.');
+ description('Ensure web socket loads are reported as loaded third party domains.');
window.jsTestIsAsync = true;
@@ -12,27 +12,23 @@
if (window.testRunner)
testRunner.setAllowsAnySSLCertificate(true);
- function askForPrevalentResources() {
- testRunner.getPrevalentDomains(function (arrayOfDomains) {
+ function askForLoadedThirdPartyDomains() {
+ testRunner.loadedThirdPartyDomains(function (arrayOfDomains) {
if (arrayOfDomains.length == 0) {
- askForPrevalentResources();
+ askForLoadedThirdPartyDomains();
return;
}
if (arrayOfDomains.includes("localhost"))
- testPassed("Domain was successfully marked prevalent.");
+ testPassed("Loaded domain was successfully captured.");
else
- testFailed("Domain was not successfully marked prevalent.");
+ testFailed("Loaded domain was not successfully captured.");
setEnableFeature(false, finishJSTest);
});
}
function runTest() {
- setEnableFeature(true, function() {
- testRunner.setStatisticsPrevalentResource("http://localhost", true, function () {
- new WebSocket('ws://localhost:8880/websocket/tests/hybi/simple');
- setTimeout(askForPrevalentResources, 0);
- });
- });
+ new WebSocket('ws://localhost:8880/websocket/tests/hybi/simple');
+ setTimeout(askForLoadedThirdPartyDomains, 0);
}
</script>
<script src=""
Modified: trunk/LayoutTests/platform/ios/TestExpectations (258420 => 258421)
--- trunk/LayoutTests/platform/ios/TestExpectations 2020-03-13 19:33:39 UTC (rev 258420)
+++ trunk/LayoutTests/platform/ios/TestExpectations 2020-03-13 19:43:43 UTC (rev 258421)
@@ -2727,8 +2727,6 @@
webkit.org/b/174120 http/tests/resourceLoadStatistics/user-interaction-in-cross-origin-sub-frame-database.html [ Skip ]
http/tests/resourceLoadStatistics/user-interaction-only-reported-once-within-short-period-of-time-database.html [ Skip ]
http/tests/resourceLoadStatistics/user-interaction-reported-after-website-data-removal-database.html [ Skip ]
-http/tests/resourceLoadStatistics/prevalent-domains-per-page-database.html [ Skip ]
-http/tests/resourceLoadStatistics/prevalent-domains-per-page.html [ Skip ]
# Skipped in WK2 expectations because cookie partitioning is only available in macOS High Sierra and iOS 11.
http/tests/resourceLoadStatistics/cookie-deletion.html [ Pass ]
http/tests/resourceLoadStatistics/cookies-with-and-without-user-interaction.html [ Pass ]
Modified: trunk/Source/WebCore/ChangeLog (258420 => 258421)
--- trunk/Source/WebCore/ChangeLog 2020-03-13 19:33:39 UTC (rev 258420)
+++ trunk/Source/WebCore/ChangeLog 2020-03-13 19:43:43 UTC (rev 258421)
@@ -1,3 +1,24 @@
+2020-03-13 Kate Cheney <katherine_che...@apple.com>
+
+ Report all third party loads on a per-page basis
+ https://bugs.webkit.org/show_bug.cgi?id=209032
+ <rdar://problem/60397323>
+
+ Reviewed by Chris Dumez.
+
+ Test: http/tests/resourceLoadStatistics/loaded-registrable-domains-get-reported.html
+
+ Rename this function to more accurately reflect its purpose of sending
+ loaded registrable domains to the WebPage.
+
+ * Modules/websockets/WebSocket.cpp:
+ (WebCore::WebSocket::connect):
+ * loader/FrameLoaderClient.h:
+ * loader/ResourceLoader.cpp:
+ (WebCore::ResourceLoader::willSendRequestInternal):
+ * loader/cache/CachedResourceLoader.cpp:
+ (WebCore::CachedResourceLoader::requestResource):
+
2020-03-13 Antti Koivisto <an...@apple.com>
Remove AffectedByDrag style flag
Modified: trunk/Source/WebCore/Modules/websockets/WebSocket.cpp (258420 => 258421)
--- trunk/Source/WebCore/Modules/websockets/WebSocket.cpp 2020-03-13 19:33:39 UTC (rev 258420)
+++ trunk/Source/WebCore/Modules/websockets/WebSocket.cpp 2020-03-13 19:43:43 UTC (rev 258421)
@@ -328,7 +328,7 @@
#if ENABLE(RESOURCE_LOAD_STATISTICS)
auto reportRegistrableDomain = [domain = RegistrableDomain(m_url).isolatedCopy()](auto& context) mutable {
if (auto* frame = downcast<Document>(context).frame())
- frame->loader().client().addLoadedRegistrableDomain(WTFMove(domain));
+ frame->loader().client().didLoadFromRegistrableDomain(WTFMove(domain));
};
if (is<Document>(context))
reportRegistrableDomain(context);
Modified: trunk/Source/WebCore/loader/FrameLoaderClient.h (258420 => 258421)
--- trunk/Source/WebCore/loader/FrameLoaderClient.h 2020-03-13 19:33:39 UTC (rev 258420)
+++ trunk/Source/WebCore/loader/FrameLoaderClient.h 2020-03-13 19:43:43 UTC (rev 258421)
@@ -374,7 +374,7 @@
#if ENABLE(RESOURCE_LOAD_STATISTICS)
virtual bool hasFrameSpecificStorageAccess() { return false; }
- virtual void addLoadedRegistrableDomain(RegistrableDomain&&) { }
+ virtual void didLoadFromRegistrableDomain(RegistrableDomain&&) { }
#endif
virtual AllowsContentJavaScript allowsContentJavaScriptFromMostRecentNavigation() const { return AllowsContentJavaScript::Yes; }
Modified: trunk/Source/WebCore/loader/ResourceLoader.cpp (258420 => 258421)
--- trunk/Source/WebCore/loader/ResourceLoader.cpp 2020-03-13 19:33:39 UTC (rev 258420)
+++ trunk/Source/WebCore/loader/ResourceLoader.cpp 2020-03-13 19:43:43 UTC (rev 258421)
@@ -416,7 +416,7 @@
if (isRedirect) {
platformStrategies()->loaderStrategy()->crossOriginRedirectReceived(this, request.url());
#if ENABLE(RESOURCE_LOAD_STATISTICS)
- frameLoader()->client().addLoadedRegistrableDomain(RegistrableDomain(request.url()));
+ frameLoader()->client().didLoadFromRegistrableDomain(RegistrableDomain(request.url()));
#endif
}
m_request = request;
Modified: trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp (258420 => 258421)
--- trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp 2020-03-13 19:33:39 UTC (rev 258420)
+++ trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp 2020-03-13 19:43:43 UTC (rev 258421)
@@ -993,7 +993,7 @@
ASSERT(resource->url() == url.string());
m_documentResources.set(resource->url(), resource);
#if ENABLE(RESOURCE_LOAD_STATISTICS)
- frame.loader().client().addLoadedRegistrableDomain(RegistrableDomain(resource->resourceRequest().url()));
+ frame.loader().client().didLoadFromRegistrableDomain(RegistrableDomain(resource->resourceRequest().url()));
#endif
return resource;
}
Modified: trunk/Source/WebKit/ChangeLog (258420 => 258421)
--- trunk/Source/WebKit/ChangeLog 2020-03-13 19:33:39 UTC (rev 258420)
+++ trunk/Source/WebKit/ChangeLog 2020-03-13 19:43:43 UTC (rev 258421)
@@ -1,3 +1,50 @@
+2020-03-13 Kate Cheney <katherine_che...@apple.com>
+
+ Report all third party loads on a per-page basis
+ https://bugs.webkit.org/show_bug.cgi?id=209032
+ <rdar://problem/60397323>
+
+ Reviewed by Chris Dumez.
+
+ Test: http/tests/resourceLoadStatistics/loaded-registrable-domains-get-reported.html
+
+ Removed IPC to the Network Process asking if a resource load is from
+ a prevalent domain. This now stores and sends all loaded registrable
+ domains. This patch is mostly updating naming to reflect this and
+ deleting the unnecessary code to communicate with the
+ ResourceLoadStatisticsStore.
+
+ * NetworkProcess/NetworkConnectionToWebProcess.cpp:
+ (WebKit::NetworkConnectionToWebProcess::requestStorageAccessUnderOpener):
+ (WebKit::NetworkConnectionToWebProcess::isPrevalentSubresourceLoad): Deleted.
+ * NetworkProcess/NetworkConnectionToWebProcess.h:
+ * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
+ * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
+ (-[WKWebsiteDataStore _loadedThirdPartyDomainsFor:completionHandler:]):
+ (-[WKWebsiteDataStore _clearLoadedThirdPartyDomainsFor:]):
+ (-[WKWebsiteDataStore _getPrevalentDomainsFor:completionHandler:]): Deleted.
+ (-[WKWebsiteDataStore _clearPrevalentDomainsFor:]): Deleted.
+ * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
+ * UIProcess/WebPageProxy.cpp:
+ * UIProcess/WebPageProxy.h:
+ * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
+ (WebKit::WebFrameLoaderClient::didLoadFromRegistrableDomain):
+ (WebKit::WebFrameLoaderClient::addLoadedRegistrableDomain): Deleted.
+ * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::didCommitLoad):
+ (WebKit::WebPage::didLoadFromRegistrableDomain):
+ Add a check that this is a third party by comparing the target domain
+ to the main frame domain.
+
+ (WebKit::WebPage::loadedThirdPartyDomains):
+ (WebKit::WebPage::clearLoadedThirdPartyDomains):
+ (WebKit::WebPage::addLoadedRegistrableDomain): Deleted.
+ (WebKit::WebPage::getPrevalentDomains): Deleted.
+ (WebKit::WebPage::clearPrevalentDomains): Deleted.
+ * WebProcess/WebPage/WebPage.h:
+ * WebProcess/WebPage/WebPage.messages.in:
+
2020-03-13 Brent Fulgham <bfulg...@apple.com>
Remove unused SmartMagnificationController Magnify message
Modified: trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp (258420 => 258421)
--- trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp 2020-03-13 19:33:39 UTC (rev 258420)
+++ trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp 2020-03-13 19:43:43 UTC (rev 258421)
@@ -865,17 +865,6 @@
resourceLoadStatistics->requestStorageAccessUnderOpener(WTFMove(domainInNeedOfStorageAccess), openerPageID, WTFMove(openerDomain));
}
}
-
-void NetworkConnectionToWebProcess::isPrevalentSubresourceLoad(RegistrableDomain&& domain, CompletionHandler<void(bool)>&& completionHandler)
-{
- if (auto* networkSession = this->networkSession()) {
- if (auto* resourceLoadStatistics = networkSession->resourceLoadStatistics()) {
- resourceLoadStatistics->isPrevalentResource(domain, WTFMove(completionHandler));
- return;
- }
- }
- completionHandler(false);
-}
#endif
void NetworkConnectionToWebProcess::addOriginAccessWhitelistEntry(const String& sourceOrigin, const String& destinationProtocol, const String& destinationHost, bool allowDestinationSubdomains)
Modified: trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h (258420 => 258421)
--- trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h 2020-03-13 19:33:39 UTC (rev 258420)
+++ trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h 2020-03-13 19:43:43 UTC (rev 258421)
@@ -266,7 +266,6 @@
void hasStorageAccess(const RegistrableDomain& subFrameDomain, const RegistrableDomain& topFrameDomain, WebCore::FrameIdentifier, WebCore::PageIdentifier, CompletionHandler<void(bool)>&&);
void requestStorageAccess(const RegistrableDomain& subFrameDomain, const RegistrableDomain& topFrameDomain, WebCore::FrameIdentifier, WebCore::PageIdentifier, WebPageProxyIdentifier, CompletionHandler<void(WebCore::StorageAccessWasGranted, WebCore::StorageAccessPromptWasShown)>&&);
void requestStorageAccessUnderOpener(WebCore::RegistrableDomain&& domainInNeedOfStorageAccess, WebCore::PageIdentifier openerPageID, WebCore::RegistrableDomain&& openerDomain);
- void isPrevalentSubresourceLoad(RegistrableDomain&&, CompletionHandler<void(bool)>&&);
#endif
void addOriginAccessWhitelistEntry(const String& sourceOrigin, const String& destinationProtocol, const String& destinationHost, bool allowDestinationSubdomains);
Modified: trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in (258420 => 258421)
--- trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in 2020-03-13 19:33:39 UTC (rev 258420)
+++ trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in 2020-03-13 19:43:43 UTC (rev 258421)
@@ -67,7 +67,6 @@
HasStorageAccess(WebCore::RegistrableDomain subFrameDomain, WebCore::RegistrableDomain topFrameDomain, WebCore::FrameIdentifier frameID, WebCore::PageIdentifier pageID) -> (bool hasStorageAccess) Async
RequestStorageAccess(WebCore::RegistrableDomain subFrameDomain, WebCore::RegistrableDomain topFrameDomain, WebCore::FrameIdentifier frameID, WebCore::PageIdentifier webPageID, WebKit::WebPageProxyIdentifier webPageProxyID) -> (enum:bool WebCore::StorageAccessWasGranted wasGranted, enum:bool WebCore::StorageAccessPromptWasShown promptWasShown) Async
RequestStorageAccessUnderOpener(WebCore::RegistrableDomain domainInNeedOfStorageAccess, WebCore::PageIdentifier openerPageID, WebCore::RegistrableDomain openerDomain)
- IsPrevalentSubresourceLoad(WebCore::RegistrableDomain domain) -> (bool isPrevalent) Async
#endif
AddOriginAccessWhitelistEntry(String sourceOrigin, String destinationProtocol, String destinationHost, bool allowDestinationSubdomains);
Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm (258420 => 258421)
--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm 2020-03-13 19:33:39 UTC (rev 258420)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm 2020-03-13 19:43:43 UTC (rev 258421)
@@ -390,7 +390,7 @@
WebKit::WebsiteDataStore::allowWebsiteDataRecordsForAllOrigins();
}
-- (void)_getPrevalentDomainsFor:(WKWebView *)webView completionHandler:(void (^)(NSArray<NSString *> *domains))completionHandler
+- (void)_loadedThirdPartyDomainsFor:(WKWebView *)webView completionHandler:(void (^)(NSArray<NSString *> *domains))completionHandler
{
#if ENABLE(RESOURCE_LOAD_STATISTICS)
if (!webView) {
@@ -404,8 +404,8 @@
return;
}
- webPageProxy->getPrevalentDomains([completionHandler = makeBlockPtr(completionHandler)] (Vector<WebCore::RegistrableDomain>&& prevalentDomains) {
- Vector<RefPtr<API::Object>> apiDomains = WTF::map(prevalentDomains, [](auto& domain) {
+ webPageProxy->loadedThirdPartyDomains([completionHandler = makeBlockPtr(completionHandler)] (Vector<WebCore::RegistrableDomain>&& loadedThirdPartyDomains) {
+ Vector<RefPtr<API::Object>> apiDomains = WTF::map(loadedThirdPartyDomains, [](auto& domain) {
return RefPtr<API::Object>(API::String::create(WTFMove(domain.string())));
});
completionHandler(wrapper(API::Array::create(WTFMove(apiDomains))));
@@ -415,7 +415,7 @@
#endif
}
-- (void)_clearPrevalentDomainsFor:(WKWebView *)webView
+- (void)_clearLoadedThirdPartyDomainsFor:(WKWebView *)webView
{
#if ENABLE(RESOURCE_LOAD_STATISTICS)
if (!webView)
@@ -425,7 +425,7 @@
if (!webPageProxy)
return;
- webPageProxy->clearPrevalentDomains();
+ webPageProxy->clearLoadedThirdPartyDomains();
#endif
}
Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h (258420 => 258421)
--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h 2020-03-13 19:33:39 UTC (rev 258420)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h 2020-03-13 19:43:43 UTC (rev 258421)
@@ -61,8 +61,8 @@
- (void)_setResourceLoadStatisticsTestingCallback:(nullable void (^)(WKWebsiteDataStore *, NSString *))callback WK_API_AVAILABLE(macos(10.13), ios(11.0));
- (void)_getAllStorageAccessEntriesFor:(WKWebView *)webView completionHandler:(void (^)(NSArray<NSString *> *domains))completionHandler WK_API_AVAILABLE(macos(10.14), ios(12.0));
-- (void)_getPrevalentDomainsFor:(WKWebView *)webView completionHandler:(void (^)(NSArray<NSString *> *domains))completionHandler WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));
-- (void)_clearPrevalentDomainsFor:(WKWebView *)webView WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));
+- (void)_loadedThirdPartyDomainsFor:(WKWebView *)webView completionHandler:(void (^)(NSArray<NSString *> *domains))completionHandler WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));
+- (void)_clearLoadedThirdPartyDomainsFor:(WKWebView *)webView WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));
- (void)_getWebViewCategoryFor:(WKWebView *)webView completionHandler:(void (^)(_WKWebViewCategory category))completionHandler WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));
+ (void)_allowWebsiteDataRecordsForAllOrigins WK_API_AVAILABLE(macos(10.13.4), ios(11.3));
- (bool)_hasRegisteredServiceWorker WK_API_AVAILABLE(macos(10.14), ios(12.0));
Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.cpp (258420 => 258421)
--- trunk/Source/WebKit/UIProcess/WebPageProxy.cpp 2020-03-13 19:33:39 UTC (rev 258420)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.cpp 2020-03-13 19:43:43 UTC (rev 258421)
@@ -9947,14 +9947,14 @@
}
#if ENABLE(RESOURCE_LOAD_STATISTICS)
-void WebPageProxy::getPrevalentDomains(CompletionHandler<void(Vector<RegistrableDomain>&&)>&& completionHandler)
+void WebPageProxy::loadedThirdPartyDomains(CompletionHandler<void(Vector<RegistrableDomain>&&)>&& completionHandler)
{
- sendWithAsyncReply(Messages::WebPage::GetPrevalentDomains(), WTFMove(completionHandler));
+ sendWithAsyncReply(Messages::WebPage::LoadedThirdPartyDomains(), WTFMove(completionHandler));
}
-void WebPageProxy::clearPrevalentDomains()
+void WebPageProxy::clearLoadedThirdPartyDomains()
{
- send(Messages::WebPage::ClearPrevalentDomains());
+ send(Messages::WebPage::ClearLoadedThirdPartyDomains());
}
#endif
Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.h (258420 => 258421)
--- trunk/Source/WebKit/UIProcess/WebPageProxy.h 2020-03-13 19:33:39 UTC (rev 258420)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.h 2020-03-13 19:43:43 UTC (rev 258421)
@@ -1567,8 +1567,8 @@
#if ENABLE(RESOURCE_LOAD_STATISTICS)
void requestStorageAccessConfirm(const WebCore::RegistrableDomain& subFrameDomain, const WebCore::RegistrableDomain& topFrameDomain, WebCore::FrameIdentifier, CompletionHandler<void(bool)>&&);
void didCommitCrossSiteLoadWithDataTransferFromPrevalentResource();
- void getPrevalentDomains(CompletionHandler<void(Vector<WebCore::RegistrableDomain>&&)>&&);
- void clearPrevalentDomains();
+ void loadedThirdPartyDomains(CompletionHandler<void(Vector<WebCore::RegistrableDomain>&&)>&&);
+ void clearLoadedThirdPartyDomains();
#endif
#if ENABLE(DEVICE_ORIENTATION)
Modified: trunk/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp (258420 => 258421)
--- trunk/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp 2020-03-13 19:33:39 UTC (rev 258420)
+++ trunk/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp 2020-03-13 19:43:43 UTC (rev 258421)
@@ -149,13 +149,13 @@
m_frameSpecificStorageAccessIdentifier = WTFMove(frameSpecificStorageAccessIdentifier);
}
-void WebFrameLoaderClient::addLoadedRegistrableDomain(RegistrableDomain&& domain)
+void WebFrameLoaderClient::didLoadFromRegistrableDomain(RegistrableDomain&& domain)
{
auto* webPage = m_frame->page();
if (!webPage)
return;
- webPage->addLoadedRegistrableDomain(WTFMove(domain));
+ webPage->didLoadFromRegistrableDomain(WTFMove(domain));
}
#endif
Modified: trunk/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.h (258420 => 258421)
--- trunk/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.h 2020-03-13 19:33:39 UTC (rev 258420)
+++ trunk/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.h 2020-03-13 19:43:43 UTC (rev 258421)
@@ -60,7 +60,7 @@
WebCore::PageIdentifier pageID;
};
void setHasFrameSpecificStorageAccess(FrameSpecificStorageAccessIdentifier&&);
- void addLoadedRegistrableDomain(WebCore::RegistrableDomain&&) final;
+ void didLoadFromRegistrableDomain(WebCore::RegistrableDomain&&) final;
#endif
WebCore::AllowsContentJavaScript allowsContentJavaScriptFromMostRecentNavigation() const final;
Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp (258420 => 258421)
--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp 2020-03-13 19:33:39 UTC (rev 258420)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp 2020-03-13 19:43:43 UTC (rev 258421)
@@ -5860,7 +5860,7 @@
return;
#if ENABLE(RESOURCE_LOAD_STATISTICS)
- clearPrevalentDomains();
+ clearLoadedThirdPartyDomains();
#endif
// If previous URL is invalid, then it's not a real page that's being navigated away from.
@@ -6697,26 +6697,20 @@
frame->document()->wasLoadedWithDataTransferFromPrevalentResource();
}
-void WebPage::addLoadedRegistrableDomain(RegistrableDomain&& domain)
+void WebPage::didLoadFromRegistrableDomain(RegistrableDomain&& targetDomain)
{
- auto addResult = m_loadedDomains.add(domain);
- if (addResult.isNewEntry) {
- WebProcess::singleton().ensureNetworkProcessConnection().connection().sendWithAsyncReply(Messages::NetworkConnectionToWebProcess::IsPrevalentSubresourceLoad(domain), [this, protectedThis = makeRef(*this), domain] (bool isPrevalent) {
- if (isPrevalent)
- m_prevalentDomains.add(domain);
- });
- }
+ if (targetDomain != RegistrableDomain(mainWebFrame()->url()))
+ m_loadedThirdPartyDomains.add(targetDomain);
}
-void WebPage::getPrevalentDomains(CompletionHandler<void(Vector<RegistrableDomain>)>&& completionHandler)
+void WebPage::loadedThirdPartyDomains(CompletionHandler<void(Vector<RegistrableDomain>)>&& completionHandler)
{
- completionHandler(copyToVector(m_prevalentDomains));
+ completionHandler(copyToVector(m_loadedThirdPartyDomains));
}
-void WebPage::clearPrevalentDomains()
+void WebPage::clearLoadedThirdPartyDomains()
{
- m_prevalentDomains.clear();
- m_loadedDomains.clear();
+ m_loadedThirdPartyDomains.clear();
}
#endif
Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.h (258420 => 258421)
--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.h 2020-03-13 19:33:39 UTC (rev 258420)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.h 2020-03-13 19:43:43 UTC (rev 258421)
@@ -1187,9 +1187,9 @@
bool hasPageLevelStorageAccess(const WebCore::RegistrableDomain& topLevelDomain, const WebCore::RegistrableDomain& resourceDomain) const;
void addDomainWithPageLevelStorageAccess(const WebCore::RegistrableDomain& topLevelDomain, const WebCore::RegistrableDomain& resourceDomain);
void wasLoadedWithDataTransferFromPrevalentResource();
- void addLoadedRegistrableDomain(WebCore::RegistrableDomain&&);
- void clearPrevalentDomains();
- void getPrevalentDomains(CompletionHandler<void(Vector<WebCore::RegistrableDomain>)>&&);
+ void didLoadFromRegistrableDomain(WebCore::RegistrableDomain&&);
+ void clearLoadedThirdPartyDomains();
+ void loadedThirdPartyDomains(CompletionHandler<void(Vector<WebCore::RegistrableDomain>)>&&);
#endif
#if ENABLE(DEVICE_ORIENTATION)
@@ -2063,8 +2063,7 @@
#if ENABLE(RESOURCE_LOAD_STATISTICS)
HashMap<WebCore::RegistrableDomain, WebCore::RegistrableDomain> m_domainsWithPageLevelStorageAccess;
- HashSet<WebCore::RegistrableDomain> m_loadedDomains;
- HashSet<WebCore::RegistrableDomain> m_prevalentDomains;
+ HashSet<WebCore::RegistrableDomain> m_loadedThirdPartyDomains;
#endif
String m_overriddenMediaType;
Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.messages.in (258420 => 258421)
--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.messages.in 2020-03-13 19:33:39 UTC (rev 258420)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.messages.in 2020-03-13 19:43:43 UTC (rev 258421)
@@ -577,8 +577,8 @@
#if ENABLE(RESOURCE_LOAD_STATISTICS)
WasLoadedWithDataTransferFromPrevalentResource()
- ClearPrevalentDomains()
- GetPrevalentDomains() -> (Vector<WebCore::RegistrableDomain> domains) Async
+ ClearLoadedThirdPartyDomains()
+ LoadedThirdPartyDomains() -> (Vector<WebCore::RegistrableDomain> domains) Async
#endif
#if USE(SYSTEM_PREVIEW)
Modified: trunk/Tools/ChangeLog (258420 => 258421)
--- trunk/Tools/ChangeLog 2020-03-13 19:33:39 UTC (rev 258420)
+++ trunk/Tools/ChangeLog 2020-03-13 19:43:43 UTC (rev 258421)
@@ -1,3 +1,41 @@
+2020-03-13 Kate Cheney <katherine_che...@apple.com>
+
+ Report all third party loads on a per-page basis
+ https://bugs.webkit.org/show_bug.cgi?id=209032
+ <rdar://problem/60397323>
+
+ Reviewed by Chris Dumez.
+
+ Mostly naming updates to reflect the change in use for this SPI call.
+ It now returns all loaded third party domains, not just prevalent ones.
+
+ * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
+ * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
+ (WTR::InjectedBundle::didReceiveMessageToPage):
+ * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+ (WTR::TestRunner::getLoadedThirdPartyDomains):
+ (WTR::TestRunner::callDidReceiveLoadedThirdPartyDomainsCallback):
+ (WTR::TestRunner::getPrevalentDomains): Deleted.
+ (WTR::TestRunner::callDidReceivePrevalentDomainsCallback): Deleted.
+ * WebKitTestRunner/InjectedBundle/TestRunner.h:
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::resetStateToConsistentValues):
+ (WTR::TestController::getLoadedThirdPartyDomains):
+ (WTR::TestController::clearLoadedThirdPartyDomains):
+ (WTR::TestController::getPrevalentDomains): Deleted.
+ (WTR::TestController::clearPrevalentDomains): Deleted.
+ * WebKitTestRunner/TestController.h:
+ * WebKitTestRunner/TestInvocation.cpp:
+ (WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
+ (WTR::TestInvocation::didReceiveLoadedThirdPartyDomains):
+ (WTR::TestInvocation::didReceivePrevalentDomains): Deleted.
+ * WebKitTestRunner/TestInvocation.h:
+ * WebKitTestRunner/cocoa/TestControllerCocoa.mm:
+ (WTR::TestController::getLoadedThirdPartyDomains):
+ (WTR::TestController::clearLoadedThirdPartyDomains):
+ (WTR::TestController::getPrevalentDomains): Deleted.
+ (WTR::TestController::clearPrevalentDomains): Deleted.
+
2020-03-13 Aakash Jain <aakash_j...@apple.com>
[ews] run FindModifiedChangeLogs early in the build
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl (258420 => 258421)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl 2020-03-13 19:33:39 UTC (rev 258420)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl 2020-03-13 19:43:43 UTC (rev 258421)
@@ -345,7 +345,7 @@
void setStatisticsShouldDowngradeReferrer(boolean value, object callback);
void setStatisticsShouldBlockThirdPartyCookies(boolean value, object callback, optional boolean onlyOnSitesWithoutUserInteraction);
void setStatisticsFirstPartyWebsiteDataRemovalMode(boolean value, object callback);
- void getPrevalentDomains(object callback);
+ void loadedThirdPartyDomains(object callback);
// Injected bundle form client.
void installTextDidChangeInTextFieldCallback(object callback);
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp (258420 => 258421)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp 2020-03-13 19:33:39 UTC (rev 258420)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp 2020-03-13 19:43:43 UTC (rev 258421)
@@ -415,7 +415,7 @@
return;
}
- if (WKStringIsEqualToUTF8CString(messageName, "CallDidReceivePrevalentDomains")) {
+ if (WKStringIsEqualToUTF8CString(messageName, "CallDidReceiveLoadedThirdPartyDomains")) {
ASSERT(messageBody);
ASSERT(WKGetTypeID(messageBody) == WKArrayGetTypeID());
@@ -429,7 +429,7 @@
domains.uncheckedAppend(toWTFString(static_cast<WKStringRef>(item)));
}
- m_testRunner->callDidReceivePrevalentDomainsCallback(WTFMove(domains));
+ m_testRunner->callDidReceiveLoadedThirdPartyDomainsCallback(WTFMove(domains));
return;
}
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp (258420 => 258421)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp 2020-03-13 19:33:39 UTC (rev 258420)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp 2020-03-13 19:43:43 UTC (rev 258421)
@@ -754,7 +754,7 @@
StatisticsDidSetShouldBlockThirdPartyCookiesCallbackID,
StatisticsDidSetFirstPartyWebsiteDataRemovalModeCallbackID,
AllStorageAccessEntriesCallbackID,
- GetPrevalentDomainsCallbackID,
+ LoadedThirdPartyDomainsCallbackID,
DidRemoveAllSessionCredentialsCallbackID,
GetApplicationManifestCallbackID,
TextDidChangeInTextFieldCallbackID,
@@ -2355,15 +2355,15 @@
callTestRunnerCallback(AllStorageAccessEntriesCallbackID, 1, &result);
}
-void TestRunner::getPrevalentDomains(JSValueRef callback)
+void TestRunner::loadedThirdPartyDomains(JSValueRef callback)
{
- cacheTestRunnerCallback(GetPrevalentDomainsCallbackID, callback);
+ cacheTestRunnerCallback(LoadedThirdPartyDomainsCallbackID, callback);
- WKRetainPtr<WKStringRef> messageName = adoptWK(WKStringCreateWithUTF8CString("GetPrevalentDomains"));
+ WKRetainPtr<WKStringRef> messageName = adoptWK(WKStringCreateWithUTF8CString("LoadedThirdPartyDomains"));
WKBundlePostMessage(InjectedBundle::singleton().bundle(), messageName.get(), nullptr);
}
-void TestRunner::callDidReceivePrevalentDomainsCallback(Vector<String>&& domains)
+void TestRunner::callDidReceiveLoadedThirdPartyDomainsCallback(Vector<String>&& domains)
{
WKBundleFrameRef mainFrame = WKBundlePageGetMainFrame(InjectedBundle::singleton().page()->page());
JSContextRef context = WKBundleFrameGetJavaScriptContext(mainFrame);
@@ -2384,7 +2384,7 @@
JSValueRef result = JSValueMakeFromJSONString(context, adopt(JSStringCreateWithUTF8CString(stringBuilder.toString().utf8().data())).get());
- callTestRunnerCallback(GetPrevalentDomainsCallbackID, 1, &result);
+ callTestRunnerCallback(LoadedThirdPartyDomainsCallbackID, 1, &result);
}
void TestRunner::addMockMediaDevice(JSStringRef persistentId, JSStringRef label, const char* type)
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h (258420 => 258421)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h 2020-03-13 19:33:39 UTC (rev 258420)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h 2020-03-13 19:43:43 UTC (rev 258421)
@@ -449,8 +449,8 @@
void statisticsCallDidSetFirstPartyWebsiteDataRemovalModeCallback();
void statisticsResetToConsistentState(JSValueRef completionHandler);
void statisticsCallDidResetToConsistentStateCallback();
- void getPrevalentDomains(JSValueRef callback);
- void callDidReceivePrevalentDomainsCallback(Vector<String>&& domains);
+ void loadedThirdPartyDomains(JSValueRef callback);
+ void callDidReceiveLoadedThirdPartyDomainsCallback(Vector<String>&& domains);
// Injected bundle form client.
void installTextDidChangeInTextFieldCallback(JSValueRef callback);
Modified: trunk/Tools/WebKitTestRunner/TestController.cpp (258420 => 258421)
--- trunk/Tools/WebKitTestRunner/TestController.cpp 2020-03-13 19:33:39 UTC (rev 258420)
+++ trunk/Tools/WebKitTestRunner/TestController.cpp 2020-03-13 19:43:43 UTC (rev 258421)
@@ -1126,7 +1126,7 @@
setAllowsAnySSLCertificate(true);
statisticsResetToConsistentState();
- clearPrevalentDomains();
+ clearLoadedThirdPartyDomains();
clearAdClickAttribution();
@@ -3130,11 +3130,11 @@
{
}
-void TestController::getPrevalentDomains()
+void TestController::loadedThirdPartyDomains()
{
}
-void TestController::clearPrevalentDomains()
+void TestController::clearLoadedThirdPartyDomains()
{
}
Modified: trunk/Tools/WebKitTestRunner/TestController.h (258420 => 258421)
--- trunk/Tools/WebKitTestRunner/TestController.h 2020-03-13 19:33:39 UTC (rev 258420)
+++ trunk/Tools/WebKitTestRunner/TestController.h 2020-03-13 19:43:43 UTC (rev 258421)
@@ -265,8 +265,8 @@
void statisticsResetToConsistentState();
void getAllStorageAccessEntries();
- void getPrevalentDomains();
- void clearPrevalentDomains();
+ void loadedThirdPartyDomains();
+ void clearLoadedThirdPartyDomains();
void getWebViewCategory();
void setInAppBrowserPrivacyEnabled(bool);
Modified: trunk/Tools/WebKitTestRunner/TestInvocation.cpp (258420 => 258421)
--- trunk/Tools/WebKitTestRunner/TestInvocation.cpp 2020-03-13 19:33:39 UTC (rev 258420)
+++ trunk/Tools/WebKitTestRunner/TestInvocation.cpp 2020-03-13 19:43:43 UTC (rev 258421)
@@ -820,8 +820,8 @@
}
#endif
- if (WKStringIsEqualToUTF8CString(messageName, "GetPrevalentDomains")) {
- TestController::singleton().getPrevalentDomains();
+ if (WKStringIsEqualToUTF8CString(messageName, "LoadedThirdPartyDomains")) {
+ TestController::singleton().loadedThirdPartyDomains();
return;
}
@@ -1970,9 +1970,9 @@
WKPagePostMessageToInjectedBundle(TestController::singleton().mainWebView()->page(), messageName.get(), messageBody.get());
}
-void TestInvocation::didReceivePrevalentDomains(Vector<String>&& domains)
+void TestInvocation::didReceiveLoadedThirdPartyDomains(Vector<String>&& domains)
{
- WKRetainPtr<WKStringRef> messageName = adoptWK(WKStringCreateWithUTF8CString("CallDidReceivePrevalentDomains"));
+ WKRetainPtr<WKStringRef> messageName = adoptWK(WKStringCreateWithUTF8CString("CallDidReceiveLoadedThirdPartyDomains"));
WKRetainPtr<WKMutableArrayRef> messageBody = adoptWK(WKMutableArrayCreate());
for (auto& domain : domains)
Modified: trunk/Tools/WebKitTestRunner/TestInvocation.h (258420 => 258421)
--- trunk/Tools/WebKitTestRunner/TestInvocation.h 2020-03-13 19:33:39 UTC (rev 258420)
+++ trunk/Tools/WebKitTestRunner/TestInvocation.h 2020-03-13 19:43:43 UTC (rev 258421)
@@ -86,7 +86,7 @@
void didSetVeryPrevalentResource();
void didSetHasHadUserInteraction();
void didReceiveAllStorageAccessEntries(Vector<String>& domains);
- void didReceivePrevalentDomains(Vector<String>&& domains);
+ void didReceiveLoadedThirdPartyDomains(Vector<String>&& domains);
void didReceiveWebViewCategory(String&);
void didSetInAppBrowserPrivacyEnabled();
Modified: trunk/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm (258420 => 258421)
--- trunk/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm 2020-03-13 19:33:39 UTC (rev 258420)
+++ trunk/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm 2020-03-13 19:43:43 UTC (rev 258421)
@@ -342,28 +342,28 @@
}];
}
-void TestController::getPrevalentDomains()
+void TestController::loadedThirdPartyDomains()
{
auto* parentView = mainWebView();
if (!parentView)
return;
- [globalWebViewConfiguration.websiteDataStore _getPrevalentDomainsFor:parentView->platformView() completionHandler:^(NSArray<NSString *> *nsDomains) {
+ [globalWebViewConfiguration.websiteDataStore _loadedThirdPartyDomainsFor:parentView->platformView() completionHandler:^(NSArray<NSString *> *nsDomains) {
Vector<String> domains;
domains.reserveInitialCapacity(nsDomains.count);
for (NSString *domain : nsDomains)
domains.uncheckedAppend(domain);
- m_currentInvocation->didReceivePrevalentDomains(WTFMove(domains));
+ m_currentInvocation->didReceiveLoadedThirdPartyDomains(WTFMove(domains));
}];
}
-void TestController::clearPrevalentDomains()
+void TestController::clearLoadedThirdPartyDomains()
{
auto* parentView = mainWebView();
if (!parentView)
return;
- [globalWebViewConfiguration.websiteDataStore _clearPrevalentDomainsFor:parentView->platformView()];
+ [globalWebViewConfiguration.websiteDataStore _clearLoadedThirdPartyDomainsFor:parentView->platformView()];
}
void TestController::getWebViewCategory()