<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[279750] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/279750">279750</a></dd>
<dt>Author</dt> <dd>katherine_cheney@apple.com</dd>
<dt>Date</dt> <dd>2021-07-08 13:54:04 -0700 (Thu, 08 Jul 2021)</dd>
</dl>

<h3>Log Message</h3>
<pre>Clean up App Privacy Report code
https://bugs.webkit.org/show_bug.cgi?id=227326
<rdar://problem/79696849>

Reviewed by Brent Fulgham.

Source/WebCore:

Tests: http/tests/app-privacy-report/attribution-load-url.html
       http/tests/app-privacy-report/attribution-ping-load.html
       http/tests/app-privacy-report/attribution-post-request.html
       http/tests/app-privacy-report/attribution-preflight-async.html
       http/tests/app-privacy-report/attribution-preflight-sync.html
       http/tests/app-privacy-report/attribution-speculative-revalidation.html

Rename App Privacy Report code to better align with the code's purpose
of attributing loads to the app or not. The default value should
be app initiated based on the documentation, so this patch also adjusts
the default value as needed.

* loader/CrossOriginAccessControl.cpp:
(WebCore::createAccessControlPreflightRequest):
* loader/DocumentLoader.h:
(WebCore::DocumentLoader::lastNavigationWasAppInitiated const):
(WebCore::DocumentLoader::setLastNavigationWasAppInitiated):
(WebCore::DocumentLoader::lastNavigationWasAppBound const): Deleted.
(WebCore::DocumentLoader::setLastNavigationWasAppBound): Deleted.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::load):
(WebCore::FrameLoader::updateRequestAndAddExtraFields):
* loader/FrameLoader.h:
* platform/network/ResourceRequestBase.cpp:
(WebCore::ResourceRequestBase::setAsIsolatedCopy):
* platform/network/ResourceRequestBase.h:
(WebCore::ResourceRequestBase::isAppInitiated const):
(WebCore::ResourceRequestBase::setIsAppInitiated):
(WebCore::ResourceRequestBase::ResourceRequestBase):
(WebCore::ResourceRequestBase::encodeBase const):
(WebCore::ResourceRequestBase::decodeBase):
(WebCore::ResourceRequestBase::isAppBound const): Deleted.
(WebCore::ResourceRequestBase::setIsAppBound): Deleted.
* testing/ServiceWorkerInternals.cpp:
(WebCore::ServiceWorkerInternals::lastNavigationWasAppInitiated):
(WebCore::ServiceWorkerInternals::lastNavigationWasAppBound): Deleted.
* testing/ServiceWorkerInternals.h:
* testing/ServiceWorkerInternals.idl:
* workers/service/ServiceWorkerClientData.cpp:
(WebCore::ServiceWorkerClientData::isolatedCopy const):
(WebCore::ServiceWorkerClientData::from):
* workers/service/ServiceWorkerClientData.h:
(WebCore::ServiceWorkerClientData::encode const):
(WebCore::ServiceWorkerClientData::decode):
* workers/service/ServiceWorkerContextData.cpp:
(WebCore::ServiceWorkerContextData::isolatedCopy const):
* workers/service/ServiceWorkerContextData.h:
(WebCore::ServiceWorkerContextData::encode const):
(WebCore::ServiceWorkerContextData::decode):
* workers/service/context/ServiceWorkerThreadProxy.cpp:
(WebCore::ServiceWorkerThreadProxy::ServiceWorkerThreadProxy):
(WebCore::ServiceWorkerThreadProxy::setLastNavigationWasAppInitiated):
(WebCore::ServiceWorkerThreadProxy::lastNavigationWasAppInitiated):
(WebCore::ServiceWorkerThreadProxy::setLastNavigationWasAppBound): Deleted.
(WebCore::ServiceWorkerThreadProxy::lastNavigationWasAppBound): Deleted.
* workers/service/context/ServiceWorkerThreadProxy.h:
* workers/service/server/RegistrationDatabase.cpp:
(WebCore::RegistrationDatabase::importRecords):
* workers/service/server/SWServer.cpp:
(WebCore::SWServer::startScriptFetch):
(WebCore::SWServer::updateWorker):
(WebCore::SWServer::clientIsAppInitiatedForRegistrableDomain):
(WebCore::SWServer::updateAppInitiatedValueForWorkers):
(WebCore::SWServer::registerServiceWorkerClient):
(WebCore::SWServer::unregisterServiceWorkerClient):
(WebCore::SWServer::clientIsAppBoundForRegistrableDomain): Deleted.
(WebCore::SWServer::updateAppBoundValueForWorkers): Deleted.
* workers/service/server/SWServer.h:
* workers/service/server/SWServerRegistration.cpp:
(WebCore::SWServerRegistration::scheduleSoftUpdate):
* workers/service/server/SWServerRegistration.h:
(WebCore::SWServerRegistration::isAppInitiated):
(WebCore::SWServerRegistration::isAppBound): Deleted.
* workers/service/server/SWServerToContextConnection.h:
* workers/service/server/SWServerWorker.cpp:
(WebCore::m_lastNavigationWasAppInitiated):
(WebCore::SWServerWorker::contextData const):
(WebCore::SWServerWorker::updateAppInitiatedValue):
(WebCore::m_lastNavigationWasAppBound): Deleted.
(WebCore::SWServerWorker::updateAppBoundValue): Deleted.
* workers/service/server/SWServerWorker.h:

Source/WebKit:

Rename App Privacy Report code to better align with the code's purpose
of attributing loads to the app or not. The default value should
be app initiated based on the documentation, so this patch also adjusts
the default value as needed.

This also adopts the new NSURLRequest attribution API and removes
the deprecated _isNonAppInitiated SPI.

Covered by existing layout and API tests.

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::preconnectTo):
(WebKit::NetworkProcess::appPrivacyReportTestingData):
(WebKit::NetworkProcess::clearAppPrivacyReportTestingData):
(WebKit::NetworkProcess::appBoundNavigationData): Deleted.
(WebKit::NetworkProcess::clearAppBoundNavigationData): Deleted.
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.messages.in:
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::continueWillSendRedirectedRequest):
(WebKit::NetworkResourceLoader::isAppBound):
* NetworkProcess/NetworkSession.h:
(WebKit::NetworkSession::appPrivacyReportTestingData):
(WebKit::NetworkSession::appBoundNavigationTestingData): Deleted.
* NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp:
(WebKit::ServiceWorkerFetchTask::softUpdateIfNeeded):
* NetworkProcess/ServiceWorker/ServiceWorkerSoftUpdateLoader.cpp:
(WebKit::ServiceWorkerSoftUpdateLoader::loadFromNetwork):
* NetworkProcess/ServiceWorker/WebSWServerConnection.cpp:
(WebKit::WebSWServerConnection::controlClient):
(WebKit::WebSWServerConnection::createFetchTask):
* NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
(WebKit::WebSWServerToContextConnection::updateAppInitiatedValue):
(WebKit::WebSWServerToContextConnection::updateAppBoundValue): Deleted.
* NetworkProcess/ServiceWorker/WebSWServerToContextConnection.h:
* NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
(WebKit::NetworkCache::constructRevalidationRequest):
(WebKit::NetworkCache::SpeculativeLoadManager::registerLoad):
(WebKit::NetworkCache::SpeculativeLoadManager::startSpeculativeRevalidation):
* NetworkProcess/cache/NetworkCacheSubresourcesEntry.h:
(WebKit::NetworkCache::SubresourceInfo::isAppInitiated const):
(WebKit::NetworkCache::SubresourceInfo::setIsAppInitiated):
(WebKit::NetworkCache::SubresourceInfo::isAppBound const): Deleted.
(WebKit::NetworkCache::SubresourceInfo::setIsAppBound): Deleted.
* NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
(WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):
* Scripts/webkit/messages.py:
(headers_for_type):
* Shared/AppPrivacyReport.h:
(WebKit::AppPrivacyReportTestingData::setDidPerformSoftUpdate):
(WebKit::AppPrivacyReportTestingData::clearAppPrivacyReportTestingData):
(WebKit::AppPrivacyReportTestingData::didLoadAppInitiatedRequest):
(WebKit::AppPrivacyReportTestingData::encode const):
(WebKit::AppPrivacyReportTestingData::decode):
* Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:
(IPC::ArgumentCoder<WebCore::ResourceRequest>::encodePlatformData):
(IPC::ArgumentCoder<WebCore::ResourceRequest>::decodePlatformData):
* Shared/NavigatingToAppBoundDomain.h:
(WebKit::AppBoundNavigationTestingData::setDidPerformSoftUpdate): Deleted.
(WebKit::AppBoundNavigationTestingData::clearAppBoundNavigationDataTesting): Deleted.
(WebKit::AppBoundNavigationTestingData::updateAppBoundNavigationTestingData): Deleted.
(WebKit::AppBoundNavigationTestingData::encode const): Deleted.
(WebKit::AppBoundNavigationTestingData::decode): Deleted.
(): Deleted.
* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode const):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _didLoadAppInitiatedRequest:]):
(-[WKWebView _didLoadNonAppInitiatedRequest:]):
(-[WKWebView _appBoundNavigationDataForDomain:completionHandler:]): Deleted.
Removed now that we no longer need to test attribution context, that
is all it was used for.

(-[WKWebView _didLoadAppBoundRequest:]): Deleted.
(-[WKWebView _didLoadNonAppBoundRequest:]): Deleted.
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/API/Cocoa/WKWebViewPrivateForTesting.h:
* UIProcess/API/Cocoa/WKWebViewTesting.mm:
(-[WKWebView _lastNavigationWasAppInitiated:]):
(-[WKWebView _appPrivacyReportTestingData:]):
(-[WKWebView _clearAppPrivacyReportTestingData:]):
(-[WKWebView _lastNavigationWasAppBound:]): Deleted.
(-[WKWebView _appBoundNavigationData:]): Deleted.
(-[WKWebView _clearAppBoundNavigationData:]): Deleted.
* UIProcess/Cocoa/WebPageProxyCocoa.mm:
(WebKit::WebPageProxy::setLastNavigationWasAppInitiated):
(WebKit::WebPageProxy::lastNavigationWasAppInitiated):
(WebKit::WebPageProxy::setLastNavigationWasAppBound): Deleted.
(WebKit::WebPageProxy::lastNavigationWasAppBound): Deleted.
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::preconnectTo):
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::loadRequest):
(WebKit::WebPageProxy::preconnectTo):
(WebKit::WebPageProxy::creationParameters):
(WebKit::WebPageProxy::appPrivacyReportTestingData):
(WebKit::WebPageProxy::clearAppPrivacyReportTestingData):
(WebKit::WebPageProxy::appBoundNavigationData): Deleted.
(WebKit::WebPageProxy::clearAppBoundNavigationData): Deleted.
* UIProcess/WebPageProxy.h:
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::WebLoaderStrategy::loadResource):
(WebKit::WebLoaderStrategy::preconnectTo):
* WebProcess/Storage/WebSWContextManagerConnection.cpp:
(WebKit::WebSWContextManagerConnection::updateAppInitiatedValue):
(WebKit::WebSWContextManagerConnection::startFetch):
(WebKit::WebSWContextManagerConnection::updateAppBoundValue): Deleted.
* WebProcess/Storage/WebSWContextManagerConnection.h:
* WebProcess/Storage/WebSWContextManagerConnection.messages.in:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchWillSendRequest):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::loadRequest):
(WebKit::WebPage::createDocumentLoader):
(WebKit::WebPage::lastNavigationWasAppInitiated):
(WebKit::WebPage::lastNavigationWasAppBound): Deleted.
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::setLastNavigationWasAppInitiated):
(WebKit::WebPage::setLastNavigationWasAppBound): Deleted.
* WebProcess/WebPage/WebPage.messages.in:

Tools:

Delete testing functions related to attribution context. Move App
Privacy Report tests into their own file.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/AppPrivacyReport.mm: Added.
(TEST):
(catch):
(function):
(-[SWAppInitiatedRequestMessageHandler userContentController:didReceiveScriptMessage:]):
* TestWebKitAPI/Tests/WebKitCocoa/AppPrivacyReportPlugIn.mm: Renamed from Tools/TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacyPlugIn.mm.
(-[AppPrivacyReportPlugIn webProcessPlugInBrowserContextController:frame:willSendRequestForResource:request:redirectResponse:]):
* TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm:
(-[SWAppBoundRequestMessageHandler userContentController:didReceiveScriptMessage:]): Deleted.
* TestWebKitAPI/Tests/WebKitCocoa/app-privacy-report-iframe.html: Added.
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::didReceiveMessageToPage):
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::didLoadAppInitiatedRequest):
(WTR::TestRunner::didLoadNonAppInitiatedRequest):
(WTR::TestRunner::appBoundRequestContextDataForDomain): Deleted.
(WTR::TestRunner::callDidReceiveAppBoundRequestContextDataForDomainCallback): Deleted.
(WTR::TestRunner::didLoadAppBoundRequest): Deleted.
(WTR::TestRunner::didLoadNonAppBoundRequest): Deleted.
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetStateToConsistentValues):
(WTR::TestController::didLoadAppInitiatedRequest):
(WTR::TestController::didLoadNonAppInitiatedRequest):
(WTR::TestController::clearAppPrivacyReportTestingData):
(WTR::TestController::appBoundRequestContextDataForDomain): Deleted.
(WTR::TestController::didLoadAppBoundRequest): Deleted.
(WTR::TestController::didLoadNonAppBoundRequest): Deleted.
(WTR::TestController::clearAppBoundNavigationData): Deleted.
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
(WTR::TestInvocation::didReceiveAppBoundRequestContextDataForDomain): Deleted.
* WebKitTestRunner/TestInvocation.h:
* WebKitTestRunner/cocoa/TestControllerCocoa.mm:
(WTR::TestController::didLoadAppInitiatedRequest):
(WTR::TestController::didLoadNonAppInitiatedRequest):
(WTR::TestController::clearAppPrivacyReportTestingData):
(WTR::TestController::appBoundRequestContextDataForDomain): Deleted.
(WTR::TestController::didLoadAppBoundRequest): Deleted.
(WTR::TestController::didLoadNonAppBoundRequest): Deleted.
(WTR::TestController::clearAppBoundNavigationData): Deleted.
* WebKitTestRunner/cocoa/TestRunnerWKWebView.h:
* WebKitTestRunner/cocoa/TestRunnerWKWebView.mm:
(-[TestRunnerWKWebView _didLoadAppInitiatedRequest:]):
(-[TestRunnerWKWebView _didLoadNonAppInitiatedRequest:]):
(-[TestRunnerWKWebView _appBoundNavigationDataForDomain:completionHandler:]): Deleted.
(-[TestRunnerWKWebView _didLoadAppBoundRequest:]): Deleted.
(-[TestRunnerWKWebView _didLoadNonAppBoundRequest:]): Deleted.

LayoutTests:

Move App Privacy Report tests into their own directory.

* TestExpectations:
* http/tests/app-privacy-report/attribution-load-url-expected.txt: Added.
* http/tests/app-privacy-report/attribution-load-url.html: Renamed from LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-load-url.html.
* http/tests/app-privacy-report/attribution-ping-load-expected.txt: Renamed from LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-ping-load-expected.txt.
* http/tests/app-privacy-report/attribution-ping-load.html: Renamed from LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-ping-load.html.
* http/tests/app-privacy-report/attribution-post-request-expected.txt: Added.
* http/tests/app-privacy-report/attribution-post-request.html: Renamed from LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-post-request.html.
* http/tests/app-privacy-report/attribution-preflight-async-expected.txt: Renamed from LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-preflight-async-expected.txt.
* http/tests/app-privacy-report/attribution-preflight-async.html: Renamed from LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-preflight-async.html.
* http/tests/app-privacy-report/attribution-preflight-sync-expected.txt: Renamed from LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-preflight-sync-expected.txt.
* http/tests/app-privacy-report/attribution-preflight-sync.html: Renamed from LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-preflight-sync.html.
* http/tests/app-privacy-report/attribution-speculative-revalidation-expected.txt: Renamed from LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-speculative-revalidation-expected.txt.
* http/tests/app-privacy-report/attribution-speculative-revalidation.html: Renamed from LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-speculative-revalidation.html.
* http/tests/app-privacy-report/resources/frame-with-authenticated-resource.py: Renamed from LayoutTests/http/tests/in-app-browser-privacy/resources/frame-with-authenticated-resource.py.
* http/tests/app-privacy-report/resources/post.py: Added.
* http/tests/app-privacy-report/resources/resource-with-auth.py: Renamed from LayoutTests/http/tests/in-app-browser-privacy/resources/resource-with-auth.py.
* http/tests/in-app-browser-privacy/app-bound-attribution-load-url-expected.txt: Removed.
* http/tests/in-app-browser-privacy/app-bound-attribution-post-request-expected.txt: Removed.
* http/tests/in-app-browser-privacy/context-string-for-subframe-expected.txt: Removed.
* http/tests/in-app-browser-privacy/context-string-for-subframe.html: Removed.
* http/tests/in-app-browser-privacy/context-string-preconnect-expected.txt: Removed.
* http/tests/in-app-browser-privacy/context-string-preconnect.html: Removed.
* http/tests/in-app-browser-privacy/context-string-preflight-expected.txt: Removed.
* http/tests/in-app-browser-privacy/context-string-preflight.html: Removed.
* http/tests/in-app-browser-privacy/resources/post.py: Removed.
* http/tests/navigation/resources/check-ping-app-initiated-data.py: Renamed from LayoutTests/http/tests/navigation/resources/check-ping-app-bound-data.py.
* platform/ios-wk2/TestExpectations:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsTestExpectations">trunk/LayoutTests/TestExpectations</a></li>
<li><a href="#trunkLayoutTestsplatformioswk2TestExpectations">trunk/LayoutTests/platform/ios-wk2/TestExpectations</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreloaderCrossOriginAccessControlcpp">trunk/Source/WebCore/loader/CrossOriginAccessControl.cpp</a></li>
<li><a href="#trunkSourceWebCoreloaderDocumentLoaderh">trunk/Source/WebCore/loader/DocumentLoader.h</a></li>
<li><a href="#trunkSourceWebCoreloaderFrameLoadercpp">trunk/Source/WebCore/loader/FrameLoader.cpp</a></li>
<li><a href="#trunkSourceWebCoreloaderFrameLoaderh">trunk/Source/WebCore/loader/FrameLoader.h</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkResourceRequestBasecpp">trunk/Source/WebCore/platform/network/ResourceRequestBase.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkResourceRequestBaseh">trunk/Source/WebCore/platform/network/ResourceRequestBase.h</a></li>
<li><a href="#trunkSourceWebCoretestingServiceWorkerInternalscpp">trunk/Source/WebCore/testing/ServiceWorkerInternals.cpp</a></li>
<li><a href="#trunkSourceWebCoretestingServiceWorkerInternalsh">trunk/Source/WebCore/testing/ServiceWorkerInternals.h</a></li>
<li><a href="#trunkSourceWebCoretestingServiceWorkerInternalsidl">trunk/Source/WebCore/testing/ServiceWorkerInternals.idl</a></li>
<li><a href="#trunkSourceWebCoreworkersserviceServiceWorkerClientDatacpp">trunk/Source/WebCore/workers/service/ServiceWorkerClientData.cpp</a></li>
<li><a href="#trunkSourceWebCoreworkersserviceServiceWorkerClientDatah">trunk/Source/WebCore/workers/service/ServiceWorkerClientData.h</a></li>
<li><a href="#trunkSourceWebCoreworkersserviceServiceWorkerContextDatacpp">trunk/Source/WebCore/workers/service/ServiceWorkerContextData.cpp</a></li>
<li><a href="#trunkSourceWebCoreworkersserviceServiceWorkerContextDatah">trunk/Source/WebCore/workers/service/ServiceWorkerContextData.h</a></li>
<li><a href="#trunkSourceWebCoreworkersservicecontextServiceWorkerThreadProxycpp">trunk/Source/WebCore/workers/service/context/ServiceWorkerThreadProxy.cpp</a></li>
<li><a href="#trunkSourceWebCoreworkersservicecontextServiceWorkerThreadProxyh">trunk/Source/WebCore/workers/service/context/ServiceWorkerThreadProxy.h</a></li>
<li><a href="#trunkSourceWebCoreworkersserviceserverRegistrationDatabasecpp">trunk/Source/WebCore/workers/service/server/RegistrationDatabase.cpp</a></li>
<li><a href="#trunkSourceWebCoreworkersserviceserverSWServercpp">trunk/Source/WebCore/workers/service/server/SWServer.cpp</a></li>
<li><a href="#trunkSourceWebCoreworkersserviceserverSWServerh">trunk/Source/WebCore/workers/service/server/SWServer.h</a></li>
<li><a href="#trunkSourceWebCoreworkersserviceserverSWServerRegistrationcpp">trunk/Source/WebCore/workers/service/server/SWServerRegistration.cpp</a></li>
<li><a href="#trunkSourceWebCoreworkersserviceserverSWServerRegistrationh">trunk/Source/WebCore/workers/service/server/SWServerRegistration.h</a></li>
<li><a href="#trunkSourceWebCoreworkersserviceserverSWServerToContextConnectionh">trunk/Source/WebCore/workers/service/server/SWServerToContextConnection.h</a></li>
<li><a href="#trunkSourceWebCoreworkersserviceserverSWServerWorkercpp">trunk/Source/WebCore/workers/service/server/SWServerWorker.cpp</a></li>
<li><a href="#trunkSourceWebCoreworkersserviceserverSWServerWorkerh">trunk/Source/WebCore/workers/service/server/SWServerWorker.h</a></li>
<li><a href="#trunkSourceWebKitChangeLog">trunk/Source/WebKit/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitNetworkProcessNetworkProcesscpp">trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp</a></li>
<li><a href="#trunkSourceWebKitNetworkProcessNetworkProcessh">trunk/Source/WebKit/NetworkProcess/NetworkProcess.h</a></li>
<li><a href="#trunkSourceWebKitNetworkProcessNetworkProcessmessagesin">trunk/Source/WebKit/NetworkProcess/NetworkProcess.messages.in</a></li>
<li><a href="#trunkSourceWebKitNetworkProcessNetworkResourceLoadercpp">trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp</a></li>
<li><a href="#trunkSourceWebKitNetworkProcessNetworkResourceLoaderh">trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.h</a></li>
<li><a href="#trunkSourceWebKitNetworkProcessNetworkSessionh">trunk/Source/WebKit/NetworkProcess/NetworkSession.h</a></li>
<li><a href="#trunkSourceWebKitNetworkProcessServiceWorkerServiceWorkerFetchTaskcpp">trunk/Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp</a></li>
<li><a href="#trunkSourceWebKitNetworkProcessServiceWorkerServiceWorkerSoftUpdateLoadercpp">trunk/Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerSoftUpdateLoader.cpp</a></li>
<li><a href="#trunkSourceWebKitNetworkProcessServiceWorkerWebSWServerConnectioncpp">trunk/Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerConnection.cpp</a></li>
<li><a href="#trunkSourceWebKitNetworkProcessServiceWorkerWebSWServerToContextConnectioncpp">trunk/Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp</a></li>
<li><a href="#trunkSourceWebKitNetworkProcessServiceWorkerWebSWServerToContextConnectionh">trunk/Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerToContextConnection.h</a></li>
<li><a href="#trunkSourceWebKitNetworkProcesscacheNetworkCacheSpeculativeLoadManagercpp">trunk/Source/WebKit/NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp</a></li>
<li><a href="#trunkSourceWebKitNetworkProcesscacheNetworkCacheSubresourcesEntryh">trunk/Source/WebKit/NetworkProcess/cache/NetworkCacheSubresourcesEntry.h</a></li>
<li><a href="#trunkSourceWebKitNetworkProcesscocoaNetworkDataTaskCocoamm">trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm</a></li>
<li><a href="#trunkSourceWebKitScriptswebkitmessagespy">trunk/Source/WebKit/Scripts/webkit/messages.py</a></li>
<li><a href="#trunkSourceWebKitSharedCocoaWebCoreArgumentCodersCocoamm">trunk/Source/WebKit/Shared/Cocoa/WebCoreArgumentCodersCocoa.mm</a></li>
<li><a href="#trunkSourceWebKitSharedNavigatingToAppBoundDomainh">trunk/Source/WebKit/Shared/NavigatingToAppBoundDomain.h</a></li>
<li><a href="#trunkSourceWebKitSharedWebPageCreationParameterscpp">trunk/Source/WebKit/Shared/WebPageCreationParameters.cpp</a></li>
<li><a href="#trunkSourceWebKitSharedWebPageCreationParametersh">trunk/Source/WebKit/Shared/WebPageCreationParameters.h</a></li>
<li><a href="#trunkSourceWebKitUIProcessAPICocoaWKWebViewmm">trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm</a></li>
<li><a href="#trunkSourceWebKitUIProcessAPICocoaWKWebViewPrivateh">trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h</a></li>
<li><a href="#trunkSourceWebKitUIProcessAPICocoaWKWebViewPrivateForTestingh">trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivateForTesting.h</a></li>
<li><a href="#trunkSourceWebKitUIProcessAPICocoaWKWebViewTestingmm">trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewTesting.mm</a></li>
<li><a href="#trunkSourceWebKitUIProcessCocoaWebPageProxyCocoamm">trunk/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm</a></li>
<li><a href="#trunkSourceWebKitUIProcessNetworkNetworkProcessProxycpp">trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp</a></li>
<li><a href="#trunkSourceWebKitUIProcessNetworkNetworkProcessProxyh">trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.h</a></li>
<li><a href="#trunkSourceWebKitUIProcessWebPageProxycpp">trunk/Source/WebKit/UIProcess/WebPageProxy.cpp</a></li>
<li><a href="#trunkSourceWebKitUIProcessWebPageProxyh">trunk/Source/WebKit/UIProcess/WebPageProxy.h</a></li>
<li><a href="#trunkSourceWebKitWebKitxcodeprojprojectpbxproj">trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebKitWebProcessNetworkWebLoaderStrategycpp">trunk/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp</a></li>
<li><a href="#trunkSourceWebKitWebProcessStorageWebSWContextManagerConnectioncpp">trunk/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.cpp</a></li>
<li><a href="#trunkSourceWebKitWebProcessStorageWebSWContextManagerConnectionh">trunk/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.h</a></li>
<li><a href="#trunkSourceWebKitWebProcessStorageWebSWContextManagerConnectionmessagesin">trunk/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.messages.in</a></li>
<li><a href="#trunkSourceWebKitWebProcessWebCoreSupportWebFrameLoaderClientcpp">trunk/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp</a></li>
<li><a href="#trunkSourceWebKitWebProcessWebPageWebPagecpp">trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp</a></li>
<li><a href="#trunkSourceWebKitWebProcessWebPageWebPageh">trunk/Source/WebKit/WebProcess/WebPage/WebPage.h</a></li>
<li><a href="#trunkSourceWebKitWebProcessWebPageWebPagemessagesin">trunk/Source/WebKit/WebProcess/WebPage/WebPage.messages.in</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsTestWebKitAPITestWebKitAPIxcodeprojprojectpbxproj">trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkToolsTestWebKitAPITestsWebKitCocoaInAppBrowserPrivacymm">trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm</a></li>
<li><a href="#trunkToolsWebKitTestRunnerInjectedBundleBindingsTestRunneridl">trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl</a></li>
<li><a href="#trunkToolsWebKitTestRunnerInjectedBundleInjectedBundlecpp">trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp</a></li>
<li><a href="#trunkToolsWebKitTestRunnerInjectedBundleTestRunnercpp">trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp</a></li>
<li><a href="#trunkToolsWebKitTestRunnerInjectedBundleTestRunnerh">trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h</a></li>
<li><a href="#trunkToolsWebKitTestRunnerTestControllercpp">trunk/Tools/WebKitTestRunner/TestController.cpp</a></li>
<li><a href="#trunkToolsWebKitTestRunnerTestControllerh">trunk/Tools/WebKitTestRunner/TestController.h</a></li>
<li><a href="#trunkToolsWebKitTestRunnerTestInvocationcpp">trunk/Tools/WebKitTestRunner/TestInvocation.cpp</a></li>
<li><a href="#trunkToolsWebKitTestRunnerTestInvocationh">trunk/Tools/WebKitTestRunner/TestInvocation.h</a></li>
<li><a href="#trunkToolsWebKitTestRunnercocoaTestControllerCocoamm">trunk/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm</a></li>
<li><a href="#trunkToolsWebKitTestRunnercocoaTestRunnerWKWebViewh">trunk/Tools/WebKitTestRunner/cocoa/TestRunnerWKWebView.h</a></li>
<li><a href="#trunkToolsWebKitTestRunnercocoaTestRunnerWKWebViewmm">trunk/Tools/WebKitTestRunner/cocoa/TestRunnerWKWebView.mm</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li>trunk/LayoutTests/http/tests/app-privacy-report/</li>
<li><a href="#trunkLayoutTestshttptestsappprivacyreportattributionloadurlexpectedtxt">trunk/LayoutTests/http/tests/app-privacy-report/attribution-load-url-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestsappprivacyreportattributionloadurlhtml">trunk/LayoutTests/http/tests/app-privacy-report/attribution-load-url.html</a></li>
<li><a href="#trunkLayoutTestshttptestsappprivacyreportattributionpingloadexpectedtxt">trunk/LayoutTests/http/tests/app-privacy-report/attribution-ping-load-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestsappprivacyreportattributionpingloadhtml">trunk/LayoutTests/http/tests/app-privacy-report/attribution-ping-load.html</a></li>
<li><a href="#trunkLayoutTestshttptestsappprivacyreportattributionpostrequestexpectedtxt">trunk/LayoutTests/http/tests/app-privacy-report/attribution-post-request-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestsappprivacyreportattributionpostrequesthtml">trunk/LayoutTests/http/tests/app-privacy-report/attribution-post-request.html</a></li>
<li><a href="#trunkLayoutTestshttptestsappprivacyreportattributionpreflightasyncexpectedtxt">trunk/LayoutTests/http/tests/app-privacy-report/attribution-preflight-async-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestsappprivacyreportattributionpreflightasynchtml">trunk/LayoutTests/http/tests/app-privacy-report/attribution-preflight-async.html</a></li>
<li><a href="#trunkLayoutTestshttptestsappprivacyreportattributionpreflightsyncexpectedtxt">trunk/LayoutTests/http/tests/app-privacy-report/attribution-preflight-sync-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestsappprivacyreportattributionpreflightsynchtml">trunk/LayoutTests/http/tests/app-privacy-report/attribution-preflight-sync.html</a></li>
<li><a href="#trunkLayoutTestshttptestsappprivacyreportattributionspeculativerevalidationexpectedtxt">trunk/LayoutTests/http/tests/app-privacy-report/attribution-speculative-revalidation-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestsappprivacyreportattributionspeculativerevalidationhtml">trunk/LayoutTests/http/tests/app-privacy-report/attribution-speculative-revalidation.html</a></li>
<li>trunk/LayoutTests/http/tests/app-privacy-report/resources/</li>
<li><a href="#trunkLayoutTestshttptestsappprivacyreportresourcesframewithauthenticatedresourcepy">trunk/LayoutTests/http/tests/app-privacy-report/resources/frame-with-authenticated-resource.py</a></li>
<li><a href="#trunkLayoutTestshttptestsappprivacyreportresourcespostpy">trunk/LayoutTests/http/tests/app-privacy-report/resources/post.py</a></li>
<li><a href="#trunkLayoutTestshttptestsappprivacyreportresourcesresourcewithauthpy">trunk/LayoutTests/http/tests/app-privacy-report/resources/resource-with-auth.py</a></li>
<li><a href="#trunkLayoutTestshttptestsnavigationresourcescheckpingappinitiateddatapy">trunk/LayoutTests/http/tests/navigation/resources/check-ping-app-initiated-data.py</a></li>
<li><a href="#trunkSourceWebKitSharedAppPrivacyReporth">trunk/Source/WebKit/Shared/AppPrivacyReport.h</a></li>
<li><a href="#trunkSourceWebKitSharedAppPrivacyReportTestingDatah">trunk/Source/WebKit/Shared/AppPrivacyReportTestingData.h</a></li>
<li><a href="#trunkToolsTestWebKitAPITestsWebKitCocoaAppPrivacyReportmm">trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/AppPrivacyReport.mm</a></li>
<li><a href="#trunkToolsTestWebKitAPITestsWebKitCocoaAppPrivacyReportPlugInmm">trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/AppPrivacyReportPlugIn.mm</a></li>
<li><a href="#trunkToolsTestWebKitAPITestsWebKitCocoaappprivacyreportiframehtml">trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/app-privacy-report-iframe.html</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkLayoutTestshttptestsinappbrowserprivacyappboundattributionloadurlexpectedtxt">trunk/LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-load-url-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestsinappbrowserprivacyappboundattributionloadurlhtml">trunk/LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-load-url.html</a></li>
<li><a href="#trunkLayoutTestshttptestsinappbrowserprivacyappboundattributionpingloadexpectedtxt">trunk/LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-ping-load-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestsinappbrowserprivacyappboundattributionpingloadhtml">trunk/LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-ping-load.html</a></li>
<li><a href="#trunkLayoutTestshttptestsinappbrowserprivacyappboundattributionpostrequestexpectedtxt">trunk/LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-post-request-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestsinappbrowserprivacyappboundattributionpostrequesthtml">trunk/LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-post-request.html</a></li>
<li><a href="#trunkLayoutTestshttptestsinappbrowserprivacyappboundattributionpreflightasyncexpectedtxt">trunk/LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-preflight-async-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestsinappbrowserprivacyappboundattributionpreflightasynchtml">trunk/LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-preflight-async.html</a></li>
<li><a href="#trunkLayoutTestshttptestsinappbrowserprivacyappboundattributionpreflightsyncexpectedtxt">trunk/LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-preflight-sync-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestsinappbrowserprivacyappboundattributionpreflightsynchtml">trunk/LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-preflight-sync.html</a></li>
<li><a href="#trunkLayoutTestshttptestsinappbrowserprivacyappboundattributionspeculativerevalidationexpectedtxt">trunk/LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-speculative-revalidation-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestsinappbrowserprivacyappboundattributionspeculativerevalidationhtml">trunk/LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-speculative-revalidation.html</a></li>
<li><a href="#trunkLayoutTestshttptestsinappbrowserprivacycontextstringforsubframeexpectedtxt">trunk/LayoutTests/http/tests/in-app-browser-privacy/context-string-for-subframe-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestsinappbrowserprivacycontextstringforsubframehtml">trunk/LayoutTests/http/tests/in-app-browser-privacy/context-string-for-subframe.html</a></li>
<li><a href="#trunkLayoutTestshttptestsinappbrowserprivacycontextstringpreconnectexpectedtxt">trunk/LayoutTests/http/tests/in-app-browser-privacy/context-string-preconnect-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestsinappbrowserprivacycontextstringpreconnecthtml">trunk/LayoutTests/http/tests/in-app-browser-privacy/context-string-preconnect.html</a></li>
<li><a href="#trunkLayoutTestshttptestsinappbrowserprivacycontextstringpreflightexpectedtxt">trunk/LayoutTests/http/tests/in-app-browser-privacy/context-string-preflight-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestsinappbrowserprivacycontextstringpreflighthtml">trunk/LayoutTests/http/tests/in-app-browser-privacy/context-string-preflight.html</a></li>
<li><a href="#trunkLayoutTestshttptestsinappbrowserprivacyresourcesframewithauthenticatedresourcepy">trunk/LayoutTests/http/tests/in-app-browser-privacy/resources/frame-with-authenticated-resource.py</a></li>
<li><a href="#trunkLayoutTestshttptestsinappbrowserprivacyresourcespostpy">trunk/LayoutTests/http/tests/in-app-browser-privacy/resources/post.py</a></li>
<li><a href="#trunkLayoutTestshttptestsinappbrowserprivacyresourcesresourcewithauthpy">trunk/LayoutTests/http/tests/in-app-browser-privacy/resources/resource-with-auth.py</a></li>
<li><a href="#trunkLayoutTestshttptestsnavigationresourcescheckpingappbounddatapy">trunk/LayoutTests/http/tests/navigation/resources/check-ping-app-bound-data.py</a></li>
<li><a href="#trunkToolsTestWebKitAPITestsWebKitCocoaInAppBrowserPrivacyPlugInmm">trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacyPlugIn.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog      2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/LayoutTests/ChangeLog 2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -1,3 +1,41 @@
</span><ins>+2021-07-08  Kate Cheney  <katherine_cheney@apple.com>
+
+        Clean up App Privacy Report code
+        https://bugs.webkit.org/show_bug.cgi?id=227326
+        <rdar://problem/79696849>
+
+        Reviewed by Brent Fulgham.
+
+        Move App Privacy Report tests into their own directory.
+
+        * TestExpectations:
+        * http/tests/app-privacy-report/attribution-load-url-expected.txt: Added.
+        * http/tests/app-privacy-report/attribution-load-url.html: Renamed from LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-load-url.html.
+        * http/tests/app-privacy-report/attribution-ping-load-expected.txt: Renamed from LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-ping-load-expected.txt.
+        * http/tests/app-privacy-report/attribution-ping-load.html: Renamed from LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-ping-load.html.
+        * http/tests/app-privacy-report/attribution-post-request-expected.txt: Added.
+        * http/tests/app-privacy-report/attribution-post-request.html: Renamed from LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-post-request.html.
+        * http/tests/app-privacy-report/attribution-preflight-async-expected.txt: Renamed from LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-preflight-async-expected.txt.
+        * http/tests/app-privacy-report/attribution-preflight-async.html: Renamed from LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-preflight-async.html.
+        * http/tests/app-privacy-report/attribution-preflight-sync-expected.txt: Renamed from LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-preflight-sync-expected.txt.
+        * http/tests/app-privacy-report/attribution-preflight-sync.html: Renamed from LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-preflight-sync.html.
+        * http/tests/app-privacy-report/attribution-speculative-revalidation-expected.txt: Renamed from LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-speculative-revalidation-expected.txt.
+        * http/tests/app-privacy-report/attribution-speculative-revalidation.html: Renamed from LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-speculative-revalidation.html.
+        * http/tests/app-privacy-report/resources/frame-with-authenticated-resource.py: Renamed from LayoutTests/http/tests/in-app-browser-privacy/resources/frame-with-authenticated-resource.py.
+        * http/tests/app-privacy-report/resources/post.py: Added.
+        * http/tests/app-privacy-report/resources/resource-with-auth.py: Renamed from LayoutTests/http/tests/in-app-browser-privacy/resources/resource-with-auth.py.
+        * http/tests/in-app-browser-privacy/app-bound-attribution-load-url-expected.txt: Removed.
+        * http/tests/in-app-browser-privacy/app-bound-attribution-post-request-expected.txt: Removed.
+        * http/tests/in-app-browser-privacy/context-string-for-subframe-expected.txt: Removed.
+        * http/tests/in-app-browser-privacy/context-string-for-subframe.html: Removed.
+        * http/tests/in-app-browser-privacy/context-string-preconnect-expected.txt: Removed.
+        * http/tests/in-app-browser-privacy/context-string-preconnect.html: Removed.
+        * http/tests/in-app-browser-privacy/context-string-preflight-expected.txt: Removed.
+        * http/tests/in-app-browser-privacy/context-string-preflight.html: Removed.
+        * http/tests/in-app-browser-privacy/resources/post.py: Removed.
+        * http/tests/navigation/resources/check-ping-app-initiated-data.py: Renamed from LayoutTests/http/tests/navigation/resources/check-ping-app-bound-data.py.
+        * platform/ios-wk2/TestExpectations:
+
</ins><span class="cx"> 2021-07-08  Simon Fraser  <simon.fraser@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Scrollbar hidden when scroller has a negative z-index child
</span></span></pre></div>
<a id="trunkLayoutTestsTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/TestExpectations (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/TestExpectations       2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/LayoutTests/TestExpectations  2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -194,6 +194,9 @@
</span><span class="cx"> fast/speechrecognition/start-second-recognition.html [ Skip ]
</span><span class="cx"> fast/speechrecognition/ios/ [ Skip ]
</span><span class="cx"> 
</span><ins>+# app-privacy-report tests rely on WebKitAdditions
+http/tests/app-privacy-report/ [ Skip ]
+
</ins><span class="cx"> # Only partial support on Cocoa platforms.
</span><span class="cx"> imported/w3c/web-platform-tests/speech-api/ [ Skip ]
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestshttptestsappprivacyreportattributionloadurlexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/app-privacy-report/attribution-load-url-expected.txt (0 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/app-privacy-report/attribution-load-url-expected.txt                                (rev 0)
+++ trunk/LayoutTests/http/tests/app-privacy-report/attribution-load-url-expected.txt   2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+Test loadURL requests are succesfully attributed as app initiated.
+PASS successfully loaded only app initiated requests
+
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsappprivacyreportattributionloadurlhtmlfromrev279749trunkLayoutTestshttptestsinappbrowserprivacyappboundattributionloadurlhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/http/tests/app-privacy-report/attribution-load-url.html (from rev 279749, trunk/LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-load-url.html) (0 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/app-privacy-report/attribution-load-url.html                                (rev 0)
+++ trunk/LayoutTests/http/tests/app-privacy-report/attribution-load-url.html   2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -0,0 +1,48 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+    <script src="resources/util.js"></script>
+</head>
+<body onload="setTimeout('runTest()', 0)">
+<div id="description">Test loadURL requests are succesfully attributed as app initiated.</div>
+<pre id="console"></pre>
+<script>
+    if (window.testRunner) {
+        testRunner.waitUntilDone();
+        testRunner.dumpAsText();
+    }
+
+    function loadURL() {
+        document.location.href = destinationOrigin + "/app-privacy-report/attribution-load-url.html";
+    }
+
+    function log(message) {
+        document.getElementById('console').appendChild(document.createTextNode(message + '\n'));
+    }
+
+    const destinationOrigin = "http://localhost:8000";
+    const startingOrigin = "http://127.0.0.1:8000";
+    function runTest() {
+        if (document.location.origin === startingOrigin) {
+            loadURL();
+        } else {
+            var didLoadAppInitiatedRequest = testRunner.didLoadAppInitiatedRequest();
+            var didLoadNonAppInitiatedRequest = testRunner.didLoadNonAppInitiatedRequest();
+
+            if (didLoadNonAppInitiatedRequest) {
+                log("FAIL did load non app initiated request");
+                testRunner.notifyDone();
+            }
+
+            if (!didLoadAppInitiatedRequest) {
+                log("FAIL did not load app initiated request");
+                testRunner.notifyDone();
+            }
+
+            log("PASS successfully loaded only app initiated requests");
+            testRunner.notifyDone();
+        }
+    }
+</script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsappprivacyreportattributionpingloadexpectedtxtfromrev279749trunkLayoutTestshttptestsinappbrowserprivacyappboundattributionpingloadexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/http/tests/app-privacy-report/attribution-ping-load-expected.txt (from rev 279749, trunk/LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-ping-load-expected.txt) (0 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/app-privacy-report/attribution-ping-load-expected.txt                               (rev 0)
+++ trunk/LayoutTests/http/tests/app-privacy-report/attribution-ping-load-expected.txt  2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -0,0 +1,8 @@
</span><ins>+CONSOLE MESSAGE: PASS successfully loaded only app initiated requests
+Ping sent successfully
+CONTENT_TYPE: text/ping
+HTTP_HOST: 127.0.0.1:8000
+HTTP_PING_FROM: http://127.0.0.1:8000/app-privacy-report/attribution-ping-load.html
+HTTP_PING_TO: http://127.0.0.1:8000/navigation/resources/check-ping-app-initiated-data.py
+REQUEST_METHOD: POST
+REQUEST_URI: /navigation/resources/save-ping.py
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsappprivacyreportattributionpingloadhtmlfromrev279749trunkLayoutTestshttptestsinappbrowserprivacyappboundattributionpingloadhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/http/tests/app-privacy-report/attribution-ping-load.html (from rev 279749, trunk/LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-ping-load.html) (0 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/app-privacy-report/attribution-ping-load.html                               (rev 0)
+++ trunk/LayoutTests/http/tests/app-privacy-report/attribution-ping-load.html  2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -0,0 +1,30 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+<script src="../navigation/ping-attribute/resources/utilities.js"></script>
+<script>
+if (window.testRunner && window.internals) {
+    testRunner.dumpAsText();
+    testRunner.setStatisticsShouldDowngradeReferrer(false, function () { });
+    internals.settings.setHyperlinkAuditingEnabled(true);
+    testRunner.waitUntilDone();
+}
+
+function test()
+{
+    clickElement(document.querySelector("img"));
+}
+
+window.onload = function ()
+{
+    clearLastPingResultAndRunTest(test);
+}
+</script>
+</head>
+<body>
+    <img src="non-existent-image.jpg" width="128" height="128" usemap="#imagemap">
+    <map name="imagemap">
+        <area shape="rect" coords="0,0,128,128" href="../navigation/resources/check-ping-app-initiated-data.py" ping="../navigation/resources/save-ping.py">
+    </map>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsappprivacyreportattributionpostrequestexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/app-privacy-report/attribution-post-request-expected.txt (0 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/app-privacy-report/attribution-post-request-expected.txt                            (rev 0)
+++ trunk/LayoutTests/http/tests/app-privacy-report/attribution-post-request-expected.txt       2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -0,0 +1,4 @@
</span><ins>+CONSOLE MESSAGE: PASS successfully loaded only app initiated requests
+Tests app initiated requests get marked for POST requests.
+
+
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsappprivacyreportattributionpostrequesthtmlfromrev279749trunkLayoutTestshttptestsinappbrowserprivacyappboundattributionpostrequesthtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/http/tests/app-privacy-report/attribution-post-request.html (from rev 279749, trunk/LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-post-request.html) (0 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/app-privacy-report/attribution-post-request.html                            (rev 0)
+++ trunk/LayoutTests/http/tests/app-privacy-report/attribution-post-request.html       2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -0,0 +1,22 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<script src="../../../resources/js-test-pre.js"></script>
+</head>
+<body>
+<p>Tests app initiated requests get marked for POST requests.</p>
+<form id="testForm" action="resources/post.py" target="_blank" rel="noreferrer" method="post">
+<input type="submit" value="Test"></input>
+<form>
+<script>
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.setCanOpenWindows(true);
+}
+
+document.forms[0].submit();
+
+</script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsappprivacyreportattributionpreflightasyncexpectedtxtfromrev279749trunkLayoutTestshttptestsinappbrowserprivacyappboundattributionpreflightasyncexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/http/tests/app-privacy-report/attribution-preflight-async-expected.txt (from rev 279749, trunk/LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-preflight-async-expected.txt) (0 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/app-privacy-report/attribution-preflight-async-expected.txt                         (rev 0)
+++ trunk/LayoutTests/http/tests/app-privacy-report/attribution-preflight-async-expected.txt    2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -0,0 +1,6 @@
</span><ins>+CONSOLE MESSAGE: Preflight response is not successful
+CONSOLE MESSAGE: XMLHttpRequest cannot load http://localhost:8000/xmlhttprequest/resources/status-404-without-body.py due to access control checks.
+Tests app initiated requests get marked for async preflights
+
+PASS successfully loaded only app initiated requests
+
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsappprivacyreportattributionpreflightasynchtmlfromrev279749trunkLayoutTestshttptestsinappbrowserprivacyappboundattributionpreflightasynchtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/http/tests/app-privacy-report/attribution-preflight-async.html (from rev 279749, trunk/LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-preflight-async.html) (0 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/app-privacy-report/attribution-preflight-async.html                         (rev 0)
+++ trunk/LayoutTests/http/tests/app-privacy-report/attribution-preflight-async.html    2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -0,0 +1,46 @@
</span><ins>+<p>Tests app initiated requests get marked for async preflights</p>
+
+<pre id="console"></pre>
+<script>
+if (window.testRunner) {
+    testRunner.dumpAsText();
+    testRunner.waitUntilDone();
+}
+
+function log(message)
+{
+    document.getElementById('console').appendChild(document.createTextNode(message + '\n'));
+}
+
+var preflightLinkDomain = "localhost";
+var contextHost = "127.0.0.1";
+var url = "http://localhost:8000/xmlhttprequest/resources/status-404-without-body.py"
+
+function runTest()
+{
+    var req = new XMLHttpRequest();
+    req.open("GET", url, true);
+    req.setRequestHeader("x-webkit", "foo");
+
+    req.onerror = function() {
+        var didLoadAppInitiatedRequest = testRunner.didLoadAppInitiatedRequest();
+        var didLoadNonAppInitiatedRequest = testRunner.didLoadNonAppInitiatedRequest();
+
+        if (didLoadNonAppInitiatedRequest) {
+            log("FAIL did load non app initiated request");
+            testRunner.notifyDone();
+        }
+
+        if (!didLoadAppInitiatedRequest) {
+            log("FAIL did not load app initiated request");
+            testRunner.notifyDone();
+        }
+
+        log("PASS successfully loaded only app initiated requests");
+        testRunner.notifyDone();
+    }
+    req.send(null);
+}
+
+runTest();
+</script>
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsappprivacyreportattributionpreflightsyncexpectedtxtfromrev279749trunkLayoutTestshttptestsinappbrowserprivacyappboundattributionpreflightsyncexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/http/tests/app-privacy-report/attribution-preflight-sync-expected.txt (from rev 279749, trunk/LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-preflight-sync-expected.txt) (0 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/app-privacy-report/attribution-preflight-sync-expected.txt                          (rev 0)
+++ trunk/LayoutTests/http/tests/app-privacy-report/attribution-preflight-sync-expected.txt     2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -0,0 +1,7 @@
</span><ins>+CONSOLE MESSAGE: Preflight response is not successful
+CONSOLE MESSAGE: XMLHttpRequest cannot load http://localhost:8000/xmlhttprequest/resources/status-404-without-body.py due to access control checks.
+Tests app initiated requests get marked for sync preflights
+
+PASS: NetworkError:  A network error occurred.
+PASS successfully loaded only app initiated requests
+
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsappprivacyreportattributionpreflightsynchtmlfromrev279749trunkLayoutTestshttptestsinappbrowserprivacyappboundattributionpreflightsynchtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/http/tests/app-privacy-report/attribution-preflight-sync.html (from rev 279749, trunk/LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-preflight-sync.html) (0 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/app-privacy-report/attribution-preflight-sync.html                          (rev 0)
+++ trunk/LayoutTests/http/tests/app-privacy-report/attribution-preflight-sync.html     2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -0,0 +1,49 @@
</span><ins>+<p>Tests app initiated requests get marked for sync preflights</p>
+
+<pre id="console"></pre>
+<script>
+if (window.testRunner) {
+    testRunner.dumpAsText();
+    testRunner.waitUntilDone();
+}
+
+function log(message)
+{
+    document.getElementById('console').appendChild(document.createTextNode(message + '\n'));
+}
+
+var preflightLinkDomain = "localhost";
+var contextHost = "127.0.0.1";
+var url = "http://localhost:8000/xmlhttprequest/resources/status-404-without-body.py"
+
+function runTest()
+{
+    var req = new XMLHttpRequest();
+    req.open("GET", url, false);
+    req.setRequestHeader("x-webkit", "foo");
+
+    try {
+        req.send(null);
+        log("PASS: " + req.responseText);
+    } catch (ex) {
+        log("PASS: " + ex);
+        var didLoadAppInitiatedRequest = testRunner.didLoadAppInitiatedRequest();
+        var didLoadNonAppInitiatedRequest = testRunner.didLoadNonAppInitiatedRequest();
+
+        if (didLoadNonAppInitiatedRequest) {
+            log("FAIL did load non app initiated request");
+            testRunner.notifyDone();
+        }
+
+        if (!didLoadAppInitiatedRequest) {
+            log("FAIL did not load app initiated request");
+            testRunner.notifyDone();
+        }
+
+        log("PASS successfully loaded only app initiated requests");
+        testRunner.notifyDone();
+    }
+}
+
+runTest();
+</script>
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsappprivacyreportattributionspeculativerevalidationexpectedtxtfromrev279749trunkLayoutTestshttptestsinappbrowserprivacyappboundattributionspeculativerevalidationexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/http/tests/app-privacy-report/attribution-speculative-revalidation-expected.txt (from rev 279749, trunk/LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-speculative-revalidation-expected.txt) (0 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/app-privacy-report/attribution-speculative-revalidation-expected.txt                                (rev 0)
+++ trunk/LayoutTests/http/tests/app-privacy-report/attribution-speculative-revalidation-expected.txt   2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -0,0 +1,14 @@
</span><ins>+127.0.0.1:8000 - didReceiveAuthenticationChallenge - ProtectionSpaceAuthenticationSchemeHTTPBasic - Responding with testUsername:testPassword
+127.0.0.1:8000 - didReceiveAuthenticationChallenge - ProtectionSpaceAuthenticationSchemeHTTPBasic - Simulating cancelled authentication sheet
+Tests speculative revalidation of authenticated resources.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS xhr.status is 401
+PASS Successfuly loaded.
+PASS successfully loaded only app initiated requests
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsappprivacyreportattributionspeculativerevalidationhtmlfromrev279749trunkLayoutTestshttptestsinappbrowserprivacyappboundattributionspeculativerevalidationhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/http/tests/app-privacy-report/attribution-speculative-revalidation.html (from rev 279749, trunk/LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-speculative-revalidation.html) (0 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/app-privacy-report/attribution-speculative-revalidation.html                                (rev 0)
+++ trunk/LayoutTests/http/tests/app-privacy-report/attribution-speculative-revalidation.html   2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -0,0 +1,72 @@
</span><ins>+<script src="/js-test-resources/js-test-pre.js"></script>
+<script>
+description("Tests speculative revalidation of authenticated resources.");
+jsTestIsAsync = true;
+
+testRunner.setHandlesAuthenticationChallenges(true);
+testRunner.setAuthenticationUsername("testUsername");
+testRunner.setAuthenticationPassword("testPassword");
+
+state = "warmup";
+
+function clearCredentialStorage()
+{
+    xhr = new XMLHttpRequest();
+    xhr.open("GET", "resources/resource-with-auth.py?other", false, "badUsername", "badPassword");
+    xhr.send();
+    shouldBe("xhr.status", "401");
+}
+
+function log(message)
+{
+    document.getElementById('console').appendChild(document.createTextNode(message + '\n'));
+}
+
+function frameLoaded()
+{
+    if (state == "warmup") {
+        // Navigate frame to 'about:blank' to flush to subresource loads metadata to disk.
+        state = "flushingMetadata";
+        testRunner.setHandlesAuthenticationChallenges(false);
+        document.getElementById("testFrame").src = "about:blank";
+        return;
+    }
+    if (state == "flushingMetadata") {
+        clearCredentialStorage();
+
+        internals.clearMemoryCache();
+        testRunner.setHandlesAuthenticationChallenges(false);
+
+        // Navigate frame to its original location again. This time it should speculatively
+        // validate subresources as we have subresource loads metadata in the disk cache.
+        state = "speculativeRevalidation";
+        document.getElementById("testFrame").src = "resources/frame-with-authenticated-resource.py";
+        return;
+    }
+    if (state == "speculativeRevalidation") {
+        testPassed("Successfuly loaded.");
+        var didLoadAppInitiatedRequest = testRunner.didLoadAppInitiatedRequest();
+        var didLoadNonAppInitiatedRequest = testRunner.didLoadNonAppInitiatedRequest();
+
+        if (didLoadNonAppInitiatedRequest) {
+            log("FAIL did load non app initiated request");
+            finishJSTest();
+            return;
+        }
+
+        if (!didLoadAppInitiatedRequest) {
+            log("FAIL did not load app initiated request");
+            finishJSTest();
+            return;
+        }
+
+        log("PASS successfully loaded only app initiated requests");
+
+        finishJSTest();
+        return;
+    }
+}
+
+</script>
+<iframe id="testFrame" src="resources/frame-with-authenticated-resource.py" onload="frameLoaded()"></iframe>
+<script src="/js-test-resources/js-test-post.js"></script>
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsappprivacyreportresourcesframewithauthenticatedresourcepyfromrev279749trunkLayoutTestshttptestsinappbrowserprivacyresourcesframewithauthenticatedresourcepy"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/http/tests/app-privacy-report/resources/frame-with-authenticated-resource.py (from rev 279749, trunk/LayoutTests/http/tests/in-app-browser-privacy/resources/frame-with-authenticated-resource.py) (0 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/app-privacy-report/resources/frame-with-authenticated-resource.py                           (rev 0)
+++ trunk/LayoutTests/http/tests/app-privacy-report/resources/frame-with-authenticated-resource.py      2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -0,0 +1,13 @@
</span><ins>+#!/usr/bin/env python3
+
+import sys
+
+sys.stdout.write(
+    'Cache-Control: max-age=0\r\n'
+    'Etag: 123456789\r\n'
+    'Content-Type: text/html\r\n\r\n'
+    '<!DOCTYPE html>\n'
+    '<body>\n'
+    '<script src="resource-with-auth.py"></script>\n'
+    '</body>\n'
+)
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsappprivacyreportresourcespostpy"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/app-privacy-report/resources/post.py (0 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/app-privacy-report/resources/post.py                                (rev 0)
+++ trunk/LayoutTests/http/tests/app-privacy-report/resources/post.py   2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -0,0 +1,27 @@
</span><ins>+#!/usr/bin/env python3
+
+import os
+import sys
+
+referer = os.environ.get('HTTP_REFERER', '')
+
+sys.stdout.write(
+    'Content-Type: text/html\r\n\r\n'
+    '<p>Referrer: {referer}</p>\n'
+    '<script>\n'
+    'if (window.testRunner) {{\n'
+    '    var didLoadAppInitiatedRequest = testRunner.didLoadAppInitiatedRequest();\n'
+    '    var didLoadNonAppInitiatedRequest = testRunner.didLoadNonAppInitiatedRequest();\n'
+    '    if (didLoadNonAppInitiatedRequest) {{\n'
+    '        console.log("FAIL did load non app initiated request");\n'
+    '        testRunner.notifyDone();\n'
+    '    }}\n'
+    '    if (!didLoadAppInitiatedRequest) {{\n'
+    '         console.log("FAIL did not load app initiated request");\n'
+    '        testRunner.notifyDone();\n'
+    '     }}\n'
+    '    console.log("PASS successfully loaded only app initiated requests");\n'
+    '    testRunner.notifyDone();\n'
+    '}}\n'
+    '</script>\n'.format(referer=referer)
+)
</ins><span class="cx">Property changes on: trunk/LayoutTests/http/tests/app-privacy-report/resources/post.py
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svnexecutable"></a>
<div class="addfile"><h4>Added: svn:executable</h4></div>
<ins>+*
</ins><span class="cx">\ No newline at end of property
</span><a id="trunkLayoutTestshttptestsappprivacyreportresourcesresourcewithauthpyfromrev279749trunkLayoutTestshttptestsinappbrowserprivacyresourcesresourcewithauthpy"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/http/tests/app-privacy-report/resources/resource-with-auth.py (from rev 279749, trunk/LayoutTests/http/tests/in-app-browser-privacy/resources/resource-with-auth.py) (0 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/app-privacy-report/resources/resource-with-auth.py                          (rev 0)
+++ trunk/LayoutTests/http/tests/app-privacy-report/resources/resource-with-auth.py     2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -0,0 +1,29 @@
</span><ins>+#!/usr/bin/env python3
+
+import base64
+import os
+import sys
+
+credentials = base64.b64decode(os.environ.get('HTTP_AUTHORIZATION', ' Og==').split(' ')[1]).decode().split(':')
+username = credentials[0]
+password = ':'.join(credentials[1:])
+
+expectedUsername = 'testUsername'
+expectedPassword = 'testPassword'
+realm = os.environ.get('REQUEST_URI', '')
+
+sys.stdout.write(
+    'Content-Type: text/javascript\r\n'
+    'Cache-Control: max-age=0\r\n'
+    'Etag: 123456789\r\n'
+)
+
+if username != expectedUsername or password != expectedPassword:
+    sys.stdout.write(
+        f'WWW-Authenticate: Basic realm="{realm}"\r\n'
+        'status: 401\r\n\r\n'
+        f'Sent username:password of ({username}:{password}) which is not what was expected\n'
+    )
+    sys.exit(0)
+
+sys.stdout.write('\r\nloaded = true;\n')
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsinappbrowserprivacyappboundattributionloadurlexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-load-url-expected.txt (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-load-url-expected.txt  2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-load-url-expected.txt     2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -1,3 +0,0 @@
</span><del>-Test loadURL requests are succesfully attributed as app-bound.
-PASS successfully loaded only app-bound requests
-
</del></span></pre></div>
<a id="trunkLayoutTestshttptestsinappbrowserprivacyappboundattributionloadurlhtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-load-url.html (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-load-url.html  2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-load-url.html     2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -1,48 +0,0 @@
</span><del>-<!DOCTYPE html>
-<html>
-<head>
-    <script src="resources/util.js"></script>
-</head>
-<body onload="setTimeout('runTest()', 0)">
-<div id="description">Test loadURL requests are succesfully attributed as app-bound.</div>
-<pre id="console"></pre>
-<script>
-    if (window.testRunner) {
-        testRunner.waitUntilDone();
-        testRunner.dumpAsText();
-    }
-
-    function loadURL() {
-        document.location.href = destinationOrigin + "/in-app-browser-privacy/app-bound-attribution-load-url.html";
-    }
-
-    function log(message) {
-        document.getElementById('console').appendChild(document.createTextNode(message + '\n'));
-    }
-
-    const destinationOrigin = "http://localhost:8000";
-    const startingOrigin = "http://127.0.0.1:8000";
-    function runTest() {
-        if (document.location.origin === startingOrigin) {
-            loadURL();
-        } else {
-            var didLoadAppBoundRequest = testRunner.didLoadAppBoundRequest();
-            var didLoadNonAppBoundRequest = testRunner.didLoadNonAppBoundRequest();
-
-            if (didLoadNonAppBoundRequest) {
-                log("FAIL did load non app-bound request");
-                testRunner.notifyDone();
-            }
-
-            if (!didLoadAppBoundRequest) {
-                log("FAIL did not load app-bound request");
-                testRunner.notifyDone();
-            }
-
-            log("PASS successfully loaded only app-bound requests");
-            testRunner.notifyDone();
-        }
-    }
-</script>
-</body>
-</html>
</del></span></pre></div>
<a id="trunkLayoutTestshttptestsinappbrowserprivacyappboundattributionpingloadexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-ping-load-expected.txt (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-ping-load-expected.txt 2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-ping-load-expected.txt    2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -1,8 +0,0 @@
</span><del>-CONSOLE MESSAGE: PASS successfully loaded only app-bound requests
-Ping sent successfully
-CONTENT_TYPE: text/ping
-HTTP_HOST: 127.0.0.1:8000
-HTTP_PING_FROM: http://127.0.0.1:8000/in-app-browser-privacy/app-bound-attribution-ping-load.html
-HTTP_PING_TO: http://127.0.0.1:8000/navigation/resources/check-ping-app-bound-data.py
-REQUEST_METHOD: POST
-REQUEST_URI: /navigation/resources/save-ping.py
</del></span></pre></div>
<a id="trunkLayoutTestshttptestsinappbrowserprivacyappboundattributionpingloadhtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-ping-load.html (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-ping-load.html 2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-ping-load.html    2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -1,30 +0,0 @@
</span><del>-<!DOCTYPE html>
-<html>
-<head>
-<script src="../navigation/ping-attribute/resources/utilities.js"></script>
-<script>
-if (window.testRunner && window.internals) {
-    testRunner.dumpAsText();
-    testRunner.setStatisticsShouldDowngradeReferrer(false, function () { });
-    internals.settings.setHyperlinkAuditingEnabled(true);
-    testRunner.waitUntilDone();
-}
-
-function test()
-{
-    clickElement(document.querySelector("img"));
-}
-
-window.onload = function ()
-{
-    clearLastPingResultAndRunTest(test);
-}
-</script>
-</head>
-<body>
-    <img src="non-existent-image.jpg" width="128" height="128" usemap="#imagemap">
-    <map name="imagemap">
-        <area shape="rect" coords="0,0,128,128" href="../navigation/resources/check-ping-app-bound-data.py" ping="../navigation/resources/save-ping.py">
-    </map>
-</body>
-</html>
</del></span></pre></div>
<a id="trunkLayoutTestshttptestsinappbrowserprivacyappboundattributionpostrequestexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-post-request-expected.txt (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-post-request-expected.txt      2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-post-request-expected.txt 2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -1,4 +0,0 @@
</span><del>-CONSOLE MESSAGE: PASS successfully loaded only app-bound requests
-Tests app bound requests get marked for POST requests.
-
-
</del></span></pre></div>
<a id="trunkLayoutTestshttptestsinappbrowserprivacyappboundattributionpostrequesthtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-post-request.html (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-post-request.html      2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-post-request.html 2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -1,22 +0,0 @@
</span><del>-<!DOCTYPE html>
-<html>
-<head>
-<meta charset="utf-8">
-<script src="../../../resources/js-test-pre.js"></script>
-</head>
-<body>
-<p>Tests app bound requests get marked for POST requests.</p>
-<form id="testForm" action="resources/post.py" target="_blank" rel="noreferrer" method="post">
-<input type="submit" value="Test"></input>
-<form>
-<script>
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.setCanOpenWindows(true);
-}
-
-document.forms[0].submit();
-
-</script>
-</body>
-</html>
</del></span></pre></div>
<a id="trunkLayoutTestshttptestsinappbrowserprivacyappboundattributionpreflightasyncexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-preflight-async-expected.txt (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-preflight-async-expected.txt   2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-preflight-async-expected.txt      2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -1,6 +0,0 @@
</span><del>-CONSOLE MESSAGE: Preflight response is not successful
-CONSOLE MESSAGE: XMLHttpRequest cannot load http://localhost:8000/xmlhttprequest/resources/status-404-without-body.py due to access control checks.
-Tests app bound requests get marked for async preflights
-
-PASS successfully loaded only app-bound requests
-
</del></span></pre></div>
<a id="trunkLayoutTestshttptestsinappbrowserprivacyappboundattributionpreflightasynchtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-preflight-async.html (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-preflight-async.html   2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-preflight-async.html      2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -1,46 +0,0 @@
</span><del>-<p>Tests app bound requests get marked for async preflights</p>
-
-<pre id="console"></pre>
-<script>
-if (window.testRunner) {
-    testRunner.dumpAsText();
-    testRunner.waitUntilDone();
-}
-
-function log(message)
-{
-    document.getElementById('console').appendChild(document.createTextNode(message + '\n'));
-}
-
-var preflightLinkDomain = "localhost";
-var contextHost = "127.0.0.1";
-var url = "http://localhost:8000/xmlhttprequest/resources/status-404-without-body.py"
-
-function runTest()
-{
-    var req = new XMLHttpRequest();
-    req.open("GET", url, true);
-    req.setRequestHeader("x-webkit", "foo");
-
-    req.onerror = function() {
-        var didLoadAppBoundRequest = testRunner.didLoadAppBoundRequest();
-        var didLoadNonAppBoundRequest = testRunner.didLoadNonAppBoundRequest();
-
-        if (didLoadNonAppBoundRequest) {
-            log("FAIL did load non app-bound request");
-            testRunner.notifyDone();
-        }
-
-        if (!didLoadAppBoundRequest) {
-            log("FAIL did not load app-bound request");
-            testRunner.notifyDone();
-        }
-
-        log("PASS successfully loaded only app-bound requests");
-        testRunner.notifyDone();
-    }
-    req.send(null);
-}
-
-runTest();
-</script>
</del></span></pre></div>
<a id="trunkLayoutTestshttptestsinappbrowserprivacyappboundattributionpreflightsyncexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-preflight-sync-expected.txt (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-preflight-sync-expected.txt    2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-preflight-sync-expected.txt       2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -1,7 +0,0 @@
</span><del>-CONSOLE MESSAGE: Preflight response is not successful
-CONSOLE MESSAGE: XMLHttpRequest cannot load http://localhost:8000/xmlhttprequest/resources/status-404-without-body.py due to access control checks.
-Tests app bound requests get marked for sync preflights
-
-PASS: NetworkError:  A network error occurred.
-PASS successfully loaded only app-bound requests
-
</del></span></pre></div>
<a id="trunkLayoutTestshttptestsinappbrowserprivacyappboundattributionpreflightsynchtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-preflight-sync.html (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-preflight-sync.html    2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-preflight-sync.html       2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -1,49 +0,0 @@
</span><del>-<p>Tests app bound requests get marked for sync preflights</p>
-
-<pre id="console"></pre>
-<script>
-if (window.testRunner) {
-    testRunner.dumpAsText();
-    testRunner.waitUntilDone();
-}
-
-function log(message)
-{
-    document.getElementById('console').appendChild(document.createTextNode(message + '\n'));
-}
-
-var preflightLinkDomain = "localhost";
-var contextHost = "127.0.0.1";
-var url = "http://localhost:8000/xmlhttprequest/resources/status-404-without-body.py"
-
-function runTest()
-{
-    var req = new XMLHttpRequest();
-    req.open("GET", url, false);
-    req.setRequestHeader("x-webkit", "foo");
-
-    try {
-        req.send(null);
-        log("PASS: " + req.responseText);
-    } catch (ex) {
-        log("PASS: " + ex);
-        var didLoadAppBoundRequest = testRunner.didLoadAppBoundRequest();
-        var didLoadNonAppBoundRequest = testRunner.didLoadNonAppBoundRequest();
-
-        if (didLoadNonAppBoundRequest) {
-            log("FAIL did load non app-bound request");
-            testRunner.notifyDone();
-        }
-
-        if (!didLoadAppBoundRequest) {
-            log("FAIL did not load app-bound request");
-            testRunner.notifyDone();
-        }
-
-        log("PASS successfully loaded only app-bound requests");
-        testRunner.notifyDone();
-    }
-}
-
-runTest();
-</script>
</del></span></pre></div>
<a id="trunkLayoutTestshttptestsinappbrowserprivacyappboundattributionspeculativerevalidationexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-speculative-revalidation-expected.txt (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-speculative-revalidation-expected.txt  2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-speculative-revalidation-expected.txt     2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -1,14 +0,0 @@
</span><del>-127.0.0.1:8000 - didReceiveAuthenticationChallenge - ProtectionSpaceAuthenticationSchemeHTTPBasic - Responding with testUsername:testPassword
-127.0.0.1:8000 - didReceiveAuthenticationChallenge - ProtectionSpaceAuthenticationSchemeHTTPBasic - Simulating cancelled authentication sheet
-Tests speculative revalidation of authenticated resources.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS xhr.status is 401
-PASS Successfuly loaded.
-PASS successfully loaded only app-bound requests
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
</del></span></pre></div>
<a id="trunkLayoutTestshttptestsinappbrowserprivacyappboundattributionspeculativerevalidationhtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-speculative-revalidation.html (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-speculative-revalidation.html  2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/LayoutTests/http/tests/in-app-browser-privacy/app-bound-attribution-speculative-revalidation.html     2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -1,72 +0,0 @@
</span><del>-<script src="/js-test-resources/js-test-pre.js"></script>
-<script>
-description("Tests speculative revalidation of authenticated resources.");
-jsTestIsAsync = true;
-
-testRunner.setHandlesAuthenticationChallenges(true);
-testRunner.setAuthenticationUsername("testUsername");
-testRunner.setAuthenticationPassword("testPassword");
-
-state = "warmup";
-
-function clearCredentialStorage()
-{
-    xhr = new XMLHttpRequest();
-    xhr.open("GET", "resources/resource-with-auth.py?other", false, "badUsername", "badPassword");
-    xhr.send();
-    shouldBe("xhr.status", "401");
-}
-
-function log(message)
-{
-    document.getElementById('console').appendChild(document.createTextNode(message + '\n'));
-}
-
-function frameLoaded()
-{
-    if (state == "warmup") {
-        // Navigate frame to 'about:blank' to flush to subresource loads metadata to disk.
-        state = "flushingMetadata";
-        testRunner.setHandlesAuthenticationChallenges(false);
-        document.getElementById("testFrame").src = "about:blank";
-        return;
-    }
-    if (state == "flushingMetadata") {
-        clearCredentialStorage();
-
-        internals.clearMemoryCache();
-        testRunner.setHandlesAuthenticationChallenges(false);
-
-        // Navigate frame to its original location again. This time it should speculatively
-        // validate subresources as we have subresource loads metadata in the disk cache.
-        state = "speculativeRevalidation";
-        document.getElementById("testFrame").src = "resources/frame-with-authenticated-resource.py";
-        return;
-    }
-    if (state == "speculativeRevalidation") {
-        testPassed("Successfuly loaded.");
-        var didLoadAppBoundRequest = testRunner.didLoadAppBoundRequest();
-        var didLoadNonAppBoundRequest = testRunner.didLoadNonAppBoundRequest();
-
-        if (didLoadNonAppBoundRequest) {
-            log("FAIL did load non app-bound request");
-            finishJSTest();
-            return;
-        }
-
-        if (!didLoadAppBoundRequest) {
-            log("FAIL did not load app-bound request");
-            finishJSTest();
-            return;
-        }
-
-        log("PASS successfully loaded only app-bound requests");
-
-        finishJSTest();
-        return;
-    }
-}
-
-</script>
-<iframe id="testFrame" src="resources/frame-with-authenticated-resource.py" onload="frameLoaded()"></iframe>
-<script src="/js-test-resources/js-test-post.js"></script>
</del></span></pre></div>
<a id="trunkLayoutTestshttptestsinappbrowserprivacycontextstringforsubframeexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/http/tests/in-app-browser-privacy/context-string-for-subframe-expected.txt (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/in-app-browser-privacy/context-string-for-subframe-expected.txt     2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/LayoutTests/http/tests/in-app-browser-privacy/context-string-for-subframe-expected.txt        2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -1,10 +0,0 @@
</span><del>-Tests that the app-bound-request context string gets properly set for an iframe
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS Context string for sub frame correctly captured.
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
</del></span></pre></div>
<a id="trunkLayoutTestshttptestsinappbrowserprivacycontextstringforsubframehtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/http/tests/in-app-browser-privacy/context-string-for-subframe.html (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/in-app-browser-privacy/context-string-for-subframe.html     2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/LayoutTests/http/tests/in-app-browser-privacy/context-string-for-subframe.html        2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -1,42 +0,0 @@
</span><del>-<!DOCTYPE html>
-<html>
-<head>
-    <script src="/js-test-resources/js-test.js"></script>
-    <script src="../resources/util.js"></script>
-</head>
-<body>
-<script>
-    description("Tests that the app-bound-request context string gets properly set for an iframe");
-    jsTestIsAsync = true;
-
-    const subFrameHost = "localhost";
-    const contextHost = "127.0.0.1";
-    function askForContextStringForSubFrame() {
-        testRunner.appBoundRequestContextDataForDomain(subFrameHost, function (contextData) {
-            if (contextData == null) {
-                askForContextStringForSubFrame();
-                return;
-            }
-
-            if (contextData == contextHost)
-                testPassed("Context string for sub frame correctly captured.");
-            else
-                testFailed("Context string for sub frame NOT correctly captured.");
-
-            finishJSTest();
-        });
-    }
-
-    function openIframe(url, onLoadHandler) {
-        const element = document.createElement("iframe");
-        element.src = url;
-        if (onLoadHandler) {
-            element.onload = onLoadHandler;
-        }
-        document.body.appendChild(element);
-    }
-
-    openIframe("http://localhost:8000/in-app-browser-privacy/resources/basic-iframe.html&dummy=" + Math.random(), askForContextStringForSubFrame);
-</script>
-</body>
-</html>
</del></span></pre></div>
<a id="trunkLayoutTestshttptestsinappbrowserprivacycontextstringpreconnectexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/http/tests/in-app-browser-privacy/context-string-preconnect-expected.txt (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/in-app-browser-privacy/context-string-preconnect-expected.txt       2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/LayoutTests/http/tests/in-app-browser-privacy/context-string-preconnect-expected.txt  2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -1,11 +0,0 @@
</span><del>-CONSOLE MESSAGE: Successfully preconnected to http://localhost:8000/
-Tests that preconnect tasks get marked with the proper context string.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS Context string for preconnect correctly captured.
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
</del></span></pre></div>
<a id="trunkLayoutTestshttptestsinappbrowserprivacycontextstringpreconnecthtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/http/tests/in-app-browser-privacy/context-string-preconnect.html (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/in-app-browser-privacy/context-string-preconnect.html       2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/LayoutTests/http/tests/in-app-browser-privacy/context-string-preconnect.html  2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -1,40 +0,0 @@
</span><del>-<!DOCTYPE html>
-<html>
-<head>
-<script src="/js-test-resources/js-test.js"></script>
-</head>
-<body>
-<script>
-description("Tests that preconnect tasks get marked with the proper context string.");
-jsTestIsAsync = true;
-
-var preconnectLinkDomain = "localhost";
-var contextHost = "127.0.0.1";
-
-function askForContextStringForPreconnect() {
-    testRunner.appBoundRequestContextDataForDomain(preconnectLinkDomain, function (contextData) {
-        if (contextData == null) {
-            askForContextStringForPreconnect();
-            return;
-        }
-
-        if (contextData == contextHost)
-            testPassed("Context string for preconnect correctly captured.");
-        else
-            testFailed("Context string for preconnect NOT correctly captured.");
-
-        finishJSTest();
-    });
-}
-
-internals.setConsoleMessageListener(function() {
-    askForContextStringForPreconnect();
-});
-
-const testLink = document.createElement("link");
-testLink.rel = "preconnect";
-testLink.href = "http://localhost:8000";
-document.head.appendChild(testLink);
-</script>
-</body>
-</html>
</del></span></pre></div>
<a id="trunkLayoutTestshttptestsinappbrowserprivacycontextstringpreflightexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/http/tests/in-app-browser-privacy/context-string-preflight-expected.txt (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/in-app-browser-privacy/context-string-preflight-expected.txt        2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/LayoutTests/http/tests/in-app-browser-privacy/context-string-preflight-expected.txt   2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -1,9 +0,0 @@
</span><del>-CONSOLE MESSAGE: Preflight response is not successful
-CONSOLE MESSAGE: XMLHttpRequest cannot load http://localhost:8000/xmlhttprequest/resources/status-404-without-body.py due to access control checks.
-CONSOLE MESSAGE: Preflight response is not successful
-CONSOLE MESSAGE: XMLHttpRequest cannot load http://localhost:8000/xmlhttprequest/resources/status-404-without-body.py due to access control checks.
-Tests that not successful preflight responses make preflight failing
-
-PASS: NetworkError:  A network error occurred.
-PASS Context string for CORS preflight correctly captured.
-
</del></span></pre></div>
<a id="trunkLayoutTestshttptestsinappbrowserprivacycontextstringpreflighthtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/http/tests/in-app-browser-privacy/context-string-preflight.html (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/in-app-browser-privacy/context-string-preflight.html        2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/LayoutTests/http/tests/in-app-browser-privacy/context-string-preflight.html   2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -1,62 +0,0 @@
</span><del>-<p>Tests that not successful preflight responses make preflight failing</p>
-
-<pre id="console"></pre>
-<script>
-if (window.testRunner) {
-    testRunner.dumpAsText();
-    testRunner.waitUntilDone();
-}
-
-function log(message)
-{
-    document.getElementById('console').appendChild(document.createTextNode(message + '\n'));
-}
-    
-var preflightLinkDomain = "localhost";
-var contextHost = "127.0.0.1";
-var url = "http://localhost:8000/xmlhttprequest/resources/status-404-without-body.py"
-
-function askForContextStringForPreflight() {
-    testRunner.appBoundRequestContextDataForDomain(preflightLinkDomain, function (contextData) {
-        if (contextData == null) {
-            askForContextStringForPreflight();
-            return;
-        }
-
-        if (contextData == contextHost)
-            log("PASS Context string for CORS preflight correctly captured.");
-        else
-            log("FAIL Context string for CORS preflight NOT correctly captured.");
-
-        testRunner.notifyDone();
-    });
-}
-
-function runTest()
-{
-    var req = new XMLHttpRequest();
-    req.open("GET", url, false);
-    req.setRequestHeader("x-webkit", "foo");
-
-    try {
-        req.send(null);
-        log("PASS: " + req.responseText);
-    } catch (ex) {
-        log("PASS: " + ex);
-    }
-
-    req = new XMLHttpRequest();
-    req.open("GET", url, true);
-    req.setRequestHeader("x-webkit", "foo");
-
-    req.onload = function() {
-        askForContextStringForPreflight();
-    }
-    req.onerror = function() {
-        askForContextStringForPreflight();
-    }
-    req.send(null);
-}
-
-runTest();
-</script>
</del></span></pre></div>
<a id="trunkLayoutTestshttptestsinappbrowserprivacyresourcesframewithauthenticatedresourcepy"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/http/tests/in-app-browser-privacy/resources/frame-with-authenticated-resource.py (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/in-app-browser-privacy/resources/frame-with-authenticated-resource.py       2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/LayoutTests/http/tests/in-app-browser-privacy/resources/frame-with-authenticated-resource.py  2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -1,13 +0,0 @@
</span><del>-#!/usr/bin/env python3
-
-import sys
-
-sys.stdout.write(
-    'Cache-Control: max-age=0\r\n'
-    'Etag: 123456789\r\n'
-    'Content-Type: text/html\r\n\r\n'
-    '<!DOCTYPE html>\n'
-    '<body>\n'
-    '<script src="resource-with-auth.py"></script>\n'
-    '</body>\n'
-)
</del></span></pre></div>
<a id="trunkLayoutTestshttptestsinappbrowserprivacyresourcespostpy"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/http/tests/in-app-browser-privacy/resources/post.py (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/in-app-browser-privacy/resources/post.py    2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/LayoutTests/http/tests/in-app-browser-privacy/resources/post.py       2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -1,27 +0,0 @@
</span><del>-#!/usr/bin/env python3
-
-import os
-import sys
-
-referer = os.environ.get('HTTP_REFERER', '')
-
-sys.stdout.write(
-    'Content-Type: text/html\r\n\r\n'
-    '<p>Referrer: {referer}</p>\n'
-    '<script>\n'
-    'if (window.testRunner) {{\n'
-    '    var didLoadAppBoundRequest = testRunner.didLoadAppBoundRequest();\n'
-    '    var didLoadNonAppBoundRequest = testRunner.didLoadNonAppBoundRequest();\n'
-    '    if (didLoadNonAppBoundRequest) {{\n'
-    '        console.log("FAIL did load non app-bound request");\n'
-    '        testRunner.notifyDone();\n'
-    '    }}\n'
-    '    if (!didLoadAppBoundRequest) {{\n'
-    '         console.log("FAIL did not load app-bound request");\n'
-    '        testRunner.notifyDone();\n'
-    '     }}\n'
-    '    console.log("PASS successfully loaded only app-bound requests");\n'
-    '    testRunner.notifyDone();\n'
-    '}}\n'
-    '</script>\n'.format(referer=referer)
-)
</del></span></pre></div>
<a id="trunkLayoutTestshttptestsinappbrowserprivacyresourcesresourcewithauthpy"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/http/tests/in-app-browser-privacy/resources/resource-with-auth.py (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/in-app-browser-privacy/resources/resource-with-auth.py      2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/LayoutTests/http/tests/in-app-browser-privacy/resources/resource-with-auth.py 2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -1,29 +0,0 @@
</span><del>-#!/usr/bin/env python3
-
-import base64
-import os
-import sys
-
-credentials = base64.b64decode(os.environ.get('HTTP_AUTHORIZATION', ' Og==').split(' ')[1]).decode().split(':')
-username = credentials[0]
-password = ':'.join(credentials[1:])
-
-expectedUsername = 'testUsername'
-expectedPassword = 'testPassword'
-realm = os.environ.get('REQUEST_URI', '')
-
-sys.stdout.write(
-    'Content-Type: text/javascript\r\n'
-    'Cache-Control: max-age=0\r\n'
-    'Etag: 123456789\r\n'
-)
-
-if username != expectedUsername or password != expectedPassword:
-    sys.stdout.write(
-        f'WWW-Authenticate: Basic realm="{realm}"\r\n'
-        'status: 401\r\n\r\n'
-        f'Sent username:password of ({username}:{password}) which is not what was expected\n'
-    )
-    sys.exit(0)
-
-sys.stdout.write('\r\nloaded = true;\n')
</del></span></pre></div>
<a id="trunkLayoutTestshttptestsnavigationresourcescheckpingappbounddatapy"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/http/tests/navigation/resources/check-ping-app-bound-data.py (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/navigation/resources/check-ping-app-bound-data.py   2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/LayoutTests/http/tests/navigation/resources/check-ping-app-bound-data.py      2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -1,44 +0,0 @@
</span><del>-#!/usr/bin/env python3
-
-import os
-import sys
-import time
-from ping_file_path import ping_filepath
-
-sys.stdout.write('Content-Type: text/html\r\n\r\n')
-
-while not os.path.isfile(ping_filepath):
-    time.sleep(0.01)
-
-sys.stdout.write(
-    '<html><body>\n'
-    'Ping sent successfully'
-)
-
-ping_file = open(ping_filepath, 'r')
-for line in ping_file.readlines():
-    sys.stdout.write('<br>{}'.format(line.strip()))
-
-ping_file.close()
-if os.path.isfile(ping_filepath):
-    os.remove(ping_filepath)
-
-sys.stdout.write(
-    '<script>'
-    'if (window.testRunner) {{\n'
-    '    var didLoadAppBoundRequest = testRunner.didLoadAppBoundRequest();\n'
-    '    var didLoadNonAppBoundRequest = testRunner.didLoadNonAppBoundRequest();\n'
-    '    if (didLoadNonAppBoundRequest) {{\n'
-    '        console.log("FAIL did load non app-bound request");\n'
-    '        testRunner.notifyDone();\n'
-    '    }}\n'
-    '    if (!didLoadAppBoundRequest) {{\n'
-    '         console.log("FAIL did not load app-bound request");\n'
-    '        testRunner.notifyDone();\n'
-    '     }}\n'
-    '    console.log("PASS successfully loaded only app-bound requests");\n'
-    '    testRunner.notifyDone();\n'
-    '}}\n'
-    '</script>'
-    '</body></html>'
-)
</del></span></pre></div>
<a id="trunkLayoutTestshttptestsnavigationresourcescheckpingappinitiateddatapyfromrev279749trunkLayoutTestshttptestsnavigationresourcescheckpingappbounddatapy"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/http/tests/navigation/resources/check-ping-app-initiated-data.py (from rev 279749, trunk/LayoutTests/http/tests/navigation/resources/check-ping-app-bound-data.py) (0 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/navigation/resources/check-ping-app-initiated-data.py                               (rev 0)
+++ trunk/LayoutTests/http/tests/navigation/resources/check-ping-app-initiated-data.py  2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -0,0 +1,44 @@
</span><ins>+#!/usr/bin/env python3
+
+import os
+import sys
+import time
+from ping_file_path import ping_filepath
+
+sys.stdout.write('Content-Type: text/html\r\n\r\n')
+
+while not os.path.isfile(ping_filepath):
+    time.sleep(0.01)
+
+sys.stdout.write(
+    '<html><body>\n'
+    'Ping sent successfully'
+)
+
+ping_file = open(ping_filepath, 'r')
+for line in ping_file.readlines():
+    sys.stdout.write('<br>{}'.format(line.strip()))
+
+ping_file.close()
+if os.path.isfile(ping_filepath):
+    os.remove(ping_filepath)
+
+sys.stdout.write(
+    '<script>'
+    'if (window.testRunner) {{\n'
+    '    var didLoadAppInitiatedRequest = testRunner.didLoadAppInitiatedRequest();\n'
+    '    var didLoadNonAppInitiatedRequest = testRunner.didLoadNonAppInitiatedRequest();\n'
+    '    if (didLoadNonAppInitiatedRequest) {{\n'
+    '        console.log("FAIL did load non app initiated request");\n'
+    '        testRunner.notifyDone();\n'
+    '    }}\n'
+    '    if (!didLoadAppInitiatedRequest) {{\n'
+    '         console.log("FAIL did not load app initiated request");\n'
+    '        testRunner.notifyDone();\n'
+    '     }}\n'
+    '    console.log("PASS successfully loaded only app initiated requests");\n'
+    '    testRunner.notifyDone();\n'
+    '}}\n'
+    '</script>'
+    '</body></html>'
+)
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformioswk2TestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/ios-wk2/TestExpectations (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-wk2/TestExpectations      2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/LayoutTests/platform/ios-wk2/TestExpectations 2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -1815,17 +1815,6 @@
</span><span class="cx"> 
</span><span class="cx"> http/tests/in-app-browser-privacy/ [ Pass ]
</span><span class="cx"> 
</span><del>-# Some In-App Browser Privacy tests rely on functions in WebKitAdditions.
-http/tests/in-app-browser-privacy/context-string-for-subframe.html [ Skip ]
-http/tests/in-app-browser-privacy/context-string-preconnect.html [ Skip ]
-http/tests/in-app-browser-privacy/context-string-preflight.html [ Skip ]
-http/tests/in-app-browser-privacy/app-bound-attribution-preflight-async.html [ Skip ]
-http/tests/in-app-browser-privacy/app-bound-attribution-preflight-sync.html [ Skip ]
-http/tests/in-app-browser-privacy/app-bound-attribution-speculative-revalidation.html [ Skip ]
-http/tests/in-app-browser-privacy/app-bound-attribution-load-url.html [ Skip ]
-http/tests/in-app-browser-privacy/app-bound-attribution-ping-load.html [ Skip ]
-http/tests/in-app-browser-privacy/app-bound-attribution-post-request.html [ Skip ]
-
</del><span class="cx"> webkit.org/b/175193 fast/images/async-image-body-background-image.html [ Pass Timeout ]
</span><span class="cx"> 
</span><span class="cx"> webkit.org/b/215110 [ Release ] imported/w3c/web-platform-tests/css/css-animations/webkit-writing-mode-crash.html [ Pass Failure ]
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog   2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Source/WebCore/ChangeLog      2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -1,3 +1,93 @@
</span><ins>+2021-07-08  Kate Cheney  <katherine_cheney@apple.com>
+
+        Clean up App Privacy Report code
+        https://bugs.webkit.org/show_bug.cgi?id=227326
+        <rdar://problem/79696849>
+
+        Reviewed by Brent Fulgham.
+
+        Tests: http/tests/app-privacy-report/attribution-load-url.html
+               http/tests/app-privacy-report/attribution-ping-load.html
+               http/tests/app-privacy-report/attribution-post-request.html
+               http/tests/app-privacy-report/attribution-preflight-async.html
+               http/tests/app-privacy-report/attribution-preflight-sync.html
+               http/tests/app-privacy-report/attribution-speculative-revalidation.html
+
+        Rename App Privacy Report code to better align with the code's purpose
+        of attributing loads to the app or not. The default value should
+        be app initiated based on the documentation, so this patch also adjusts
+        the default value as needed.
+
+        * loader/CrossOriginAccessControl.cpp:
+        (WebCore::createAccessControlPreflightRequest):
+        * loader/DocumentLoader.h:
+        (WebCore::DocumentLoader::lastNavigationWasAppInitiated const):
+        (WebCore::DocumentLoader::setLastNavigationWasAppInitiated):
+        (WebCore::DocumentLoader::lastNavigationWasAppBound const): Deleted.
+        (WebCore::DocumentLoader::setLastNavigationWasAppBound): Deleted.
+        * loader/FrameLoader.cpp:
+        (WebCore::FrameLoader::load):
+        (WebCore::FrameLoader::updateRequestAndAddExtraFields):
+        * loader/FrameLoader.h:
+        * platform/network/ResourceRequestBase.cpp:
+        (WebCore::ResourceRequestBase::setAsIsolatedCopy):
+        * platform/network/ResourceRequestBase.h:
+        (WebCore::ResourceRequestBase::isAppInitiated const):
+        (WebCore::ResourceRequestBase::setIsAppInitiated):
+        (WebCore::ResourceRequestBase::ResourceRequestBase):
+        (WebCore::ResourceRequestBase::encodeBase const):
+        (WebCore::ResourceRequestBase::decodeBase):
+        (WebCore::ResourceRequestBase::isAppBound const): Deleted.
+        (WebCore::ResourceRequestBase::setIsAppBound): Deleted.
+        * testing/ServiceWorkerInternals.cpp:
+        (WebCore::ServiceWorkerInternals::lastNavigationWasAppInitiated):
+        (WebCore::ServiceWorkerInternals::lastNavigationWasAppBound): Deleted.
+        * testing/ServiceWorkerInternals.h:
+        * testing/ServiceWorkerInternals.idl:
+        * workers/service/ServiceWorkerClientData.cpp:
+        (WebCore::ServiceWorkerClientData::isolatedCopy const):
+        (WebCore::ServiceWorkerClientData::from):
+        * workers/service/ServiceWorkerClientData.h:
+        (WebCore::ServiceWorkerClientData::encode const):
+        (WebCore::ServiceWorkerClientData::decode):
+        * workers/service/ServiceWorkerContextData.cpp:
+        (WebCore::ServiceWorkerContextData::isolatedCopy const):
+        * workers/service/ServiceWorkerContextData.h:
+        (WebCore::ServiceWorkerContextData::encode const):
+        (WebCore::ServiceWorkerContextData::decode):
+        * workers/service/context/ServiceWorkerThreadProxy.cpp:
+        (WebCore::ServiceWorkerThreadProxy::ServiceWorkerThreadProxy):
+        (WebCore::ServiceWorkerThreadProxy::setLastNavigationWasAppInitiated):
+        (WebCore::ServiceWorkerThreadProxy::lastNavigationWasAppInitiated):
+        (WebCore::ServiceWorkerThreadProxy::setLastNavigationWasAppBound): Deleted.
+        (WebCore::ServiceWorkerThreadProxy::lastNavigationWasAppBound): Deleted.
+        * workers/service/context/ServiceWorkerThreadProxy.h:
+        * workers/service/server/RegistrationDatabase.cpp:
+        (WebCore::RegistrationDatabase::importRecords):
+        * workers/service/server/SWServer.cpp:
+        (WebCore::SWServer::startScriptFetch):
+        (WebCore::SWServer::updateWorker):
+        (WebCore::SWServer::clientIsAppInitiatedForRegistrableDomain):
+        (WebCore::SWServer::updateAppInitiatedValueForWorkers):
+        (WebCore::SWServer::registerServiceWorkerClient):
+        (WebCore::SWServer::unregisterServiceWorkerClient):
+        (WebCore::SWServer::clientIsAppBoundForRegistrableDomain): Deleted.
+        (WebCore::SWServer::updateAppBoundValueForWorkers): Deleted.
+        * workers/service/server/SWServer.h:
+        * workers/service/server/SWServerRegistration.cpp:
+        (WebCore::SWServerRegistration::scheduleSoftUpdate):
+        * workers/service/server/SWServerRegistration.h:
+        (WebCore::SWServerRegistration::isAppInitiated):
+        (WebCore::SWServerRegistration::isAppBound): Deleted.
+        * workers/service/server/SWServerToContextConnection.h:
+        * workers/service/server/SWServerWorker.cpp:
+        (WebCore::m_lastNavigationWasAppInitiated):
+        (WebCore::SWServerWorker::contextData const):
+        (WebCore::SWServerWorker::updateAppInitiatedValue):
+        (WebCore::m_lastNavigationWasAppBound): Deleted.
+        (WebCore::SWServerWorker::updateAppBoundValue): Deleted.
+        * workers/service/server/SWServerWorker.h:
+
</ins><span class="cx"> 2021-07-08  Ryosuke Niwa  <rniwa@webkit.org>
</span><span class="cx"> 
</span><span class="cx">         Deploy smart pointers in PointerCaptureController
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderCrossOriginAccessControlcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/CrossOriginAccessControl.cpp (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/CrossOriginAccessControl.cpp 2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Source/WebCore/loader/CrossOriginAccessControl.cpp    2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -89,7 +89,7 @@
</span><span class="cx">     preflightRequest.setHTTPHeaderField(HTTPHeaderName::AccessControlRequestMethod, request.httpMethod());
</span><span class="cx">     preflightRequest.setPriority(request.priority());
</span><span class="cx">     preflightRequest.setFirstPartyForCookies(request.firstPartyForCookies());
</span><del>-    preflightRequest.setIsAppBound(request.isAppBound());
</del><ins>+    preflightRequest.setIsAppInitiated(request.isAppInitiated());
</ins><span class="cx">     if (!referrer.isNull())
</span><span class="cx">         preflightRequest.setHTTPReferrer(referrer);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderDocumentLoaderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/DocumentLoader.h (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/DocumentLoader.h     2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Source/WebCore/loader/DocumentLoader.h        2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -419,8 +419,8 @@
</span><span class="cx">     WEBCORE_EXPORT bool setControllingServiceWorkerRegistration(ServiceWorkerRegistrationData&&);
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    bool lastNavigationWasAppBound() const { return m_lastNavigationWasAppBound; }
-    void setLastNavigationWasAppBound(bool lastNavigationWasAppBound) { m_lastNavigationWasAppBound = lastNavigationWasAppBound; }
</del><ins>+    bool lastNavigationWasAppInitiated() const { return m_lastNavigationWasAppInitiated; }
+    void setLastNavigationWasAppInitiated(bool lastNavigationWasAppInitiated) { m_lastNavigationWasAppInitiated = lastNavigationWasAppInitiated; }
</ins><span class="cx"> 
</span><span class="cx"> protected:
</span><span class="cx">     WEBCORE_EXPORT DocumentLoader(const ResourceRequest&, const SubstituteData&);
</span><span class="lines">@@ -659,7 +659,7 @@
</span><span class="cx">     bool m_allowsWebArchiveForMainFrame { false };
</span><span class="cx">     bool m_allowsDataURLsForMainFrame { false };
</span><span class="cx"> 
</span><del>-    bool m_lastNavigationWasAppBound { false };
</del><ins>+    bool m_lastNavigationWasAppInitiated { true };
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> inline void DocumentLoader::recordMemoryCacheLoadForFutureClientNotification(const ResourceRequest& request)
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderFrameLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/FrameLoader.cpp (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/FrameLoader.cpp      2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Source/WebCore/loader/FrameLoader.cpp 2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -1493,7 +1493,7 @@
</span><span class="cx">     ResourceRequest& r = newDocumentLoader.request();
</span><span class="cx">     // FIXME: Using m_loadType seems wrong here.
</span><span class="cx">     // If we are only preparing to load the main resource, that is previous load's load type!
</span><del>-    updateRequestAndAddExtraFields(r, IsMainResource::Yes, m_loadType, ShouldUpdateAppBoundValue::No);
</del><ins>+    updateRequestAndAddExtraFields(r, IsMainResource::Yes, m_loadType, ShouldUpdateAppInitiatedValue::No);
</ins><span class="cx">     FrameLoadType type;
</span><span class="cx"> 
</span><span class="cx">     if (shouldTreatURLAsSameAsCurrent(newDocumentLoader.originalRequest().url())) {
</span><span class="lines">@@ -2882,7 +2882,7 @@
</span><span class="cx">     return ResourceRequestCachePolicy::UseProtocolCachePolicy;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void FrameLoader::updateRequestAndAddExtraFields(ResourceRequest& request, IsMainResource mainResource, FrameLoadType loadType, ShouldUpdateAppBoundValue shouldUpdate)
</del><ins>+void FrameLoader::updateRequestAndAddExtraFields(ResourceRequest& request, IsMainResource mainResource, FrameLoadType loadType, ShouldUpdateAppInitiatedValue shouldUpdate)
</ins><span class="cx"> {
</span><span class="cx">     // If the request came from a previous process due to process-swap-on-navigation then we should not modify the request.
</span><span class="cx">     if (m_currentLoadContinuingState == LoadContinuingState::ContinuingWithRequest)
</span><span class="lines">@@ -2952,8 +2952,8 @@
</span><span class="cx">         request.setResponseContentDispositionEncodingFallbackArray("UTF-8", m_frame.document()->encoding(), m_frame.settings().defaultTextEncodingName());
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (shouldUpdate == ShouldUpdateAppBoundValue::Yes && m_frame.mainFrame().loader().documentLoader())
-        request.setIsAppBound(m_frame.mainFrame().loader().documentLoader()->lastNavigationWasAppBound());
</del><ins>+    if (shouldUpdate == ShouldUpdateAppInitiatedValue::Yes && m_frame.mainFrame().loader().documentLoader())
+        request.setIsAppInitiated(m_frame.mainFrame().loader().documentLoader()->lastNavigationWasAppInitiated());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void FrameLoader::scheduleRefreshIfNeeded(Document& document, const String& content)
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderFrameLoaderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/FrameLoader.h (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/FrameLoader.h        2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Source/WebCore/loader/FrameLoader.h   2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -85,7 +85,7 @@
</span><span class="cx"> enum class ShouldTreatAsContinuingLoad : bool;
</span><span class="cx"> enum class UsedLegacyTLS : bool;
</span><span class="cx"> enum class IsMainResource : bool { No, Yes };
</span><del>-enum class ShouldUpdateAppBoundValue : bool { No, Yes };
</del><ins>+enum class ShouldUpdateAppInitiatedValue : bool { No, Yes };
</ins><span class="cx"> 
</span><span class="cx"> struct WindowFeatures;
</span><span class="cx"> 
</span><span class="lines">@@ -317,7 +317,7 @@
</span><span class="cx">     bool alwaysAllowLocalWebarchive() const { return m_alwaysAllowLocalWebarchive; }
</span><span class="cx"> 
</span><span class="cx">     // For subresource requests the FrameLoadType parameter has no effect and can be skipped.
</span><del>-    void updateRequestAndAddExtraFields(ResourceRequest&, IsMainResource, FrameLoadType = FrameLoadType::Standard, ShouldUpdateAppBoundValue = ShouldUpdateAppBoundValue::Yes);
</del><ins>+    void updateRequestAndAddExtraFields(ResourceRequest&, IsMainResource, FrameLoadType = FrameLoadType::Standard, ShouldUpdateAppInitiatedValue = ShouldUpdateAppInitiatedValue::Yes);
</ins><span class="cx"> 
</span><span class="cx">     void scheduleRefreshIfNeeded(Document&, const String& content);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkResourceRequestBasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/ResourceRequestBase.cpp (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/ResourceRequestBase.cpp    2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Source/WebCore/platform/network/ResourceRequestBase.cpp       2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -95,7 +95,7 @@
</span><span class="cx">     if (other.m_httpBody)
</span><span class="cx">         setHTTPBody(other.m_httpBody->isolatedCopy());
</span><span class="cx">     setAllowCookies(other.m_allowCookies);
</span><del>-    setIsAppBound(other.isAppBound());
</del><ins>+    setIsAppInitiated(other.isAppInitiated());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool ResourceRequestBase::isEmpty() const
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkResourceRequestBaseh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/ResourceRequestBase.h (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/ResourceRequestBase.h      2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Source/WebCore/platform/network/ResourceRequestBase.h 2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -195,8 +195,8 @@
</span><span class="cx"> 
</span><span class="cx">     WEBCORE_EXPORT static bool equal(const ResourceRequest&, const ResourceRequest&);
</span><span class="cx"> 
</span><del>-    bool isAppBound() const { return m_isAppBound; }
-    void setIsAppBound(bool isAppBound) { m_isAppBound = isAppBound; };
</del><ins>+    bool isAppInitiated() const { return m_isAppInitiated; }
+    void setIsAppInitiated(bool isAppInitiated) { m_isAppInitiated = isAppInitiated; };
</ins><span class="cx"> 
</span><span class="cx"> protected:
</span><span class="cx">     // Used when ResourceRequest is initialized from a platform representation of the request
</span><span class="lines">@@ -208,7 +208,7 @@
</span><span class="cx">         , m_platformRequestBodyUpdated(true)
</span><span class="cx">         , m_hiddenFromInspector(false)
</span><span class="cx">         , m_isTopSite(false)
</span><del>-        , m_isAppBound(false)
</del><ins>+        , m_isAppInitiated(true)
</ins><span class="cx">     {
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -224,7 +224,7 @@
</span><span class="cx">         , m_platformRequestBodyUpdated(false)
</span><span class="cx">         , m_hiddenFromInspector(false)
</span><span class="cx">         , m_isTopSite(false)
</span><del>-        , m_isAppBound(false)
</del><ins>+        , m_isAppInitiated(true)
</ins><span class="cx">     {
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -258,7 +258,7 @@
</span><span class="cx">     mutable bool m_platformRequestBodyUpdated : 1;
</span><span class="cx">     bool m_hiddenFromInspector : 1;
</span><span class="cx">     bool m_isTopSite : 1;
</span><del>-    bool m_isAppBound : 1;
</del><ins>+    bool m_isAppInitiated : 1;
</ins><span class="cx"> #if USE(SYSTEM_PREVIEW)
</span><span class="cx">     std::optional<SystemPreviewInfo> m_systemPreviewInfo;
</span><span class="cx"> #endif
</span><span class="lines">@@ -294,7 +294,7 @@
</span><span class="cx">     encoder << m_isTopSite;
</span><span class="cx">     encoder << m_priority;
</span><span class="cx">     encoder << m_requester;
</span><del>-    encoder << m_isAppBound;
</del><ins>+    encoder << m_isAppInitiated;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> template<class Decoder>
</span><span class="lines">@@ -372,11 +372,11 @@
</span><span class="cx">         return false;
</span><span class="cx">     m_requester = *requester;
</span><span class="cx"> 
</span><del>-    std::optional<bool> isAppBound;
-    decoder >> isAppBound;
-    if (!isAppBound)
</del><ins>+    std::optional<bool> isAppInitiated;
+    decoder >> isAppInitiated;
+    if (!isAppInitiated)
</ins><span class="cx">         return false;
</span><del>-    m_isAppBound = *isAppBound;
</del><ins>+    m_isAppInitiated = *isAppInitiated;
</ins><span class="cx"> 
</span><span class="cx">     return true;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoretestingServiceWorkerInternalscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/ServiceWorkerInternals.cpp (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/ServiceWorkerInternals.cpp  2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Source/WebCore/testing/ServiceWorkerInternals.cpp     2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -119,18 +119,18 @@
</span><span class="cx">     return getCurrentProcessID();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void ServiceWorkerInternals::lastNavigationWasAppBound(Ref<DeferredPromise>&& promise)
</del><ins>+void ServiceWorkerInternals::lastNavigationWasAppInitiated(Ref<DeferredPromise>&& promise)
</ins><span class="cx"> {
</span><del>-    ASSERT(!m_lastNavigationWasAppBoundPromise);
-    m_lastNavigationWasAppBoundPromise = WTFMove(promise);
</del><ins>+    ASSERT(!m_lastNavigationWasAppInitiatedPromise);
+    m_lastNavigationWasAppInitiatedPromise = WTFMove(promise);
</ins><span class="cx">     callOnMainThread([identifier = m_identifier, weakThis = makeWeakPtr(this)]() mutable {
</span><span class="cx">         if (auto* proxy = SWContextManager::singleton().workerByID(identifier)) {
</span><del>-            proxy->thread().runLoop().postTaskForMode([weakThis = WTFMove(weakThis), appBound = proxy->lastNavigationWasAppBound()](auto&) {
-                if (!weakThis || !weakThis->m_lastNavigationWasAppBoundPromise)
</del><ins>+            proxy->thread().runLoop().postTaskForMode([weakThis = WTFMove(weakThis), appInitiated = proxy->lastNavigationWasAppInitiated()](auto&) {
+                if (!weakThis || !weakThis->m_lastNavigationWasAppInitiatedPromise)
</ins><span class="cx">                     return;
</span><span class="cx"> 
</span><del>-                weakThis->m_lastNavigationWasAppBoundPromise->resolve<IDLBoolean>(appBound);
-                weakThis->m_lastNavigationWasAppBoundPromise = nullptr;
</del><ins>+                weakThis->m_lastNavigationWasAppInitiatedPromise->resolve<IDLBoolean>(appInitiated);
+                weakThis->m_lastNavigationWasAppInitiatedPromise = nullptr;
</ins><span class="cx">             }, WorkerRunLoop::defaultMode());
</span><span class="cx">         }
</span><span class="cx">     });
</span></span></pre></div>
<a id="trunkSourceWebCoretestingServiceWorkerInternalsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/ServiceWorkerInternals.h (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/ServiceWorkerInternals.h    2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Source/WebCore/testing/ServiceWorkerInternals.h       2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -60,13 +60,13 @@
</span><span class="cx"> 
</span><span class="cx">     int processIdentifier() const;
</span><span class="cx"> 
</span><del>-    void lastNavigationWasAppBound(Ref<DeferredPromise>&&);
</del><ins>+    void lastNavigationWasAppInitiated(Ref<DeferredPromise>&&);
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     explicit ServiceWorkerInternals(ServiceWorkerIdentifier);
</span><span class="cx"> 
</span><span class="cx">     ServiceWorkerIdentifier m_identifier;
</span><del>-    RefPtr<DeferredPromise> m_lastNavigationWasAppBoundPromise;
</del><ins>+    RefPtr<DeferredPromise> m_lastNavigationWasAppInitiatedPromise;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoretestingServiceWorkerInternalsidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/ServiceWorkerInternals.idl (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/ServiceWorkerInternals.idl  2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Source/WebCore/testing/ServiceWorkerInternals.idl     2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -43,5 +43,5 @@
</span><span class="cx"> 
</span><span class="cx">     readonly attribute long processIdentifier;
</span><span class="cx"> 
</span><del>-    Promise<boolean> lastNavigationWasAppBound();
</del><ins>+    Promise<boolean> lastNavigationWasAppInitiated();
</ins><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreworkersserviceServiceWorkerClientDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/workers/service/ServiceWorkerClientData.cpp (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/workers/service/ServiceWorkerClientData.cpp 2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Source/WebCore/workers/service/ServiceWorkerClientData.cpp    2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -58,7 +58,7 @@
</span><span class="cx"> 
</span><span class="cx"> ServiceWorkerClientData ServiceWorkerClientData::isolatedCopy() const
</span><span class="cx"> {
</span><del>-    return { identifier, type, frameType, url.isolatedCopy(), lastNavigationWasAppBound };
</del><ins>+    return { identifier, type, frameType, url.isolatedCopy(), lastNavigationWasAppInitiated };
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> ServiceWorkerClientData ServiceWorkerClientData::from(ScriptExecutionContext& context, SWClientConnection& connection)
</span><span class="lines">@@ -67,13 +67,13 @@
</span><span class="cx">     RELEASE_ASSERT(isDocument); // We do not support dedicated workers as clients yet.
</span><span class="cx"> 
</span><span class="cx">     auto& document = downcast<Document>(context);
</span><del>-    auto lastNavigationWasAppBound = document.loader() && document.loader()->lastNavigationWasAppBound() ? LastNavigationWasAppBound::Yes : LastNavigationWasAppBound::No;
</del><ins>+    auto lastNavigationWasAppInitiated = document.loader() && document.loader()->lastNavigationWasAppInitiated() ? LastNavigationWasAppInitiated::Yes : LastNavigationWasAppInitiated::No;
</ins><span class="cx"> 
</span><span class="cx">     return {
</span><span class="cx">         { connection.serverConnectionIdentifier(), document.identifier() },
</span><span class="cx">         isDocument ? ServiceWorkerClientType::Window : ServiceWorkerClientType::Worker,
</span><span class="cx">         toServiceWorkerClientFrameType(context),
</span><del>-        context.url(), lastNavigationWasAppBound
</del><ins>+        context.url(), lastNavigationWasAppInitiated
</ins><span class="cx">     };
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreworkersserviceServiceWorkerClientDatah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/workers/service/ServiceWorkerClientData.h (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/workers/service/ServiceWorkerClientData.h   2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Source/WebCore/workers/service/ServiceWorkerClientData.h      2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -37,7 +37,7 @@
</span><span class="cx"> class SWClientConnection;
</span><span class="cx"> class ScriptExecutionContext;
</span><span class="cx"> 
</span><del>-enum class LastNavigationWasAppBound : bool { No, Yes };
</del><ins>+enum class LastNavigationWasAppInitiated : bool { No, Yes };
</ins><span class="cx"> 
</span><span class="cx"> struct ServiceWorkerClientData {
</span><span class="cx">     ServiceWorkerClientIdentifier identifier;
</span><span class="lines">@@ -44,7 +44,7 @@
</span><span class="cx">     ServiceWorkerClientType type;
</span><span class="cx">     ServiceWorkerClientFrameType frameType;
</span><span class="cx">     URL url;
</span><del>-    LastNavigationWasAppBound lastNavigationWasAppBound;
</del><ins>+    LastNavigationWasAppInitiated lastNavigationWasAppInitiated;
</ins><span class="cx"> 
</span><span class="cx">     ServiceWorkerClientData isolatedCopy() const;
</span><span class="cx"> 
</span><span class="lines">@@ -57,7 +57,7 @@
</span><span class="cx"> template<class Encoder>
</span><span class="cx"> void ServiceWorkerClientData::encode(Encoder& encoder) const
</span><span class="cx"> {
</span><del>-    encoder << identifier << type << frameType << url << lastNavigationWasAppBound;
</del><ins>+    encoder << identifier << type << frameType << url << lastNavigationWasAppInitiated;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> template<class Decoder>
</span><span class="lines">@@ -83,12 +83,12 @@
</span><span class="cx">     if (!url)
</span><span class="cx">         return std::nullopt;
</span><span class="cx"> 
</span><del>-    std::optional<LastNavigationWasAppBound> lastNavigationWasAppBound;
-    decoder >> lastNavigationWasAppBound;
-    if (!lastNavigationWasAppBound)
</del><ins>+    std::optional<LastNavigationWasAppInitiated> lastNavigationWasAppInitiated;
+    decoder >> lastNavigationWasAppInitiated;
+    if (!lastNavigationWasAppInitiated)
</ins><span class="cx">         return std::nullopt;
</span><span class="cx"> 
</span><del>-    return { { WTFMove(*identifier), WTFMove(*type), WTFMove(*frameType), WTFMove(*url), WTFMove(*lastNavigationWasAppBound) } };
</del><ins>+    return { { WTFMove(*identifier), WTFMove(*type), WTFMove(*frameType), WTFMove(*url), WTFMove(*lastNavigationWasAppInitiated) } };
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> using ServiceWorkerClientsMatchAllCallback = WTF::CompletionHandler<void(Vector<ServiceWorkerClientData>&&)>;
</span></span></pre></div>
<a id="trunkSourceWebCoreworkersserviceServiceWorkerContextDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/workers/service/ServiceWorkerContextData.cpp (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/workers/service/ServiceWorkerContextData.cpp        2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Source/WebCore/workers/service/ServiceWorkerContextData.cpp   2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -44,7 +44,7 @@
</span><span class="cx">         scriptURL.isolatedCopy(),
</span><span class="cx">         workerType,
</span><span class="cx">         loadedFromDisk,
</span><del>-        lastNavigationWasAppBound,
</del><ins>+        lastNavigationWasAppInitiated,
</ins><span class="cx">         crossThreadCopy(scriptResourceMap)
</span><span class="cx">     };
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreworkersserviceServiceWorkerContextDatah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/workers/service/ServiceWorkerContextData.h (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/workers/service/ServiceWorkerContextData.h  2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Source/WebCore/workers/service/ServiceWorkerContextData.h     2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -39,7 +39,7 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-enum class LastNavigationWasAppBound : bool;
</del><ins>+enum class LastNavigationWasAppInitiated : bool;
</ins><span class="cx"> 
</span><span class="cx"> struct ServiceWorkerContextData {
</span><span class="cx">     struct ImportedScript {
</span><span class="lines">@@ -89,7 +89,7 @@
</span><span class="cx">     URL scriptURL;
</span><span class="cx">     WorkerType workerType;
</span><span class="cx">     bool loadedFromDisk;
</span><del>-    std::optional<LastNavigationWasAppBound> lastNavigationWasAppBound;
</del><ins>+    std::optional<LastNavigationWasAppInitiated> lastNavigationWasAppInitiated;
</ins><span class="cx">     HashMap<URL, ImportedScript> scriptResourceMap;
</span><span class="cx"> 
</span><span class="cx">     template<class Encoder> void encode(Encoder&) const;
</span><span class="lines">@@ -102,7 +102,7 @@
</span><span class="cx"> void ServiceWorkerContextData::encode(Encoder& encoder) const
</span><span class="cx"> {
</span><span class="cx">     encoder << jobDataIdentifier << registration << serviceWorkerIdentifier << script << contentSecurityPolicy << referrerPolicy
</span><del>-        << scriptURL << workerType << loadedFromDisk << lastNavigationWasAppBound << scriptResourceMap << certificateInfo;
</del><ins>+        << scriptURL << workerType << loadedFromDisk << lastNavigationWasAppInitiated << scriptResourceMap << certificateInfo;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> template<class Decoder>
</span><span class="lines">@@ -147,8 +147,8 @@
</span><span class="cx">     if (!decoder.decode(loadedFromDisk))
</span><span class="cx">         return std::nullopt;
</span><span class="cx"> 
</span><del>-    std::optional<LastNavigationWasAppBound> lastNavigationWasAppBound;
-    if (!decoder.decode(lastNavigationWasAppBound))
</del><ins>+    std::optional<LastNavigationWasAppInitiated> lastNavigationWasAppInitiated;
+    if (!decoder.decode(lastNavigationWasAppInitiated))
</ins><span class="cx">         return std::nullopt;
</span><span class="cx"> 
</span><span class="cx">     HashMap<URL, ImportedScript> scriptResourceMap;
</span><span class="lines">@@ -171,7 +171,7 @@
</span><span class="cx">         WTFMove(scriptURL),
</span><span class="cx">         workerType,
</span><span class="cx">         loadedFromDisk,
</span><del>-        WTFMove(lastNavigationWasAppBound),
</del><ins>+        WTFMove(lastNavigationWasAppInitiated),
</ins><span class="cx">         WTFMove(scriptResourceMap)
</span><span class="cx">     }};
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreworkersservicecontextServiceWorkerThreadProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/workers/service/context/ServiceWorkerThreadProxy.cpp (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/workers/service/context/ServiceWorkerThreadProxy.cpp        2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Source/WebCore/workers/service/context/ServiceWorkerThreadProxy.cpp   2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -117,8 +117,8 @@
</span><span class="cx">     m_remoteDebuggable->init();
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    if (data.lastNavigationWasAppBound)
-        setLastNavigationWasAppBound(data.lastNavigationWasAppBound == LastNavigationWasAppBound::Yes);
</del><ins>+    if (data.lastNavigationWasAppInitiated)
+        setLastNavigationWasAppInitiated(data.lastNavigationWasAppInitiated == LastNavigationWasAppInitiated::Yes);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> ServiceWorkerThreadProxy::~ServiceWorkerThreadProxy()
</span><span class="lines">@@ -127,15 +127,15 @@
</span><span class="cx">     allServiceWorkerThreadProxies().remove(this);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void ServiceWorkerThreadProxy::setLastNavigationWasAppBound(bool wasAppBound)
</del><ins>+void ServiceWorkerThreadProxy::setLastNavigationWasAppInitiated(bool wasAppInitiated)
</ins><span class="cx"> {
</span><span class="cx">     if (m_document->loader())
</span><del>-        m_document->loader()->setLastNavigationWasAppBound(wasAppBound);
</del><ins>+        m_document->loader()->setLastNavigationWasAppInitiated(wasAppInitiated);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool ServiceWorkerThreadProxy::lastNavigationWasAppBound()
</del><ins>+bool ServiceWorkerThreadProxy::lastNavigationWasAppInitiated()
</ins><span class="cx"> {
</span><del>-    return m_document->loader() ? m_document->loader()->lastNavigationWasAppBound() : false;
</del><ins>+    return m_document->loader() ? m_document->loader()->lastNavigationWasAppInitiated() : true;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool ServiceWorkerThreadProxy::postTaskForModeToWorkerOrWorkletGlobalScope(ScriptExecutionContext::Task&& task, const String& mode)
</span></span></pre></div>
<a id="trunkSourceWebCoreworkersservicecontextServiceWorkerThreadProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/workers/service/context/ServiceWorkerThreadProxy.h (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/workers/service/context/ServiceWorkerThreadProxy.h  2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Source/WebCore/workers/service/context/ServiceWorkerThreadProxy.h     2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -81,8 +81,8 @@
</span><span class="cx">     void fireActivateEvent();
</span><span class="cx">     void didSaveScriptsToDisk(ScriptBuffer&&, HashMap<URL, ScriptBuffer>&& importedScripts);
</span><span class="cx"> 
</span><del>-    WEBCORE_EXPORT void setLastNavigationWasAppBound(bool);
-    WEBCORE_EXPORT bool lastNavigationWasAppBound();
</del><ins>+    WEBCORE_EXPORT void setLastNavigationWasAppInitiated(bool);
+    WEBCORE_EXPORT bool lastNavigationWasAppInitiated();
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     WEBCORE_EXPORT ServiceWorkerThreadProxy(PageConfiguration&&, ServiceWorkerContextData&&, String&& userAgent, CacheStorageProvider&, StorageBlockingPolicy);
</span></span></pre></div>
<a id="trunkSourceWebCoreworkersserviceserverRegistrationDatabasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/workers/service/server/RegistrationDatabase.cpp (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/workers/service/server/RegistrationDatabase.cpp     2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Source/WebCore/workers/service/server/RegistrationDatabase.cpp        2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -569,7 +569,7 @@
</span><span class="cx">         auto registrationIdentifier = ServiceWorkerRegistrationIdentifier::generate();
</span><span class="cx">         auto serviceWorkerData = ServiceWorkerData { workerIdentifier, scriptURL, ServiceWorkerState::Activated, *workerType, registrationIdentifier };
</span><span class="cx">         auto registration = ServiceWorkerRegistrationData { WTFMove(*key), registrationIdentifier, WTFMove(scopeURL), *updateViaCache, lastUpdateCheckTime, std::nullopt, std::nullopt, WTFMove(serviceWorkerData) };
</span><del>-        auto contextData = ServiceWorkerContextData { std::nullopt, WTFMove(registration), workerIdentifier, WTFMove(script), WTFMove(*certificateInfo), WTFMove(*contentSecurityPolicy), WTFMove(referrerPolicy), WTFMove(scriptURL), *workerType, true, LastNavigationWasAppBound::No, WTFMove(scriptResourceMap) };
</del><ins>+        auto contextData = ServiceWorkerContextData { std::nullopt, WTFMove(registration), workerIdentifier, WTFMove(script), WTFMove(*certificateInfo), WTFMove(*contentSecurityPolicy), WTFMove(referrerPolicy), WTFMove(scriptURL), *workerType, true, LastNavigationWasAppInitiated::Yes, WTFMove(scriptResourceMap) };
</ins><span class="cx"> 
</span><span class="cx">         callOnMainThread([protectedThis = makeRef(*this), contextData = contextData.isolatedCopy()]() mutable {
</span><span class="cx">             protectedThis->addRegistrationToStore(WTFMove(contextData));
</span></span></pre></div>
<a id="trunkSourceWebCoreworkersserviceserverSWServercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/workers/service/server/SWServer.cpp (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/workers/service/server/SWServer.cpp 2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Source/WebCore/workers/service/server/SWServer.cpp    2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -474,7 +474,7 @@
</span><span class="cx">         request.setHTTPReferrer(originURL(origin).string());
</span><span class="cx">         request.setHTTPUserAgent(serviceWorkerClientUserAgent(ClientOrigin { jobData.topOrigin, SecurityOrigin::create(jobData.scriptURL)->data() }));
</span><span class="cx">         request.setPriority(ResourceLoadPriority::Low);
</span><del>-        request.setIsAppBound(registration.isAppBound());
</del><ins>+        request.setIsAppInitiated(registration.isAppInitiated());
</ins><span class="cx"> 
</span><span class="cx">         m_softUpdateCallback(ServiceWorkerJobData { jobData }, shouldRefreshCache, WTFMove(request), [this, weakThis = makeWeakPtr(this)](auto& result) {
</span><span class="cx">             if (!weakThis)
</span><span class="lines">@@ -648,24 +648,24 @@
</span><span class="cx"> 
</span><span class="cx"> void SWServer::updateWorker(const ServiceWorkerJobDataIdentifier& jobDataIdentifier, SWServerRegistration& registration, const URL& url, const ScriptBuffer& script, const CertificateInfo& certificateInfo, const ContentSecurityPolicyResponseHeaders& contentSecurityPolicy, const String& referrerPolicy, WorkerType type, HashMap<URL, ServiceWorkerContextData::ImportedScript>&& scriptResourceMap)
</span><span class="cx"> {
</span><del>-    tryInstallContextData(ServiceWorkerContextData { jobDataIdentifier, registration.data(), ServiceWorkerIdentifier::generate(), script, certificateInfo, contentSecurityPolicy, referrerPolicy, url, type, false, clientIsAppBoundForRegistrableDomain(RegistrableDomain(url)), WTFMove(scriptResourceMap) });
</del><ins>+    tryInstallContextData(ServiceWorkerContextData { jobDataIdentifier, registration.data(), ServiceWorkerIdentifier::generate(), script, certificateInfo, contentSecurityPolicy, referrerPolicy, url, type, false, clientIsAppInitiatedForRegistrableDomain(RegistrableDomain(url)), WTFMove(scriptResourceMap) });
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-LastNavigationWasAppBound SWServer::clientIsAppBoundForRegistrableDomain(const RegistrableDomain& domain)
</del><ins>+LastNavigationWasAppInitiated SWServer::clientIsAppInitiatedForRegistrableDomain(const RegistrableDomain& domain)
</ins><span class="cx"> {
</span><span class="cx">     auto clientsByRegistrableDomainIterator = m_clientsByRegistrableDomain.find(domain);
</span><span class="cx">     if (clientsByRegistrableDomainIterator == m_clientsByRegistrableDomain.end())
</span><del>-        return LastNavigationWasAppBound::No;
</del><ins>+        return LastNavigationWasAppInitiated::Yes;
</ins><span class="cx"> 
</span><span class="cx">     auto& clientsForRegistrableDomain = clientsByRegistrableDomainIterator->value;
</span><span class="cx">     for (auto& client : clientsForRegistrableDomain) {
</span><span class="cx">         auto data = m_clientsById.find(client);
</span><span class="cx">         ASSERT(data != m_clientsById.end());
</span><del>-        if (data->value.lastNavigationWasAppBound == LastNavigationWasAppBound::Yes)
-            return LastNavigationWasAppBound::Yes;
</del><ins>+        if (data->value.lastNavigationWasAppInitiated == LastNavigationWasAppInitiated::Yes)
+            return LastNavigationWasAppInitiated::Yes;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    return LastNavigationWasAppBound::No;
</del><ins>+    return LastNavigationWasAppInitiated::No;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void SWServer::tryInstallContextData(ServiceWorkerContextData&& data)
</span><span class="lines">@@ -886,11 +886,11 @@
</span><span class="cx">     return iterator->value->registration();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void SWServer::updateAppBoundValueForWorkers(const ClientOrigin& clientOrigin, LastNavigationWasAppBound lastNavigationWasAppBound)
</del><ins>+void SWServer::updateAppInitiatedValueForWorkers(const ClientOrigin& clientOrigin, LastNavigationWasAppInitiated lastNavigationWasAppInitiated)
</ins><span class="cx"> {
</span><span class="cx">     for (auto& worker : m_runningOrTerminatingWorkers.values()) {
</span><span class="cx">         if (worker->origin().clientRegistrableDomain() == clientOrigin.clientRegistrableDomain())
</span><del>-            worker->updateAppBoundValue(lastNavigationWasAppBound);
</del><ins>+            worker->updateAppInitiatedValue(lastNavigationWasAppInitiated);
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -899,9 +899,9 @@
</span><span class="cx">     auto clientIdentifier = data.identifier;
</span><span class="cx"> 
</span><span class="cx">     // Update the app-bound value if the new client is app-bound and the current clients for the origin are not marked app-bound.
</span><del>-    if (data.lastNavigationWasAppBound == LastNavigationWasAppBound::Yes) {
-        if (clientIsAppBoundForRegistrableDomain(clientOrigin.clientRegistrableDomain()) == LastNavigationWasAppBound::No)
-            updateAppBoundValueForWorkers(clientOrigin, data.lastNavigationWasAppBound);
</del><ins>+    if (data.lastNavigationWasAppInitiated == LastNavigationWasAppInitiated::Yes) {
+        if (clientIsAppInitiatedForRegistrableDomain(clientOrigin.clientRegistrableDomain()) == LastNavigationWasAppInitiated::No)
+            updateAppInitiatedValueForWorkers(clientOrigin, data.lastNavigationWasAppInitiated);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     ASSERT(!m_clientsById.contains(clientIdentifier));
</span><span class="lines">@@ -939,7 +939,7 @@
</span><span class="cx"> void SWServer::unregisterServiceWorkerClient(const ClientOrigin& clientOrigin, ServiceWorkerClientIdentifier clientIdentifier)
</span><span class="cx"> {
</span><span class="cx">     auto clientRegistrableDomain = clientOrigin.clientRegistrableDomain();
</span><del>-    auto appBoundValueBefore = clientIsAppBoundForRegistrableDomain(clientOrigin.clientRegistrableDomain());
</del><ins>+    auto appInitiatedValueBefore = clientIsAppInitiatedForRegistrableDomain(clientOrigin.clientRegistrableDomain());
</ins><span class="cx"> 
</span><span class="cx">     bool wasRemoved = m_clientsById.remove(clientIdentifier);
</span><span class="cx">     ASSERT_UNUSED(wasRemoved, wasRemoved);
</span><span class="lines">@@ -984,9 +984,9 @@
</span><span class="cx"> 
</span><span class="cx">     // If the app-bound value changed after this client was removed, we know it was the only app-bound
</span><span class="cx">     // client for its origin, and we should update all workers to reflect this.
</span><del>-    auto appBoundValueAfter = clientIsAppBoundForRegistrableDomain(clientOrigin.clientRegistrableDomain());
-    if (appBoundValueBefore != appBoundValueAfter)
-        updateAppBoundValueForWorkers(clientOrigin, appBoundValueAfter);
</del><ins>+    auto appInitiatedValueAfter = clientIsAppInitiatedForRegistrableDomain(clientOrigin.clientRegistrableDomain());
+    if (appInitiatedValueBefore != appInitiatedValueAfter)
+        updateAppInitiatedValueForWorkers(clientOrigin, appInitiatedValueAfter);
</ins><span class="cx"> 
</span><span class="cx">     auto registrationIterator = m_clientToControllingRegistration.find(clientIdentifier);
</span><span class="cx">     if (registrationIterator == m_clientToControllingRegistration.end())
</span></span></pre></div>
<a id="trunkSourceWebCoreworkersserviceserverSWServerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/workers/service/server/SWServer.h (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/workers/service/server/SWServer.h   2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Source/WebCore/workers/service/server/SWServer.h      2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -217,7 +217,7 @@
</span><span class="cx"> 
</span><span class="cx">     static constexpr Seconds defaultTerminationDelay = 10_s;
</span><span class="cx"> 
</span><del>-    LastNavigationWasAppBound clientIsAppBoundForRegistrableDomain(const RegistrableDomain&);
</del><ins>+    LastNavigationWasAppInitiated clientIsAppInitiatedForRegistrableDomain(const RegistrableDomain&);
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     void validateRegistrationDomain(WebCore::RegistrableDomain, CompletionHandler<void(bool)>&&);
</span><span class="lines">@@ -244,7 +244,7 @@
</span><span class="cx"> 
</span><span class="cx">     void contextConnectionCreated(SWServerToContextConnection&);
</span><span class="cx"> 
</span><del>-    void updateAppBoundValueForWorkers(const ClientOrigin&, LastNavigationWasAppBound);
</del><ins>+    void updateAppInitiatedValueForWorkers(const ClientOrigin&, LastNavigationWasAppInitiated);
</ins><span class="cx"> 
</span><span class="cx">     HashMap<SWServerConnectionIdentifier, std::unique_ptr<Connection>> m_connections;
</span><span class="cx">     HashMap<ServiceWorkerRegistrationKey, WeakPtr<SWServerRegistration>> m_scopeToRegistrationMap;
</span></span></pre></div>
<a id="trunkSourceWebCoreworkersserviceserverSWServerRegistrationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/workers/service/server/SWServerRegistration.cpp (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/workers/service/server/SWServerRegistration.cpp     2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Source/WebCore/workers/service/server/SWServerRegistration.cpp        2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -370,7 +370,7 @@
</span><span class="cx">     m_server.softUpdate(*this);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void SWServerRegistration::scheduleSoftUpdate(IsAppBound isAppBound)
</del><ins>+void SWServerRegistration::scheduleSoftUpdate(IsAppInitiated isAppInitiated)
</ins><span class="cx"> {
</span><span class="cx">     // To avoid scheduling many updates during a single page load, we do soft updates on a 1 second delay and keep delaying
</span><span class="cx">     // as long as soft update requests keep coming. This seems to match Chrome's behavior.
</span><span class="lines">@@ -377,7 +377,7 @@
</span><span class="cx">     if (m_softUpdateTimer.isActive())
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    m_isAppBound = isAppBound == IsAppBound::Yes;
</del><ins>+    m_isAppInitiated = isAppInitiated == IsAppInitiated::Yes;
</ins><span class="cx"> 
</span><span class="cx">     RELEASE_LOG(ServiceWorker, "SWServerRegistration::softUpdateIfNeeded");
</span><span class="cx">     m_softUpdateTimer.startOneShot(softUpdateDelay);
</span></span></pre></div>
<a id="trunkSourceWebCoreworkersserviceserverSWServerRegistrationh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/workers/service/server/SWServerRegistration.h (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/workers/service/server/SWServerRegistration.h       2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Source/WebCore/workers/service/server/SWServerRegistration.h  2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -47,7 +47,7 @@
</span><span class="cx"> struct ServiceWorkerContextData;
</span><span class="cx"> struct ServiceWorkerFetchResult;
</span><span class="cx"> 
</span><del>-enum class IsAppBound : bool { No, Yes };
</del><ins>+enum class IsAppInitiated : bool { No, Yes };
</ins><span class="cx"> 
</span><span class="cx"> class SWServerRegistration : public CanMakeWeakPtr<SWServerRegistration> {
</span><span class="cx">     WTF_MAKE_FAST_ALLOCATED;
</span><span class="lines">@@ -101,13 +101,13 @@
</span><span class="cx">     void forEachConnection(const WTF::Function<void(SWServer::Connection&)>&);
</span><span class="cx"> 
</span><span class="cx">     WEBCORE_EXPORT bool shouldSoftUpdate(const FetchOptions&) const;
</span><del>-    WEBCORE_EXPORT void scheduleSoftUpdate(IsAppBound);
</del><ins>+    WEBCORE_EXPORT void scheduleSoftUpdate(IsAppInitiated);
</ins><span class="cx">     static constexpr Seconds softUpdateDelay { 1_s };
</span><span class="cx"> 
</span><span class="cx">     URL scopeURLWithoutFragment() const { return m_scopeURL; }
</span><span class="cx">     URL scriptURL() const { return m_scriptURL; }
</span><span class="cx"> 
</span><del>-    bool isAppBound() { return m_isAppBound; }
</del><ins>+    bool isAppInitiated() const { return m_isAppInitiated; }
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     void activate();
</span><span class="lines">@@ -135,7 +135,7 @@
</span><span class="cx"> 
</span><span class="cx">     WebCore::Timer m_softUpdateTimer;
</span><span class="cx">     
</span><del>-    bool m_isAppBound { false };
</del><ins>+    bool m_isAppInitiated { true };
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreworkersserviceserverSWServerToContextConnectionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/workers/service/server/SWServerToContextConnection.h (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/workers/service/server/SWServerToContextConnection.h        2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Source/WebCore/workers/service/server/SWServerToContextConnection.h   2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -52,7 +52,7 @@
</span><span class="cx"> 
</span><span class="cx">     // Messages to the SW host process
</span><span class="cx">     virtual void installServiceWorkerContext(const ServiceWorkerContextData&, const String& userAgent) = 0;
</span><del>-    virtual void updateAppBoundValue(ServiceWorkerIdentifier, LastNavigationWasAppBound) = 0;
</del><ins>+    virtual void updateAppInitiatedValue(ServiceWorkerIdentifier, LastNavigationWasAppInitiated) = 0;
</ins><span class="cx">     virtual void fireInstallEvent(ServiceWorkerIdentifier) = 0;
</span><span class="cx">     virtual void fireActivateEvent(ServiceWorkerIdentifier) = 0;
</span><span class="cx">     virtual void terminateWorker(ServiceWorkerIdentifier) = 0;
</span></span></pre></div>
<a id="trunkSourceWebCoreworkersserviceserverSWServerWorkercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/workers/service/server/SWServerWorker.cpp (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/workers/service/server/SWServerWorker.cpp   2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Source/WebCore/workers/service/server/SWServerWorker.cpp      2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -62,7 +62,7 @@
</span><span class="cx">     , m_registrableDomain(m_data.scriptURL)
</span><span class="cx">     , m_scriptResourceMap(WTFMove(scriptResourceMap))
</span><span class="cx">     , m_terminationTimer(*this, &SWServerWorker::terminationTimerFired)
</span><del>-    , m_lastNavigationWasAppBound(m_server->clientIsAppBoundForRegistrableDomain(m_registrableDomain))
</del><ins>+    , m_lastNavigationWasAppInitiated(m_server->clientIsAppInitiatedForRegistrableDomain(m_registrableDomain))
</ins><span class="cx"> {
</span><span class="cx">     m_data.scriptURL.removeFragmentIdentifier();
</span><span class="cx"> 
</span><span class="lines">@@ -87,18 +87,18 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(m_registration);
</span><span class="cx"> 
</span><del>-    return { std::nullopt, m_registration->data(), m_data.identifier, m_script, m_certificateInfo, m_contentSecurityPolicy, m_referrerPolicy, m_data.scriptURL, m_data.type, false, m_lastNavigationWasAppBound, m_scriptResourceMap };
</del><ins>+    return { std::nullopt, m_registration->data(), m_data.identifier, m_script, m_certificateInfo, m_contentSecurityPolicy, m_referrerPolicy, m_data.scriptURL, m_data.type, false, m_lastNavigationWasAppInitiated, m_scriptResourceMap };
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void SWServerWorker::updateAppBoundValue(LastNavigationWasAppBound lastNavigationWasAppBound)
</del><ins>+void SWServerWorker::updateAppInitiatedValue(LastNavigationWasAppInitiated lastNavigationWasAppInitiated)
</ins><span class="cx"> {
</span><del>-    m_lastNavigationWasAppBound = lastNavigationWasAppBound;
</del><ins>+    m_lastNavigationWasAppInitiated = lastNavigationWasAppInitiated;
</ins><span class="cx"> 
</span><span class="cx">     if (!isRunning())
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     if (auto* connection = contextConnection())
</span><del>-        connection->updateAppBoundValue(identifier(), lastNavigationWasAppBound);
</del><ins>+        connection->updateAppInitiatedValue(identifier(), lastNavigationWasAppInitiated);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void SWServerWorker::terminate(CompletionHandler<void()>&& callback)
</span></span></pre></div>
<a id="trunkSourceWebCoreworkersserviceserverSWServerWorkerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/workers/service/server/SWServerWorker.h (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/workers/service/server/SWServerWorker.h     2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Source/WebCore/workers/service/server/SWServerWorker.h        2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -127,7 +127,7 @@
</span><span class="cx">     void setHasTimedOutAnyFetchTasks() { m_hasTimedOutAnyFetchTasks = true; }
</span><span class="cx">     bool hasTimedOutAnyFetchTasks() const { return m_hasTimedOutAnyFetchTasks; }
</span><span class="cx">     void didFailHeartBeatCheck();
</span><del>-    void updateAppBoundValue(LastNavigationWasAppBound);
</del><ins>+    void updateAppInitiatedValue(LastNavigationWasAppInitiated);
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     SWServerWorker(SWServer&, SWServerRegistration&, const URL&, const ScriptBuffer&, const CertificateInfo&, const ContentSecurityPolicyResponseHeaders&, String&& referrerPolicy, WorkerType, ServiceWorkerIdentifier, HashMap<URL, ServiceWorkerContextData::ImportedScript>&&);
</span><span class="lines">@@ -158,7 +158,7 @@
</span><span class="cx">     bool m_hasTimedOutAnyFetchTasks { false };
</span><span class="cx">     Vector<CompletionHandler<void()>> m_terminationCallbacks;
</span><span class="cx">     Timer m_terminationTimer;
</span><del>-    LastNavigationWasAppBound m_lastNavigationWasAppBound;
</del><ins>+    LastNavigationWasAppInitiated m_lastNavigationWasAppInitiated;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebKitChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/ChangeLog (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/ChangeLog    2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Source/WebKit/ChangeLog       2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -1,3 +1,136 @@
</span><ins>+2021-07-08  Kate Cheney  <katherine_cheney@apple.com>
+
+        Clean up App Privacy Report code
+        https://bugs.webkit.org/show_bug.cgi?id=227326
+        <rdar://problem/79696849>
+
+        Reviewed by Brent Fulgham.
+
+        Rename App Privacy Report code to better align with the code's purpose
+        of attributing loads to the app or not. The default value should
+        be app initiated based on the documentation, so this patch also adjusts
+        the default value as needed.
+
+        This also adopts the new NSURLRequest attribution API and removes
+        the deprecated _isNonAppInitiated SPI.
+
+        Covered by existing layout and API tests.
+
+        * NetworkProcess/NetworkProcess.cpp:
+        (WebKit::NetworkProcess::preconnectTo):
+        (WebKit::NetworkProcess::appPrivacyReportTestingData):
+        (WebKit::NetworkProcess::clearAppPrivacyReportTestingData):
+        (WebKit::NetworkProcess::appBoundNavigationData): Deleted.
+        (WebKit::NetworkProcess::clearAppBoundNavigationData): Deleted.
+        * NetworkProcess/NetworkProcess.h:
+        * NetworkProcess/NetworkProcess.messages.in:
+        * NetworkProcess/NetworkResourceLoader.cpp:
+        (WebKit::NetworkResourceLoader::continueWillSendRedirectedRequest):
+        (WebKit::NetworkResourceLoader::isAppBound):
+        * NetworkProcess/NetworkSession.h:
+        (WebKit::NetworkSession::appPrivacyReportTestingData):
+        (WebKit::NetworkSession::appBoundNavigationTestingData): Deleted.
+        * NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp:
+        (WebKit::ServiceWorkerFetchTask::softUpdateIfNeeded):
+        * NetworkProcess/ServiceWorker/ServiceWorkerSoftUpdateLoader.cpp:
+        (WebKit::ServiceWorkerSoftUpdateLoader::loadFromNetwork):
+        * NetworkProcess/ServiceWorker/WebSWServerConnection.cpp:
+        (WebKit::WebSWServerConnection::controlClient):
+        (WebKit::WebSWServerConnection::createFetchTask):
+        * NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
+        (WebKit::WebSWServerToContextConnection::updateAppInitiatedValue):
+        (WebKit::WebSWServerToContextConnection::updateAppBoundValue): Deleted.
+        * NetworkProcess/ServiceWorker/WebSWServerToContextConnection.h:
+        * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
+        (WebKit::NetworkCache::constructRevalidationRequest):
+        (WebKit::NetworkCache::SpeculativeLoadManager::registerLoad):
+        (WebKit::NetworkCache::SpeculativeLoadManager::startSpeculativeRevalidation):
+        * NetworkProcess/cache/NetworkCacheSubresourcesEntry.h:
+        (WebKit::NetworkCache::SubresourceInfo::isAppInitiated const):
+        (WebKit::NetworkCache::SubresourceInfo::setIsAppInitiated):
+        (WebKit::NetworkCache::SubresourceInfo::isAppBound const): Deleted.
+        (WebKit::NetworkCache::SubresourceInfo::setIsAppBound): Deleted.
+        * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
+        (WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):
+        * Scripts/webkit/messages.py:
+        (headers_for_type):
+        * Shared/AppPrivacyReport.h:
+        (WebKit::AppPrivacyReportTestingData::setDidPerformSoftUpdate):
+        (WebKit::AppPrivacyReportTestingData::clearAppPrivacyReportTestingData):
+        (WebKit::AppPrivacyReportTestingData::didLoadAppInitiatedRequest):
+        (WebKit::AppPrivacyReportTestingData::encode const):
+        (WebKit::AppPrivacyReportTestingData::decode):
+        * Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:
+        (IPC::ArgumentCoder<WebCore::ResourceRequest>::encodePlatformData):
+        (IPC::ArgumentCoder<WebCore::ResourceRequest>::decodePlatformData):
+        * Shared/NavigatingToAppBoundDomain.h:
+        (WebKit::AppBoundNavigationTestingData::setDidPerformSoftUpdate): Deleted.
+        (WebKit::AppBoundNavigationTestingData::clearAppBoundNavigationDataTesting): Deleted.
+        (WebKit::AppBoundNavigationTestingData::updateAppBoundNavigationTestingData): Deleted.
+        (WebKit::AppBoundNavigationTestingData::encode const): Deleted.
+        (WebKit::AppBoundNavigationTestingData::decode): Deleted.
+        (): Deleted.
+        * Shared/WebPageCreationParameters.cpp:
+        (WebKit::WebPageCreationParameters::encode const):
+        (WebKit::WebPageCreationParameters::decode):
+        * Shared/WebPageCreationParameters.h:
+        * UIProcess/API/Cocoa/WKWebView.mm:
+        (-[WKWebView _didLoadAppInitiatedRequest:]):
+        (-[WKWebView _didLoadNonAppInitiatedRequest:]):
+        (-[WKWebView _appBoundNavigationDataForDomain:completionHandler:]): Deleted.
+        Removed now that we no longer need to test attribution context, that
+        is all it was used for.
+
+        (-[WKWebView _didLoadAppBoundRequest:]): Deleted.
+        (-[WKWebView _didLoadNonAppBoundRequest:]): Deleted.
+        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
+        * UIProcess/API/Cocoa/WKWebViewPrivateForTesting.h:
+        * UIProcess/API/Cocoa/WKWebViewTesting.mm:
+        (-[WKWebView _lastNavigationWasAppInitiated:]):
+        (-[WKWebView _appPrivacyReportTestingData:]):
+        (-[WKWebView _clearAppPrivacyReportTestingData:]):
+        (-[WKWebView _lastNavigationWasAppBound:]): Deleted.
+        (-[WKWebView _appBoundNavigationData:]): Deleted.
+        (-[WKWebView _clearAppBoundNavigationData:]): Deleted.
+        * UIProcess/Cocoa/WebPageProxyCocoa.mm:
+        (WebKit::WebPageProxy::setLastNavigationWasAppInitiated):
+        (WebKit::WebPageProxy::lastNavigationWasAppInitiated):
+        (WebKit::WebPageProxy::setLastNavigationWasAppBound): Deleted.
+        (WebKit::WebPageProxy::lastNavigationWasAppBound): Deleted.
+        * UIProcess/Network/NetworkProcessProxy.cpp:
+        (WebKit::NetworkProcessProxy::preconnectTo):
+        * UIProcess/Network/NetworkProcessProxy.h:
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::loadRequest):
+        (WebKit::WebPageProxy::preconnectTo):
+        (WebKit::WebPageProxy::creationParameters):
+        (WebKit::WebPageProxy::appPrivacyReportTestingData):
+        (WebKit::WebPageProxy::clearAppPrivacyReportTestingData):
+        (WebKit::WebPageProxy::appBoundNavigationData): Deleted.
+        (WebKit::WebPageProxy::clearAppBoundNavigationData): Deleted.
+        * UIProcess/WebPageProxy.h:
+        * WebKit.xcodeproj/project.pbxproj:
+        * WebProcess/Network/WebLoaderStrategy.cpp:
+        (WebKit::WebLoaderStrategy::loadResource):
+        (WebKit::WebLoaderStrategy::preconnectTo):
+        * WebProcess/Storage/WebSWContextManagerConnection.cpp:
+        (WebKit::WebSWContextManagerConnection::updateAppInitiatedValue):
+        (WebKit::WebSWContextManagerConnection::startFetch):
+        (WebKit::WebSWContextManagerConnection::updateAppBoundValue): Deleted.
+        * WebProcess/Storage/WebSWContextManagerConnection.h:
+        * WebProcess/Storage/WebSWContextManagerConnection.messages.in:
+        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
+        (WebKit::WebFrameLoaderClient::dispatchWillSendRequest):
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::loadRequest):
+        (WebKit::WebPage::createDocumentLoader):
+        (WebKit::WebPage::lastNavigationWasAppInitiated):
+        (WebKit::WebPage::lastNavigationWasAppBound): Deleted.
+        * WebProcess/WebPage/WebPage.h:
+        (WebKit::WebPage::setLastNavigationWasAppInitiated):
+        (WebKit::WebPage::setLastNavigationWasAppBound): Deleted.
+        * WebProcess/WebPage/WebPage.messages.in:
+
</ins><span class="cx"> 2021-07-08  Alexander Mikhaylenko  <alexm@gnome.org>
</span><span class="cx"> 
</span><span class="cx">         [GTK] Too easy to trigger navigation swipe on touchscreen
</span></span></pre></div>
<a id="trunkSourceWebKitNetworkProcessNetworkProcesscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp    2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp       2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -1363,7 +1363,7 @@
</span><span class="cx">     return m_privateClickMeasurementDebugModeEnabled;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void NetworkProcess::preconnectTo(PAL::SessionID sessionID, WebPageProxyIdentifier webPageProxyID, WebCore::PageIdentifier webPageID, const URL& url, const String& userAgent, WebCore::StoredCredentialsPolicy storedCredentialsPolicy, std::optional<NavigatingToAppBoundDomain> isNavigatingToAppBoundDomain, LastNavigationWasAppBound lastNavigationWasAppBound)
</del><ins>+void NetworkProcess::preconnectTo(PAL::SessionID sessionID, WebPageProxyIdentifier webPageProxyID, WebCore::PageIdentifier webPageID, const URL& url, const String& userAgent, WebCore::StoredCredentialsPolicy storedCredentialsPolicy, std::optional<NavigatingToAppBoundDomain> isNavigatingToAppBoundDomain, LastNavigationWasAppInitiated lastNavigationWasAppInitiated)
</ins><span class="cx"> {
</span><span class="cx">     LOG(Network, "(NetworkProcess) Preconnecting to URL %s (storedCredentialsPolicy %i)", url.string().utf8().data(), (int)storedCredentialsPolicy);
</span><span class="cx"> 
</span><span class="lines">@@ -1379,7 +1379,7 @@
</span><span class="cx"> 
</span><span class="cx">     NetworkLoadParameters parameters;
</span><span class="cx">     parameters.request = ResourceRequest { url };
</span><del>-    parameters.request.setIsAppBound(lastNavigationWasAppBound == LastNavigationWasAppBound::Yes);
</del><ins>+    parameters.request.setIsAppInitiated(lastNavigationWasAppInitiated == LastNavigationWasAppInitiated::Yes);
</ins><span class="cx">     parameters.request.setFirstPartyForCookies(url);
</span><span class="cx">     parameters.webPageProxyID = webPageProxyID;
</span><span class="cx">     parameters.webPageID = webPageID;
</span><span class="lines">@@ -2765,19 +2765,19 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(COCOA)
</span><del>-void NetworkProcess::appBoundNavigationData(PAL::SessionID sessionID, CompletionHandler<void(const AppBoundNavigationTestingData&)>&& completionHandler)
</del><ins>+void NetworkProcess::appPrivacyReportTestingData(PAL::SessionID sessionID, CompletionHandler<void(const AppPrivacyReportTestingData&)>&& completionHandler)
</ins><span class="cx"> {
</span><span class="cx">     if (auto* networkSession = this->networkSession(sessionID)) {
</span><del>-        completionHandler(networkSession->appBoundNavigationTestingData());
</del><ins>+        completionHandler(networkSession->appPrivacyReportTestingData());
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx">     completionHandler({ });
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void NetworkProcess::clearAppBoundNavigationData(PAL::SessionID sessionID, CompletionHandler<void()>&& completionHandler)
</del><ins>+void NetworkProcess::clearAppPrivacyReportTestingData(PAL::SessionID sessionID, CompletionHandler<void()>&& completionHandler)
</ins><span class="cx"> {
</span><span class="cx">     if (auto* networkSession = this->networkSession(sessionID))
</span><del>-        networkSession->appBoundNavigationTestingData().clearAppBoundNavigationDataTesting();
</del><ins>+        networkSession->appPrivacyReportTestingData().clearAppPrivacyReportTestingData();
</ins><span class="cx"> 
</span><span class="cx">     completionHandler();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKitNetworkProcessNetworkProcessh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/NetworkProcess/NetworkProcess.h (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/NetworkProcess/NetworkProcess.h      2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Source/WebKit/NetworkProcess/NetworkProcess.h 2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -25,6 +25,7 @@
</span><span class="cx"> 
</span><span class="cx"> #pragma once
</span><span class="cx"> 
</span><ins>+#include "AppPrivacyReport.h"
</ins><span class="cx"> #include "AuxiliaryProcess.h"
</span><span class="cx"> #include "CacheModel.h"
</span><span class="cx"> #include "CallbackID.h"
</span><span class="lines">@@ -289,7 +290,7 @@
</span><span class="cx">     using CacheStorageRootPathCallback = CompletionHandler<void(String&&)>;
</span><span class="cx">     void cacheStorageRootPath(PAL::SessionID, CacheStorageRootPathCallback&&);
</span><span class="cx"> 
</span><del>-    void preconnectTo(PAL::SessionID, WebPageProxyIdentifier, WebCore::PageIdentifier, const URL&, const String&, WebCore::StoredCredentialsPolicy, std::optional<NavigatingToAppBoundDomain>, LastNavigationWasAppBound);
</del><ins>+    void preconnectTo(PAL::SessionID, WebPageProxyIdentifier, WebCore::PageIdentifier, const URL&, const String&, WebCore::StoredCredentialsPolicy, std::optional<NavigatingToAppBoundDomain>, LastNavigationWasAppInitiated);
</ins><span class="cx"> 
</span><span class="cx">     void setSessionIsControlledByAutomation(PAL::SessionID, bool);
</span><span class="cx">     bool sessionIsControlledByAutomation(PAL::SessionID) const;
</span><span class="lines">@@ -378,8 +379,8 @@
</span><span class="cx">     void setCORSDisablingPatterns(WebCore::PageIdentifier, Vector<String>&&);
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(COCOA)
</span><del>-    void appBoundNavigationData(PAL::SessionID, CompletionHandler<void(const AppBoundNavigationTestingData&)>&&);
-    void clearAppBoundNavigationData(PAL::SessionID, CompletionHandler<void()>&&);
</del><ins>+    void appPrivacyReportTestingData(PAL::SessionID, CompletionHandler<void(const AppPrivacyReportTestingData&)>&&);
+    void clearAppPrivacyReportTestingData(PAL::SessionID, CompletionHandler<void()>&&);
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(WEB_RTC)
</span></span></pre></div>
<a id="trunkSourceWebKitNetworkProcessNetworkProcessmessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/NetworkProcess/NetworkProcess.messages.in (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/NetworkProcess/NetworkProcess.messages.in    2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Source/WebKit/NetworkProcess/NetworkProcess.messages.in       2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -77,7 +77,7 @@
</span><span class="cx">     PrepareToSuspend(bool isSuspensionImminent) -> () Async
</span><span class="cx">     ProcessDidResume()
</span><span class="cx"> 
</span><del>-    PreconnectTo(PAL::SessionID sessionID, WebKit::WebPageProxyIdentifier webPageProxyID, WebCore::PageIdentifier webPageID, URL url, String userAgent, enum:uint8_t WebCore::StoredCredentialsPolicy storedCredentialsPolicy, enum:bool std::optional<WebKit::NavigatingToAppBoundDomain> isNavigatingToAppBoundDomain, enum:bool WebKit::LastNavigationWasAppBound lastNavigationWasAppBound);
</del><ins>+    PreconnectTo(PAL::SessionID sessionID, WebKit::WebPageProxyIdentifier webPageProxyID, WebCore::PageIdentifier webPageID, URL url, String userAgent, enum:uint8_t WebCore::StoredCredentialsPolicy storedCredentialsPolicy, enum:bool std::optional<WebKit::NavigatingToAppBoundDomain> isNavigatingToAppBoundDomain, enum:bool WebKit::LastNavigationWasAppInitiated lastNavigationWasAppInitiated);
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(RESOURCE_LOAD_STATISTICS)
</span><span class="cx">     ClearPrevalentResource(PAL::SessionID sessionID, WebCore::RegistrableDomain resourceDomain) -> () Async
</span><span class="lines">@@ -193,8 +193,8 @@
</span><span class="cx">     ClearBundleIdentifier() -> () Async
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(COCOA)
</span><del>-    AppBoundNavigationData(PAL::SessionID sessionID) -> (struct WebKit::AppBoundNavigationTestingData data) Async
-    ClearAppBoundNavigationData(PAL::SessionID sessionID) -> () Async
</del><ins>+    AppPrivacyReportTestingData(PAL::SessionID sessionID) -> (struct WebKit::AppPrivacyReportTestingData data) Async
+    ClearAppPrivacyReportTestingData(PAL::SessionID sessionID) -> () Async
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     AddWebPageNetworkParameters(PAL::SessionID sessionID, WebKit::WebPageProxyIdentifier pageID, WebKit::WebPageNetworkParameters parameters)
</span></span></pre></div>
<a id="trunkSourceWebKitNetworkProcessNetworkResourceLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp     2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp        2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -882,7 +882,7 @@
</span><span class="cx"> 
</span><span class="cx"> void NetworkResourceLoader::continueWillSendRedirectedRequest(ResourceRequest&& request, ResourceRequest&& redirectRequest, ResourceResponse&& redirectResponse, std::optional<PrivateClickMeasurement::AttributionTriggerData>&& privateClickMeasurementAttributionTriggerData)
</span><span class="cx"> {
</span><del>-    redirectRequest.setIsAppBound(request.isAppBound());
</del><ins>+    redirectRequest.setIsAppInitiated(request.isAppInitiated());
</ins><span class="cx"> 
</span><span class="cx">     LOADER_RELEASE_LOG("continueWillSendRedirectedRequest: (m_isKeptAlive=%d, hasAdClickConversion=%d)", m_isKeptAlive, !!privateClickMeasurementAttributionTriggerData);
</span><span class="cx">     ASSERT(!isSynchronous());
</span><span class="lines">@@ -1504,9 +1504,9 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-bool NetworkResourceLoader::isAppBound()
</del><ins>+bool NetworkResourceLoader::isAppInitiated()
</ins><span class="cx"> {
</span><del>-    return m_parameters.request.isAppBound();
</del><ins>+    return m_parameters.request.isAppInitiated();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKitNetworkProcessNetworkResourceLoaderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.h (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.h       2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.h  2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -141,7 +141,7 @@
</span><span class="cx">     void serviceWorkerDidNotHandle(ServiceWorkerFetchTask*);
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    bool isAppBound();
</del><ins>+    bool isAppInitiated();
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     NetworkResourceLoader(NetworkResourceLoadParameters&&, NetworkConnectionToWebProcess&, Messages::NetworkConnectionToWebProcess::PerformSynchronousLoadDelayedReply&&);
</span></span></pre></div>
<a id="trunkSourceWebKitNetworkProcessNetworkSessionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/NetworkProcess/NetworkSession.h (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/NetworkProcess/NetworkSession.h      2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Source/WebKit/NetworkProcess/NetworkSession.h 2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -25,6 +25,7 @@
</span><span class="cx"> 
</span><span class="cx"> #pragma once
</span><span class="cx"> 
</span><ins>+#include "AppPrivacyReport.h"
</ins><span class="cx"> #include "NavigatingToAppBoundDomain.h"
</span><span class="cx"> #include "PrefetchCache.h"
</span><span class="cx"> #include "PrivateClickMeasurementNetworkLoader.h"
</span><span class="lines">@@ -162,7 +163,7 @@
</span><span class="cx">     PrivateClickMeasurementManager& privateClickMeasurement() { return *m_privateClickMeasurement; }
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(COCOA)
</span><del>-    AppBoundNavigationTestingData& appBoundNavigationTestingData() { return m_appBoundNavigationTestingData; }
</del><ins>+    AppPrivacyReportTestingData& appPrivacyReportTestingData() { return m_appPrivacyReportTestingData; }
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     void addPrivateClickMeasurementNetworkLoader(std::unique_ptr<PrivateClickMeasurementNetworkLoader>&& loader) { m_privateClickMeasurementNetworkLoaders.add(WTFMove(loader)); }
</span><span class="lines">@@ -220,7 +221,7 @@
</span><span class="cx"> #endif
</span><span class="cx">     
</span><span class="cx"> #if PLATFORM(COCOA)
</span><del>-    AppBoundNavigationTestingData m_appBoundNavigationTestingData;
</del><ins>+    AppPrivacyReportTestingData m_appPrivacyReportTestingData;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     HashSet<std::unique_ptr<PrivateClickMeasurementNetworkLoader>> m_privateClickMeasurementNetworkLoaders;
</span></span></pre></div>
<a id="trunkSourceWebKitNetworkProcessServiceWorkerServiceWorkerFetchTaskcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp      2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp 2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -255,7 +255,7 @@
</span><span class="cx">     if (!m_shouldSoftUpdate)
</span><span class="cx">         return;
</span><span class="cx">     if (auto* registration = m_loader.connectionToWebProcess().swConnection().server().getRegistration(m_serviceWorkerRegistrationIdentifier))
</span><del>-        registration->scheduleSoftUpdate(m_loader.isAppBound() ? WebCore::IsAppBound::Yes : WebCore::IsAppBound::No);
</del><ins>+        registration->scheduleSoftUpdate(m_loader.isAppInitiated() ? WebCore::IsAppInitiated::Yes : WebCore::IsAppInitiated::No);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKitNetworkProcessServiceWorkerServiceWorkerSoftUpdateLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerSoftUpdateLoader.cpp (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerSoftUpdateLoader.cpp       2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerSoftUpdateLoader.cpp  2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -131,7 +131,7 @@
</span><span class="cx">     m_networkLoad->start();
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(COCOA)
</span><del>-    session.appBoundNavigationTestingData().setDidPerformSoftUpdate();
</del><ins>+    session.appPrivacyReportTestingData().setDidPerformSoftUpdate();
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitNetworkProcessServiceWorkerWebSWServerConnectioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerConnection.cpp (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerConnection.cpp       2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerConnection.cpp  2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -147,7 +147,7 @@
</span><span class="cx">         unregisterServiceWorkerClient(clientIdentifier);
</span><span class="cx">     });
</span><span class="cx"> 
</span><del>-    ServiceWorkerClientData data { clientIdentifier, ServiceWorkerClientType::Window, ServiceWorkerClientFrameType::None, request.url(), request.isAppBound() ? WebCore::LastNavigationWasAppBound::Yes : WebCore::LastNavigationWasAppBound::No };
</del><ins>+    ServiceWorkerClientData data { clientIdentifier, ServiceWorkerClientType::Window, ServiceWorkerClientFrameType::None, request.url(), request.isAppInitiated() ? WebCore::LastNavigationWasAppInitiated::Yes : WebCore::LastNavigationWasAppInitiated::No };
</ins><span class="cx">     registerServiceWorkerClient(SecurityOriginData { registration.key().topOrigin() }, WTFMove(data), registration.identifier(), request.httpUserAgent());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -188,7 +188,7 @@
</span><span class="cx">     bool shouldSoftUpdate = registration && registration->shouldSoftUpdate(loader.parameters().options);
</span><span class="cx">     if (worker->shouldSkipFetchEvent()) {
</span><span class="cx">         if (shouldSoftUpdate)
</span><del>-            registration->scheduleSoftUpdate(loader.isAppBound() ? WebCore::IsAppBound::Yes : WebCore::IsAppBound::No);
</del><ins>+            registration->scheduleSoftUpdate(loader.isAppInitiated() ? WebCore::IsAppInitiated::Yes : WebCore::IsAppInitiated::No);
</ins><span class="cx"> 
</span><span class="cx">         return nullptr;
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebKitNetworkProcessServiceWorkerWebSWServerToContextConnectioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp      2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp 2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -92,9 +92,9 @@
</span><span class="cx">     send(Messages::WebSWContextManagerConnection::InstallServiceWorker { data, userAgent });
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebSWServerToContextConnection::updateAppBoundValue(ServiceWorkerIdentifier serviceWorkerIdentifier, WebCore::LastNavigationWasAppBound lastNavigationWasAppBound)
</del><ins>+void WebSWServerToContextConnection::updateAppInitiatedValue(ServiceWorkerIdentifier serviceWorkerIdentifier, WebCore::LastNavigationWasAppInitiated lastNavigationWasAppInitiated)
</ins><span class="cx"> {
</span><del>-    send(Messages::WebSWContextManagerConnection::UpdateAppBoundValue(serviceWorkerIdentifier, lastNavigationWasAppBound));
</del><ins>+    send(Messages::WebSWContextManagerConnection::UpdateAppInitiatedValue(serviceWorkerIdentifier, lastNavigationWasAppInitiated));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebSWServerToContextConnection::fireInstallEvent(ServiceWorkerIdentifier serviceWorkerIdentifier)
</span></span></pre></div>
<a id="trunkSourceWebKitNetworkProcessServiceWorkerWebSWServerToContextConnectionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerToContextConnection.h (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerToContextConnection.h        2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerToContextConnection.h   2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -86,7 +86,7 @@
</span><span class="cx"> 
</span><span class="cx">     // Messages to the SW host WebProcess
</span><span class="cx">     void installServiceWorkerContext(const WebCore::ServiceWorkerContextData&, const String& userAgent) final;
</span><del>-    void updateAppBoundValue(WebCore::ServiceWorkerIdentifier, WebCore::LastNavigationWasAppBound) final;
</del><ins>+    void updateAppInitiatedValue(WebCore::ServiceWorkerIdentifier, WebCore::LastNavigationWasAppInitiated) final;
</ins><span class="cx">     void fireInstallEvent(WebCore::ServiceWorkerIdentifier) final;
</span><span class="cx">     void fireActivateEvent(WebCore::ServiceWorkerIdentifier) final;
</span><span class="cx">     void terminateWorker(WebCore::ServiceWorkerIdentifier) final;
</span></span></pre></div>
<a id="trunkSourceWebKitNetworkProcesscacheNetworkCacheSpeculativeLoadManagercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp  2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Source/WebKit/NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp     2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -93,7 +93,7 @@
</span><span class="cx">     revalidationRequest.setFirstPartyForCookies(subResourceInfo.firstPartyForCookies());
</span><span class="cx">     revalidationRequest.setIsSameSite(subResourceInfo.isSameSite());
</span><span class="cx">     revalidationRequest.setIsTopSite(subResourceInfo.isTopSite());
</span><del>-    revalidationRequest.setIsAppBound(subResourceInfo.isAppBound());
</del><ins>+    revalidationRequest.setIsAppInitiated(subResourceInfo.isAppInitiated());
</ins><span class="cx"> 
</span><span class="cx">     if (!key.partition().isEmpty())
</span><span class="cx">         revalidationRequest.setCachePartition(key.partition());
</span><span class="lines">@@ -369,12 +369,12 @@
</span><span class="cx">         m_pendingFrameLoads.add(frameID, pendingFrameLoad.copyRef());
</span><span class="cx"> 
</span><span class="cx">         // Retrieve the subresources entry if it exists to start speculative revalidation and to update it.
</span><del>-        retrieveSubresourcesEntry(resourceKey, [this, weakThis = makeWeakPtr(*this), frameID, pendingFrameLoad = WTFMove(pendingFrameLoad), requestIsAppBound = request.isAppBound(), isNavigatingToAppBoundDomain](std::unique_ptr<SubresourcesEntry> entry) {
</del><ins>+        retrieveSubresourcesEntry(resourceKey, [this, weakThis = makeWeakPtr(*this), frameID, pendingFrameLoad = WTFMove(pendingFrameLoad), requestIsAppInitiated = request.isAppInitiated(), isNavigatingToAppBoundDomain](std::unique_ptr<SubresourcesEntry> entry) {
</ins><span class="cx">             if (!weakThis)
</span><span class="cx">                 return;
</span><span class="cx"> 
</span><span class="cx">             if (entry)
</span><del>-                startSpeculativeRevalidation(frameID, *entry, requestIsAppBound, isNavigatingToAppBoundDomain);
</del><ins>+                startSpeculativeRevalidation(frameID, *entry, requestIsAppInitiated, isNavigatingToAppBoundDomain);
</ins><span class="cx"> 
</span><span class="cx">             pendingFrameLoad->setExistingSubresourcesEntry(WTFMove(entry));
</span><span class="cx">         });
</span><span class="lines">@@ -592,11 +592,11 @@
</span><span class="cx">     });
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void SpeculativeLoadManager::startSpeculativeRevalidation(const GlobalFrameID& frameID, SubresourcesEntry& entry, bool requestIsAppBound, std::optional<NavigatingToAppBoundDomain> isNavigatingToAppBoundDomain)
</del><ins>+void SpeculativeLoadManager::startSpeculativeRevalidation(const GlobalFrameID& frameID, SubresourcesEntry& entry, bool requestIsAppInitiated, std::optional<NavigatingToAppBoundDomain> isNavigatingToAppBoundDomain)
</ins><span class="cx"> {
</span><span class="cx">     for (auto& subresourceInfo : entry.subresources()) {
</span><span class="cx">         auto& key = subresourceInfo.key();
</span><del>-        subresourceInfo.setIsAppBound(requestIsAppBound);
</del><ins>+        subresourceInfo.setIsAppInitiated(requestIsAppInitiated);
</ins><span class="cx">         if (!subresourceInfo.isTransient())
</span><span class="cx">             preloadEntry(key, subresourceInfo, frameID, isNavigatingToAppBoundDomain);
</span><span class="cx">         else {
</span></span></pre></div>
<a id="trunkSourceWebKitNetworkProcesscacheNetworkCacheSubresourcesEntryh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/NetworkProcess/cache/NetworkCacheSubresourcesEntry.h (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/NetworkProcess/cache/NetworkCacheSubresourcesEntry.h 2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Source/WebKit/NetworkProcess/cache/NetworkCacheSubresourcesEntry.h    2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -59,8 +59,8 @@
</span><span class="cx"> 
</span><span class="cx">     bool isFirstParty() const;
</span><span class="cx"> 
</span><del>-    bool isAppBound() const { return m_isAppBound; }
-    void setIsAppBound(bool isAppBound) { m_isAppBound = isAppBound; }
</del><ins>+    bool isAppInitiated() const { return m_isAppInitiated; }
+    void setIsAppInitiated(bool isAppInitiated) { m_isAppInitiated = isAppInitiated; }
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     Key m_key;
</span><span class="lines">@@ -68,7 +68,7 @@
</span><span class="cx">     WallTime m_firstSeen;
</span><span class="cx">     bool m_isTransient { false };
</span><span class="cx">     bool m_isSameSite { false };
</span><del>-    bool m_isAppBound { false };
</del><ins>+    bool m_isAppInitiated { true };
</ins><span class="cx">     URL m_firstPartyForCookies;
</span><span class="cx">     WebCore::HTTPHeaderMap m_requestHeaders;
</span><span class="cx">     WebCore::ResourceLoadPriority m_priority;
</span></span></pre></div>
<a id="trunkSourceWebKitNetworkProcesscocoaNetworkDataTaskCocoamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm 2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm    2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -341,9 +341,7 @@
</span><span class="cx">     RetainPtr<NSMutableURLRequest> mutableRequest = adoptNS([nsRequest.get() mutableCopy]);
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(APP_PRIVACY_REPORT)
</span><del>-    ALLOW_DEPRECATED_DECLARATIONS_BEGIN
-    mutableRequest.get()._isNonAppInitiated = !request.isAppBound();
-    ALLOW_DEPRECATED_DECLARATIONS_END
</del><ins>+    mutableRequest.get().attribution = request.isAppInitiated() ? NSURLRequestAttributionDeveloper : NSURLRequestAttributionUser;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     if (parameters.pcmDataCarried)
</span><span class="lines">@@ -351,7 +349,9 @@
</span><span class="cx"> 
</span><span class="cx">     nsRequest = mutableRequest;
</span><span class="cx"> 
</span><del>-    m_session->appBoundNavigationTestingData().updateAppBoundNavigationTestingData(request, request.firstPartyForCookies().isEmpty() ? WebCore::RegistrableDomain(request.url()) : WebCore::RegistrableDomain(request.firstPartyForCookies()));
</del><ins>+#if ENABLE(APP_PRIVACY_REPORT)
+    m_session->appPrivacyReportTestingData().didLoadAppInitiatedRequest(nsRequest.get().attribution == NSURLRequestAttributionDeveloper);
+#endif
</ins><span class="cx"> 
</span><span class="cx">     applySniffingPoliciesAndBindRequestToInferfaceIfNeeded(nsRequest, parameters.contentSniffingPolicy == WebCore::ContentSniffingPolicy::SniffContent && !url.isLocalFile(), parameters.contentEncodingSniffingPolicy == WebCore::ContentEncodingSniffingPolicy::Sniff);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitScriptswebkitmessagespy"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/Scripts/webkit/messages.py (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/Scripts/webkit/messages.py   2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Source/WebKit/Scripts/webkit/messages.py      2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -703,7 +703,7 @@
</span><span class="cx">         'WebCore::InspectorOverlay::Highlight': ['<WebCore/InspectorOverlay.h>'],
</span><span class="cx">         'WebCore::KeyframeValueList': ['<WebCore/GraphicsLayer.h>'],
</span><span class="cx">         'WebCore::KeypressCommand': ['<WebCore/KeyboardEvent.h>'],
</span><del>-        'WebCore::LastNavigationWasAppBound': ['<WebCore/ServiceWorkerClientData.h>'],
</del><ins>+        'WebCore::LastNavigationWasAppInitiated': ['<WebCore/ServiceWorkerClientData.h>'],
</ins><span class="cx">         'WebCore::LegacyCDMSessionClient::MediaKeyErrorCode': ['<WebCore/LegacyCDMSession.h>'],
</span><span class="cx">         'WebCore::LockBackForwardList': ['<WebCore/FrameLoaderTypes.h>'],
</span><span class="cx">         'WebCore::MessagePortChannelProvider::HasActivity': ['<WebCore/MessagePortChannelProvider.h>'],
</span><span class="lines">@@ -758,8 +758,8 @@
</span><span class="cx">         'WebCore::WillContinueLoading': ['<WebCore/FrameLoaderTypes.h>'],
</span><span class="cx">         'WebCore::SelectionGeometry': ['"EditorState.h"'],
</span><span class="cx">         'WebKit::ActivityStateChangeID': ['"DrawingAreaInfo.h"'],
</span><del>-        'WebKit::AppBoundNavigationTestingData': ['"NavigatingToAppBoundDomain.h"'],
</del><span class="cx">         'WebKit::AllowOverwrite': ['"DownloadID.h"'],
</span><ins>+        'WebKit::AppPrivacyReportTestingData': ['"AppPrivacyReport.h"'],
</ins><span class="cx">         'WebKit::BackForwardListItemState': ['"SessionState.h"'],
</span><span class="cx">         'WebKit::CallDownloadDidStart': ['"DownloadManager.h"'],
</span><span class="cx">         'WebKit::ContentWorldIdentifier': ['"ContentWorldShared.h"'],
</span><span class="lines">@@ -767,7 +767,7 @@
</span><span class="cx">         'WebKit::FindOptions': ['"WebFindOptions.h"'],
</span><span class="cx">         'WebKit::GestureRecognizerState': ['"GestureTypes.h"'],
</span><span class="cx">         'WebKit::GestureType': ['"GestureTypes.h"'],
</span><del>-        'WebKit::LastNavigationWasAppBound': ['"NavigatingToAppBoundDomain.h"'],
</del><ins>+        'WebKit::LastNavigationWasAppInitiated': ['"AppPrivacyReport.h"'],
</ins><span class="cx">         'WebKit::LayerHostingContextID': ['"LayerHostingContext.h"'],
</span><span class="cx">         'WebKit::LayerHostingMode': ['"LayerTreeContext.h"'],
</span><span class="cx">         'WebKit::PageState': ['"SessionState.h"'],
</span></span></pre></div>
<a id="trunkSourceWebKitSharedAppPrivacyReporthfromrev279749trunkSourceWebKitSharedNavigatingToAppBoundDomainh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit/Shared/AppPrivacyReport.h (from rev 279749, trunk/Source/WebKit/Shared/NavigatingToAppBoundDomain.h) (0 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/Shared/AppPrivacyReport.h                            (rev 0)
+++ trunk/Source/WebKit/Shared/AppPrivacyReport.h       2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -0,0 +1,92 @@
</span><ins>+/*
+ * Copyright (C) 2021 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "ArgumentCoder.h"
+#include "ArgumentCoders.h"
+#include "Decoder.h"
+#include "Encoder.h"
+#include <WebCore/ResourceRequest.h>
+
+namespace WebKit {
+
+enum class LastNavigationWasAppInitiated : bool { No, Yes };
+
+#if PLATFORM(COCOA)
+struct AppPrivacyReportTestingData {
+
+    void setDidPerformSoftUpdate()
+    {
+        didPerformSoftUpdate = true;
+    }
+
+    void clearAppPrivacyReportTestingData()
+    {
+        hasLoadedAppInitiatedRequestTesting = false;
+        hasLoadedNonAppInitiatedRequestTesting = false;
+        didPerformSoftUpdate = false;
+    }
+
+    void didLoadAppInitiatedRequest(bool isAppInitiated)
+    {
+        isAppInitiated ? hasLoadedAppInitiatedRequestTesting = true : hasLoadedNonAppInitiatedRequestTesting = true;
+    }
+
+    void encode(IPC::Encoder& encoder) const
+    {
+        encoder << hasLoadedAppInitiatedRequestTesting;
+        encoder << hasLoadedNonAppInitiatedRequestTesting;
+        encoder << didPerformSoftUpdate;
+    }
+
+    static std::optional<AppPrivacyReportTestingData> decode(IPC::Decoder& decoder)
+    {
+        std::optional<bool> hasLoadedAppInitiatedRequestTesting;
+        decoder >> hasLoadedAppInitiatedRequestTesting;
+        if (!hasLoadedAppInitiatedRequestTesting)
+            return std::nullopt;
+
+        std::optional<bool> hasLoadedNonAppInitiatedRequestTesting;
+        decoder >> hasLoadedNonAppInitiatedRequestTesting;
+        if (!hasLoadedNonAppInitiatedRequestTesting)
+            return std::nullopt;
+
+        std::optional<bool> didPerformSoftUpdate;
+        decoder >> didPerformSoftUpdate;
+        if (!didPerformSoftUpdate)
+            return std::nullopt;
+
+        return {{ *hasLoadedAppInitiatedRequestTesting, *hasLoadedNonAppInitiatedRequestTesting, *didPerformSoftUpdate }};
+    }
+
+    bool hasLoadedAppInitiatedRequestTesting { false };
+    bool hasLoadedNonAppInitiatedRequestTesting { false };
+    bool didPerformSoftUpdate { false };
+};
+#endif
+
+}
+
</ins></span></pre></div>
<a id="trunkSourceWebKitSharedAppPrivacyReportTestingDatahfromrev279749trunkSourceWebKitSharedNavigatingToAppBoundDomainh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit/Shared/AppPrivacyReportTestingData.h (from rev 279749, trunk/Source/WebKit/Shared/NavigatingToAppBoundDomain.h) (0 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/Shared/AppPrivacyReportTestingData.h                         (rev 0)
+++ trunk/Source/WebKit/Shared/AppPrivacyReportTestingData.h    2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -0,0 +1,93 @@
</span><ins>+/*
+ * Copyright (C) 2021 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "ArgumentCoder.h"
+#include "ArgumentCoders.h"
+#include "Decoder.h"
+#include "Encoder.h"
+#include <WebCore/RegistrableDomain.h>
+#include <WebCore/ResourceRequest.h>
+
+namespace WebKit {
+
+enum class LastNavigationWasAppInitiated : bool { No, Yes };
+
+#if PLATFORM(COCOA)
+struct AppPrivacyReportTestingData {
+
+    void setDidPerformSoftUpdate()
+    {
+        didPerformSoftUpdate = true;
+    }
+
+    void clearAppPrivacyReportTestingData()
+    {
+        hasLoadedAppInitiatedRequestTesting = false;
+        hasLoadedNonAppInitiatedRequestTesting = false;
+        didPerformSoftUpdate = false;
+    }
+
+    void didLoadAppInitiatedRequest(bool isAppInitiated)
+    {
+        isAppInitiated ? hasLoadedAppInitiatedRequestTesting = true : hasLoadedNonAppInitiatedRequestTesting = true;
+    }
+
+    void encode(IPC::Encoder& encoder) const
+    {
+        encoder << hasLoadedAppInitiatedRequestTesting;
+        encoder << hasLoadedNonAppInitiatedRequestTesting;
+        encoder << didPerformSoftUpdate;
+    }
+
+    static std::optional<AppPrivacyReportTestingData> decode(IPC::Decoder& decoder)
+    {
+        std::optional<bool> hasLoadedAppInitiatedRequestTesting;
+        decoder >> hasLoadedAppInitiatedRequestTesting;
+        if (!hasLoadedAppInitiatedRequestTesting)
+            return std::nullopt;
+
+        std::optional<bool> hasLoadedNonAppInitiatedRequestTesting;
+        decoder >> hasLoadedNonAppInitiatedRequestTesting;
+        if (!hasLoadedNonAppInitiatedRequestTesting)
+            return std::nullopt;
+
+        std::optional<bool> didPerformSoftUpdate;
+        decoder >> didPerformSoftUpdate;
+        if (!didPerformSoftUpdate)
+            return std::nullopt;
+
+        return {{ *hasLoadedAppInitiatedRequestTesting, *hasLoadedNonAppInitiatedRequestTesting, *didPerformSoftUpdate }};
+    }
+
+    bool hasLoadedAppInitiatedRequestTesting { false };
+    bool hasLoadedNonAppInitiatedRequestTesting { false };
+    bool didPerformSoftUpdate { false };
+};
+#endif
+
+}
+
</ins></span></pre></div>
<a id="trunkSourceWebKitSharedCocoaWebCoreArgumentCodersCocoamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/Shared/Cocoa/WebCoreArgumentCodersCocoa.mm (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/Shared/Cocoa/WebCoreArgumentCodersCocoa.mm   2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Source/WebKit/Shared/Cocoa/WebCoreArgumentCodersCocoa.mm      2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -618,7 +618,7 @@
</span><span class="cx">     IPC::encode(encoder, requestToSerialize.get());
</span><span class="cx"> 
</span><span class="cx">     encoder << resourceRequest.requester();
</span><del>-    encoder << resourceRequest.isAppBound();
</del><ins>+    encoder << resourceRequest.isAppInitiated();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool ArgumentCoder<WebCore::ResourceRequest>::decodePlatformData(Decoder& decoder, WebCore::ResourceRequest& resourceRequest)
</span><span class="lines">@@ -640,13 +640,13 @@
</span><span class="cx">     if (!decoder.decode(requester))
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    bool isAppBound;
-    if (!decoder.decode(isAppBound))
</del><ins>+    bool isAppInitiated;
+    if (!decoder.decode(isAppInitiated))
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     resourceRequest = WebCore::ResourceRequest(request->get());
</span><span class="cx">     resourceRequest.setRequester(requester);
</span><del>-    resourceRequest.setIsAppBound(isAppBound);
</del><ins>+    resourceRequest.setIsAppInitiated(isAppInitiated);
</ins><span class="cx"> 
</span><span class="cx">     return true;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKitSharedNavigatingToAppBoundDomainh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/Shared/NavigatingToAppBoundDomain.h (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/Shared/NavigatingToAppBoundDomain.h  2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Source/WebKit/Shared/NavigatingToAppBoundDomain.h     2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -35,72 +35,6 @@
</span><span class="cx"> namespace WebKit {
</span><span class="cx"> 
</span><span class="cx"> enum class NavigatingToAppBoundDomain : bool { No, Yes };
</span><del>-enum class LastNavigationWasAppBound : bool { No, Yes };
</del><span class="cx"> 
</span><del>-using ContextDomain = WebCore::RegistrableDomain;
-using RequestDomain = WebCore::RegistrableDomain;
-
-#if PLATFORM(COCOA)
-struct AppBoundNavigationTestingData {
-
-    void setDidPerformSoftUpdate()
-    {
-        didPerformSoftUpdate = true;
-    }
-    
-    void clearAppBoundNavigationDataTesting()
-    {
-        hasLoadedAppBoundRequestTesting = false;
-        hasLoadedNonAppBoundRequestTesting = false;
-        didPerformSoftUpdate = false;
-        contextData.clear();
-    }
-
-    void updateAppBoundNavigationTestingData(const WebCore::ResourceRequest& request, WebCore::RegistrableDomain&& contextDomain)
-    {
-        request.isAppBound() ? hasLoadedAppBoundRequestTesting = true : hasLoadedNonAppBoundRequestTesting = true;
-        contextData.add(WebCore::RegistrableDomain(request.url()), contextDomain);
-    }
-
-    void encode(IPC::Encoder& encoder) const
-    {
-        encoder << hasLoadedAppBoundRequestTesting;
-        encoder << hasLoadedNonAppBoundRequestTesting;
-        encoder << didPerformSoftUpdate;
-        encoder << contextData;
-    }
-
-    static std::optional<AppBoundNavigationTestingData> decode(IPC::Decoder& decoder)
-    {
-        std::optional<bool> hasLoadedAppBoundRequestTesting;
-        decoder >> hasLoadedAppBoundRequestTesting;
-        if (!hasLoadedAppBoundRequestTesting)
-            return std::nullopt;
-
-        std::optional<bool> hasLoadedNonAppBoundRequestTesting;
-        decoder >> hasLoadedNonAppBoundRequestTesting;
-        if (!hasLoadedNonAppBoundRequestTesting)
-            return std::nullopt;
-        
-        std::optional<bool> didPerformSoftUpdate;
-        decoder >> didPerformSoftUpdate;
-        if (!didPerformSoftUpdate)
-            return std::nullopt;
-
-        std::optional<HashMap<RequestDomain, ContextDomain>> contextData;
-        decoder >> contextData;
-        if (!contextData)
-            return std::nullopt;
-
-        return {{ *hasLoadedAppBoundRequestTesting, *hasLoadedNonAppBoundRequestTesting, *didPerformSoftUpdate, WTFMove(*contextData) }};
-    }
-
-    bool hasLoadedAppBoundRequestTesting { false };
-    bool hasLoadedNonAppBoundRequestTesting { false };
-    bool didPerformSoftUpdate { false };
-    HashMap<RequestDomain, ContextDomain> contextData;
-};
-#endif
-
</del><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitSharedWebPageCreationParameterscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/Shared/WebPageCreationParameters.cpp (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/Shared/WebPageCreationParameters.cpp 2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Source/WebKit/Shared/WebPageCreationParameters.cpp    2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -173,7 +173,7 @@
</span><span class="cx"> #if ENABLE(APP_BOUND_DOMAINS)
</span><span class="cx">     encoder << limitsNavigationsToAppBoundDomains;
</span><span class="cx"> #endif
</span><del>-    encoder << lastNavigationWasAppBound;
</del><ins>+    encoder << lastNavigationWasAppInitiated;
</ins><span class="cx">     encoder << shouldRelaxThirdPartyCookieBlocking;
</span><span class="cx">     encoder << canUseCredentialStorage;
</span><span class="cx"> 
</span><span class="lines">@@ -581,7 +581,7 @@
</span><span class="cx">     if (!decoder.decode(parameters.limitsNavigationsToAppBoundDomains))
</span><span class="cx">         return std::nullopt;
</span><span class="cx"> #endif
</span><del>-    if (!decoder.decode(parameters.lastNavigationWasAppBound))
</del><ins>+    if (!decoder.decode(parameters.lastNavigationWasAppInitiated))
</ins><span class="cx">         return std::nullopt;
</span><span class="cx"> 
</span><span class="cx">     if (!decoder.decode(parameters.shouldRelaxThirdPartyCookieBlocking))
</span></span></pre></div>
<a id="trunkSourceWebKitSharedWebPageCreationParametersh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/Shared/WebPageCreationParameters.h (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/Shared/WebPageCreationParameters.h   2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Source/WebKit/Shared/WebPageCreationParameters.h      2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -242,7 +242,7 @@
</span><span class="cx"> #if ENABLE(APP_BOUND_DOMAINS)
</span><span class="cx">     bool limitsNavigationsToAppBoundDomains { false };
</span><span class="cx"> #endif
</span><del>-    bool lastNavigationWasAppBound { false };
</del><ins>+    bool lastNavigationWasAppInitiated { true };
</ins><span class="cx">     bool canUseCredentialStorage { true };
</span><span class="cx"> 
</span><span class="cx">     WebCore::ShouldRelaxThirdPartyCookieBlocking shouldRelaxThirdPartyCookieBlocking { WebCore::ShouldRelaxThirdPartyCookieBlocking::No };
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessAPICocoaWKWebViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm     2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm        2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -2416,35 +2416,22 @@
</span><span class="cx">         _page->switchFromStaticFontRegistryToUserFontRegistry();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-- (void)_appBoundNavigationDataForDomain:(NSString *)domain completionHandler:(void (^)(NSString * context))completionHandler
</del><ins>+- (void)_didLoadAppInitiatedRequest:(void (^)(BOOL result))completionHandler
</ins><span class="cx"> {
</span><span class="cx">     THROW_IF_SUSPENDED;
</span><del>-    _page->appBoundNavigationData([registrableDomain = WebCore::RegistrableDomain::uncheckedCreateFromHost(domain), completionHandler = makeBlockPtr(completionHandler)] (auto&& appBoundData) mutable {
-        if (!appBoundData.contextData.contains(registrableDomain)) {
-            completionHandler(nil);
-            return;
-        }
-
-        completionHandler(appBoundData.contextData.get(registrableDomain).string());
</del><ins>+    _page->appPrivacyReportTestingData([completionHandler = makeBlockPtr(completionHandler)] (auto&& appPrivacyReportTestingData) mutable {
+        completionHandler(appPrivacyReportTestingData.hasLoadedAppInitiatedRequestTesting);
</ins><span class="cx">     });
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-- (void)_didLoadAppBoundRequest:(void (^)(BOOL result))completionHandler
</del><ins>+- (void)_didLoadNonAppInitiatedRequest:(void (^)(BOOL result))completionHandler
</ins><span class="cx"> {
</span><span class="cx">     THROW_IF_SUSPENDED;
</span><del>-    _page->appBoundNavigationData([completionHandler = makeBlockPtr(completionHandler)] (auto&& appBoundData) mutable {
-        completionHandler(appBoundData.hasLoadedAppBoundRequestTesting);
</del><ins>+    _page->appPrivacyReportTestingData([completionHandler = makeBlockPtr(completionHandler)] (auto&& appPrivacyReportTestingData) mutable {
+        completionHandler(appPrivacyReportTestingData.hasLoadedNonAppInitiatedRequestTesting);
</ins><span class="cx">     });
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-- (void)_didLoadNonAppBoundRequest:(void (^)(BOOL result))completionHandler
-{
-    THROW_IF_SUSPENDED;
-    _page->appBoundNavigationData([completionHandler = makeBlockPtr(completionHandler)] (auto&& appBoundData) mutable {
-        completionHandler(appBoundData.hasLoadedNonAppBoundRequestTesting);
-    });
-}
-
</del><span class="cx"> - (void)_suspendPage:(void (^)(BOOL))completionHandler
</span><span class="cx"> {
</span><span class="cx">     if (!_page) {
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessAPICocoaWKWebViewPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h       2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h  2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -406,9 +406,8 @@
</span><span class="cx"> */
</span><span class="cx"> - (void)_switchFromStaticFontRegistryToUserFontRegistry WK_API_AVAILABLE(macos(12.0));
</span><span class="cx"> 
</span><del>-- (void)_appBoundNavigationDataForDomain:(NSString *)domain completionHandler:(void (^)(NSString * context))completionHandler WK_API_AVAILABLE(macos(12.0), ios(15.0));
-- (void)_didLoadAppBoundRequest:(void (^)(BOOL result))completionHandler;
-- (void)_didLoadNonAppBoundRequest:(void (^)(BOOL result))completionHandler;
</del><ins>+- (void)_didLoadAppInitiatedRequest:(void (^)(BOOL result))completionHandler;
+- (void)_didLoadNonAppInitiatedRequest:(void (^)(BOOL result))completionHandler;
</ins><span class="cx"> 
</span><span class="cx"> - (void)_suspendPage:(void (^)(BOOL))completionHandler WK_API_AVAILABLE(macos(12.0), ios(15.0));
</span><span class="cx"> - (void)_resumePage:(void (^)(BOOL))completionHandler WK_API_AVAILABLE(macos(12.0), ios(15.0));
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessAPICocoaWKWebViewPrivateForTestingh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivateForTesting.h (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivateForTesting.h     2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivateForTesting.h        2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -34,9 +34,9 @@
</span><span class="cx">     WKWebViewAudioRoutingArbitrationStatusActive,
</span><span class="cx"> } WKWebViewAudioRoutingArbitrationStatus;
</span><span class="cx"> 
</span><del>-struct WKAppBoundNavigationTestingData {
-    BOOL hasLoadedAppBoundRequestTesting;
-    BOOL hasLoadedNonAppBoundRequestTesting;
</del><ins>+struct WKAppPrivacyReportTestingData {
+    BOOL hasLoadedAppInitiatedRequestTesting;
+    BOOL hasLoadedNonAppInitiatedRequestTesting;
</ins><span class="cx">     BOOL didPerformSoftUpdate;
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="lines">@@ -102,9 +102,9 @@
</span><span class="cx"> - (void)_setPrivateClickMeasurementAttributionTokenPublicKeyURLForTesting:(NSURL *)url completionHandler:(void(^)(void))completionHandler WK_API_AVAILABLE(macos(12.0), ios(15.0));
</span><span class="cx"> - (void)_setPrivateClickMeasurementAttributionTokenSignatureURLForTesting:(NSURL *)url completionHandler:(void(^)(void))completionHandler WK_API_AVAILABLE(macos(12.0), ios(15.0));
</span><span class="cx"> 
</span><del>-- (void)_lastNavigationWasAppBound:(void(^)(BOOL))completionHandler;
-- (void)_appBoundNavigationData:(void(^)(struct WKAppBoundNavigationTestingData data))completionHandler;
-- (void)_clearAppBoundNavigationData:(void(^)(void))completionHandler;
</del><ins>+- (void)_lastNavigationWasAppInitiated:(void(^)(BOOL))completionHandler;
+- (void)_appPrivacyReportTestingData:(void(^)(struct WKAppPrivacyReportTestingData data))completionHandler;
+- (void)_clearAppPrivacyReportTestingData:(void(^)(void))completionHandler;
</ins><span class="cx"> 
</span><span class="cx"> - (void)_createMediaSessionCoordinatorForTesting:(id <_WKMediaSessionCoordinator>)privateCoordinator completionHandler:(void(^)(BOOL))completionHandler;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessAPICocoaWKWebViewTestingmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewTesting.mm (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewTesting.mm      2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewTesting.mm 2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -365,23 +365,23 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-- (void)_lastNavigationWasAppBound:(void(^)(BOOL))completionHandler
</del><ins>+- (void)_lastNavigationWasAppInitiated:(void(^)(BOOL))completionHandler
</ins><span class="cx"> {
</span><del>-    _page->lastNavigationWasAppBound([completionHandler = makeBlockPtr(completionHandler)] (bool isAppBound) {
-        completionHandler(isAppBound);
</del><ins>+    _page->lastNavigationWasAppInitiated([completionHandler = makeBlockPtr(completionHandler)] (bool isAppInitiated) {
+        completionHandler(isAppInitiated);
</ins><span class="cx">     });
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-- (void)_appBoundNavigationData:(void(^)(struct WKAppBoundNavigationTestingData data))completionHandler
</del><ins>+- (void)_appPrivacyReportTestingData:(void(^)(struct WKAppPrivacyReportTestingData data))completionHandler
</ins><span class="cx"> {
</span><del>-    _page->appBoundNavigationData([completionHandler = makeBlockPtr(completionHandler)] (auto&& appBoundData) {
-        completionHandler({ appBoundData.hasLoadedAppBoundRequestTesting, appBoundData.hasLoadedNonAppBoundRequestTesting, appBoundData.didPerformSoftUpdate });
</del><ins>+    _page->appPrivacyReportTestingData([completionHandler = makeBlockPtr(completionHandler)] (auto&& appPrivacyReportTestingData) {
+        completionHandler({ appPrivacyReportTestingData.hasLoadedAppInitiatedRequestTesting, appPrivacyReportTestingData.hasLoadedNonAppInitiatedRequestTesting, appPrivacyReportTestingData.didPerformSoftUpdate });
</ins><span class="cx">     });
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-- (void)_clearAppBoundNavigationData:(void(^)(void))completionHandler
</del><ins>+- (void)_clearAppPrivacyReportTestingData:(void(^)(void))completionHandler
</ins><span class="cx"> {
</span><del>-    _page->clearAppBoundNavigationData([completionHandler = makeBlockPtr(completionHandler)] {
</del><ins>+    _page->clearAppPrivacyReportTestingData([completionHandler = makeBlockPtr(completionHandler)] {
</ins><span class="cx">         completionHandler();
</span><span class="cx">     });
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessCocoaWebPageProxyCocoamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm 2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm    2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -659,20 +659,18 @@
</span><span class="cx">     sendWithAsyncReply(Messages::WebPage::RequestActiveNowPlayingSessionInfo(), WTFMove(callback));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPageProxy::setLastNavigationWasAppBound(ResourceRequest& request)
</del><ins>+void WebPageProxy::setLastNavigationWasAppInitiated(ResourceRequest& request)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(APP_PRIVACY_REPORT)
</span><del>-    auto *nsRequest = request.nsURLRequest(WebCore::HTTPBodyUpdatePolicy::DoNotUpdateHTTPBody);
-    ALLOW_DEPRECATED_DECLARATIONS_BEGIN
-    request.setIsAppBound(!nsRequest._isNonAppInitiated);
-    ALLOW_DEPRECATED_DECLARATIONS_END
</del><ins>+    auto isAppInitiated = request.nsURLRequest(WebCore::HTTPBodyUpdatePolicy::DoNotUpdateHTTPBody).attribution == NSURLRequestAttributionDeveloper;
+    request.setIsAppInitiated(isAppInitiated);
+    m_lastNavigationWasAppInitiated = isAppInitiated;
</ins><span class="cx"> #endif
</span><del>-    m_lastNavigationWasAppBound = request.isAppBound();
</del><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPageProxy::lastNavigationWasAppBound(CompletionHandler<void(bool)>&& completionHandler)
</del><ins>+void WebPageProxy::lastNavigationWasAppInitiated(CompletionHandler<void(bool)>&& completionHandler)
</ins><span class="cx"> {
</span><del>-    sendWithAsyncReply(Messages::WebPage::LastNavigationWasAppBound(), WTFMove(completionHandler));
</del><ins>+    sendWithAsyncReply(Messages::WebPage::LastNavigationWasAppInitiated(), WTFMove(completionHandler));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebPageProxy::grantAccessToAssetServices()
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessNetworkNetworkProcessProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp    2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp       2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -1487,11 +1487,11 @@
</span><span class="cx">     sendWithAsyncReply(Messages::NetworkProcess::GetLocalStorageOriginDetails(sessionID), WTFMove(completionHandler));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void NetworkProcessProxy::preconnectTo(PAL::SessionID sessionID, WebPageProxyIdentifier webPageProxyID, WebCore::PageIdentifier webPageID, const URL& url, const String& userAgent, WebCore::StoredCredentialsPolicy storedCredentialsPolicy, std::optional<NavigatingToAppBoundDomain> isNavigatingToAppBoundDomain, LastNavigationWasAppBound lastNavigationWasAppBound)
</del><ins>+void NetworkProcessProxy::preconnectTo(PAL::SessionID sessionID, WebPageProxyIdentifier webPageProxyID, WebCore::PageIdentifier webPageID, const URL& url, const String& userAgent, WebCore::StoredCredentialsPolicy storedCredentialsPolicy, std::optional<NavigatingToAppBoundDomain> isNavigatingToAppBoundDomain, LastNavigationWasAppInitiated lastNavigationWasAppInitiated)
</ins><span class="cx"> {
</span><span class="cx">     if (!url.isValid() || !url.protocolIsInHTTPFamily())
</span><span class="cx">         return;
</span><del>-    send(Messages::NetworkProcess::PreconnectTo(sessionID, webPageProxyID, webPageID, url, userAgent, storedCredentialsPolicy, isNavigatingToAppBoundDomain, lastNavigationWasAppBound), 0);
</del><ins>+    send(Messages::NetworkProcess::PreconnectTo(sessionID, webPageProxyID, webPageID, url, userAgent, storedCredentialsPolicy, isNavigatingToAppBoundDomain, lastNavigationWasAppInitiated), 0);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static bool anyProcessPoolHasForegroundWebProcesses()
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessNetworkNetworkProcessProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.h (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.h      2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.h 2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -25,6 +25,7 @@
</span><span class="cx"> 
</span><span class="cx"> #pragma once
</span><span class="cx"> 
</span><ins>+#include "AppPrivacyReport.h"
</ins><span class="cx"> #include "AuxiliaryProcessProxy.h"
</span><span class="cx"> #include "CallbackID.h"
</span><span class="cx"> #include "NetworkProcessProxyMessagesReplies.h"
</span><span class="lines">@@ -128,7 +129,7 @@
</span><span class="cx"> 
</span><span class="cx">     void getLocalStorageDetails(PAL::SessionID, CompletionHandler<void(Vector<LocalStorageDatabaseTracker::OriginDetails>&&)>&&);
</span><span class="cx"> 
</span><del>-    void preconnectTo(PAL::SessionID, WebPageProxyIdentifier, WebCore::PageIdentifier, const URL&, const String&, WebCore::StoredCredentialsPolicy, std::optional<NavigatingToAppBoundDomain>, LastNavigationWasAppBound);
</del><ins>+    void preconnectTo(PAL::SessionID, WebPageProxyIdentifier, WebCore::PageIdentifier, const URL&, const String&, WebCore::StoredCredentialsPolicy, std::optional<NavigatingToAppBoundDomain>, LastNavigationWasAppInitiated);
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(RESOURCE_LOAD_STATISTICS)
</span><span class="cx">     void clearPrevalentResource(PAL::SessionID, const RegistrableDomain&, CompletionHandler<void()>&&);
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.cpp (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/WebPageProxy.cpp   2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.cpp      2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -1339,7 +1339,7 @@
</span><span class="cx">         navigation->setClientNavigationActivity(process().throttler().foregroundActivity("Client navigation"_s));
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(COCOA)
</span><del>-    setLastNavigationWasAppBound(request);
</del><ins>+    setLastNavigationWasAppInitiated(request);
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     loadRequestWithNavigationShared(m_process.copyRef(), m_webPageID, navigation.get(), WTFMove(request), shouldOpenExternalURLsPolicy, userData, ShouldTreatAsContinuingLoad::No, isNavigatingToAppBoundDomain());
</span><span class="lines">@@ -1500,7 +1500,7 @@
</span><span class="cx">     WEBPAGEPROXY_RELEASE_LOG(Loading, "loadSimulatedRequest:");
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(COCOA)
</span><del>-    setLastNavigationWasAppBound(simulatedRequest);
</del><ins>+    setLastNavigationWasAppInitiated(simulatedRequest);
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(APP_BOUND_DOMAINS)
</span><span class="lines">@@ -4539,7 +4539,8 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     auto storedCredentialsPolicy = m_canUseCredentialStorage ? WebCore::StoredCredentialsPolicy::Use : WebCore::StoredCredentialsPolicy::DoNotUse;
</span><del>-    websiteDataStore().networkProcess().preconnectTo(sessionID(), identifier(), webPageID(), url, userAgent(), storedCredentialsPolicy, isNavigatingToAppBoundDomain(), m_lastNavigationWasAppBound ? LastNavigationWasAppBound::Yes : LastNavigationWasAppBound::No);
</del><ins>+
+    websiteDataStore().networkProcess().preconnectTo(sessionID(), identifier(), webPageID(), url, userAgent(), storedCredentialsPolicy, isNavigatingToAppBoundDomain(), m_lastNavigationWasAppInitiated ? LastNavigationWasAppInitiated::Yes : LastNavigationWasAppInitiated::No);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebPageProxy::setCanUseCredentialStorage(bool canUseCredentialStorage)
</span><span class="lines">@@ -8203,7 +8204,7 @@
</span><span class="cx"> #if ENABLE(APP_BOUND_DOMAINS)
</span><span class="cx">     parameters.limitsNavigationsToAppBoundDomains = m_limitsNavigationsToAppBoundDomains;
</span><span class="cx"> #endif
</span><del>-    parameters.lastNavigationWasAppBound = m_lastNavigationWasAppBound;
</del><ins>+    parameters.lastNavigationWasAppInitiated = m_lastNavigationWasAppInitiated;
</ins><span class="cx">     parameters.shouldRelaxThirdPartyCookieBlocking = m_configuration->shouldRelaxThirdPartyCookieBlocking();
</span><span class="cx">     parameters.canUseCredentialStorage = m_canUseCredentialStorage;
</span><span class="cx"> 
</span><span class="lines">@@ -10735,14 +10736,14 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(COCOA)
</span><del>-void WebPageProxy::appBoundNavigationData(CompletionHandler<void(const AppBoundNavigationTestingData&)>&& completionHandler)
</del><ins>+void WebPageProxy::appPrivacyReportTestingData(CompletionHandler<void(const AppPrivacyReportTestingData&)>&& completionHandler)
</ins><span class="cx"> {
</span><del>-    websiteDataStore().networkProcess().sendWithAsyncReply(Messages::NetworkProcess::AppBoundNavigationData(m_websiteDataStore->sessionID()), WTFMove(completionHandler));
</del><ins>+    websiteDataStore().networkProcess().sendWithAsyncReply(Messages::NetworkProcess::AppPrivacyReportTestingData(m_websiteDataStore->sessionID()), WTFMove(completionHandler));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPageProxy::clearAppBoundNavigationData(CompletionHandler<void()>&& completionHandler)
</del><ins>+void WebPageProxy::clearAppPrivacyReportTestingData(CompletionHandler<void()>&& completionHandler)
</ins><span class="cx"> {
</span><del>-    websiteDataStore().networkProcess().sendWithAsyncReply(Messages::NetworkProcess::ClearAppBoundNavigationData(m_websiteDataStore->sessionID()), WTFMove(completionHandler));
</del><ins>+    websiteDataStore().networkProcess().sendWithAsyncReply(Messages::NetworkProcess::ClearAppPrivacyReportTestingData(m_websiteDataStore->sessionID()), WTFMove(completionHandler));
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.h (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/WebPageProxy.h     2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.h        2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -377,7 +377,7 @@
</span><span class="cx"> class WebWheelEventCoalescer;
</span><span class="cx"> class WebsiteDataStore;
</span><span class="cx"> 
</span><del>-struct AppBoundNavigationTestingData;
</del><ins>+struct AppPrivacyReportTestingData;
</ins><span class="cx"> struct DataDetectionResult;
</span><span class="cx"> struct DocumentEditingContext;
</span><span class="cx"> struct DocumentEditingContextRequest;
</span><span class="lines">@@ -1942,10 +1942,10 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(COCOA)
</span><del>-    void setLastNavigationWasAppBound(WebCore::ResourceRequest&);
-    void lastNavigationWasAppBound(CompletionHandler<void(bool)>&&);
-    void appBoundNavigationData(CompletionHandler<void(const AppBoundNavigationTestingData&)>&&);
-    void clearAppBoundNavigationData(CompletionHandler<void()>&&);
</del><ins>+    void setLastNavigationWasAppInitiated(WebCore::ResourceRequest&);
+    void lastNavigationWasAppInitiated(CompletionHandler<void(bool)>&&);
+    void appPrivacyReportTestingData(CompletionHandler<void(const AppPrivacyReportTestingData&)>&&);
+    void clearAppPrivacyReportTestingData(CompletionHandler<void()>&&);
</ins><span class="cx"> 
</span><span class="cx">     NSDictionary *contentsOfUserInterfaceItem(NSString *userInterfaceItem);
</span><span class="cx"> 
</span><span class="lines">@@ -3056,7 +3056,7 @@
</span><span class="cx"> 
</span><span class="cx">     size_t m_suspendMediaPlaybackCounter { 0 };
</span><span class="cx"> 
</span><del>-    bool m_lastNavigationWasAppBound { false };
</del><ins>+    bool m_lastNavigationWasAppInitiated { true };
</ins><span class="cx">     bool m_isRunningModalJavaScriptDialog { false };
</span><span class="cx">     bool m_isSuspended { false };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitWebKitxcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj     2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj        2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -989,6 +989,7 @@
</span><span class="cx">          46DF063C1F3905F8001980BB /* NetworkCORSPreflightChecker.h in Headers */ = {isa = PBXBuildFile; fileRef = 46DF063A1F3905E5001980BB /* NetworkCORSPreflightChecker.h */; };
</span><span class="cx">          46F38E8C2416E6730059375A /* RunningBoardServicesSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 46F38E8B2416E66D0059375A /* RunningBoardServicesSPI.h */; };
</span><span class="cx">          46F9B26323526EF3006FE5FA /* WebBackForwardCacheEntry.h in Headers */ = {isa = PBXBuildFile; fileRef = 46F9B26223526ED0006FE5FA /* WebBackForwardCacheEntry.h */; };
</span><ins>+               493102BD2683F3D0002BB885 /* AppPrivacyReport.h in Headers */ = {isa = PBXBuildFile; fileRef = 493102BC2683F3A5002BB885 /* AppPrivacyReport.h */; };
</ins><span class="cx">           4973DF482422941F00E4C26A /* NavigatingToAppBoundDomain.h in Headers */ = {isa = PBXBuildFile; fileRef = 4973DF472422941F00E4C26A /* NavigatingToAppBoundDomain.h */; };
</span><span class="cx">          4990002124D2429C00049CB4 /* WKRenderLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 4990001F24D2429C00049CB4 /* WKRenderLayer.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">          4990002424D24C2900049CB4 /* WKRenderObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 4990002324D24C1C00049CB4 /* WKRenderObject.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -3940,6 +3941,7 @@
</span><span class="cx">          46DF063A1F3905E5001980BB /* NetworkCORSPreflightChecker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NetworkCORSPreflightChecker.h; sourceTree = "<group>"; };
</span><span class="cx">          46F38E8B2416E66D0059375A /* RunningBoardServicesSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RunningBoardServicesSPI.h; sourceTree = "<group>"; };
</span><span class="cx">          46F9B26223526ED0006FE5FA /* WebBackForwardCacheEntry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebBackForwardCacheEntry.h; sourceTree = "<group>"; };
</span><ins>+               493102BC2683F3A5002BB885 /* AppPrivacyReport.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppPrivacyReport.h; sourceTree = "<group>"; };
</ins><span class="cx">           4973DF472422941F00E4C26A /* NavigatingToAppBoundDomain.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NavigatingToAppBoundDomain.h; sourceTree = "<group>"; };
</span><span class="cx">          4990001E24D2429C00049CB4 /* WKRenderLayer.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WKRenderLayer.cpp; sourceTree = "<group>"; };
</span><span class="cx">          4990001F24D2429C00049CB4 /* WKRenderLayer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WKRenderLayer.h; sourceTree = "<group>"; };
</span><span class="lines">@@ -6717,6 +6719,7 @@
</span><span class="cx">                          BC329D9916ACCE9900316DE2 /* APIWebArchive.mm */,
</span><span class="cx">                          BC329D9F16ACD47800316DE2 /* APIWebArchiveResource.h */,
</span><span class="cx">                          BC329D9E16ACD47800316DE2 /* APIWebArchiveResource.mm */,
</span><ins>+                               493102BC2683F3A5002BB885 /* AppPrivacyReport.h */,
</ins><span class="cx">                           515E7725183DD6F60007203F /* AsyncRequest.cpp */,
</span><span class="cx">                          515E7726183DD6F60007203F /* AsyncRequest.h */,
</span><span class="cx">                          1A2D956E12848564001EB962 /* AuxiliaryProcess.cpp */,
</span><span class="lines">@@ -11908,6 +11911,7 @@
</span><span class="cx">                          F48D2A8521583A7E00C6752B /* AppKitSPI.h in Headers */,
</span><span class="cx">                          F4EC94E32356CC57000BB614 /* ApplicationServicesSPI.h in Headers */,
</span><span class="cx">                          1AD4C1931B39F33200ABC28E /* ApplicationStateTracker.h in Headers */,
</span><ins>+                               493102BD2683F3D0002BB885 /* AppPrivacyReport.h in Headers */,
</ins><span class="cx">                           1AEFD27911D16C81008219D3 /* ArgumentCoder.h in Headers */,
</span><span class="cx">                          1AEFD2F711D1807B008219D3 /* ArgumentCoders.h in Headers */,
</span><span class="cx">                          1AAF0C4A12B16334008E49E2 /* ArgumentCodersCF.h in Headers */,
</span></span></pre></div>
<a id="trunkSourceWebKitWebProcessNetworkWebLoaderStrategycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp     2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp        2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -107,7 +107,7 @@
</span><span class="cx">     if (resource.type() != CachedResource::Type::MainResource || !frame.isMainFrame()) {
</span><span class="cx">         if (auto* document = frame.mainFrame().document()) {
</span><span class="cx">             if (document && document->loader())
</span><del>-                request.setIsAppBound(document->loader()->lastNavigationWasAppBound());
</del><ins>+                request.setIsAppInitiated(document->loader()->lastNavigationWasAppInitiated());
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -767,7 +767,7 @@
</span><span class="cx">     if (auto* document = webPage.mainFrame()->document()) {
</span><span class="cx">         request.setFirstPartyForCookies(document->firstPartyForCookies());
</span><span class="cx">         if (auto* loader = document->loader())
</span><del>-            request.setIsAppBound(loader->lastNavigationWasAppBound());
</del><ins>+            request.setIsAppInitiated(loader->lastNavigationWasAppInitiated());
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     std::optional<uint64_t> preconnectionIdentifier;
</span></span></pre></div>
<a id="trunkSourceWebKitWebProcessStorageWebSWContextManagerConnectioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.cpp (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.cpp 2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.cpp    2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -135,10 +135,10 @@
</span><span class="cx">     setShouldUseShortTimeout(store.getBoolValueForKey(WebPreferencesKey::shouldUseServiceWorkerShortTimeoutKey()));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebSWContextManagerConnection::updateAppBoundValue(ServiceWorkerIdentifier serviceWorkerIdentifier, WebCore::LastNavigationWasAppBound lastNavigationWasAppBound)
</del><ins>+void WebSWContextManagerConnection::updateAppInitiatedValue(ServiceWorkerIdentifier serviceWorkerIdentifier, WebCore::LastNavigationWasAppInitiated lastNavigationWasAppInitiated)
</ins><span class="cx"> {
</span><span class="cx">     if (auto* serviceWorkerThreadProxy = SWContextManager::singleton().serviceWorkerThreadProxy(serviceWorkerIdentifier))
</span><del>-        serviceWorkerThreadProxy->setLastNavigationWasAppBound(lastNavigationWasAppBound == WebCore::LastNavigationWasAppBound::Yes);
</del><ins>+        serviceWorkerThreadProxy->setLastNavigationWasAppInitiated(lastNavigationWasAppInitiated == WebCore::LastNavigationWasAppInitiated::Yes);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebSWContextManagerConnection::installServiceWorker(ServiceWorkerContextData&& data, String&& userAgent)
</span><span class="lines">@@ -234,7 +234,7 @@
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    serviceWorkerThreadProxy->setLastNavigationWasAppBound(request.isAppBound());
</del><ins>+    serviceWorkerThreadProxy->setLastNavigationWasAppInitiated(request.isAppInitiated());
</ins><span class="cx"> 
</span><span class="cx">     if (!isValidFetch(request, options, serviceWorkerThreadProxy->scriptURL(), referrer)) {
</span><span class="cx">         m_connectionToNetworkProcess->send(Messages::ServiceWorkerFetchTask::DidNotHandle { }, fetchIdentifier);
</span></span></pre></div>
<a id="trunkSourceWebKitWebProcessStorageWebSWContextManagerConnectionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.h (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.h   2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.h      2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -86,7 +86,7 @@
</span><span class="cx">     void serviceWorkerStarted(std::optional<WebCore::ServiceWorkerJobDataIdentifier>, WebCore::ServiceWorkerIdentifier, bool doesHandleFetch) final;
</span><span class="cx">     void serviceWorkerFailedToStart(std::optional<WebCore::ServiceWorkerJobDataIdentifier>, WebCore::ServiceWorkerIdentifier, const String& exceptionMessage) final;
</span><span class="cx">     void installServiceWorker(WebCore::ServiceWorkerContextData&&, String&& userAgent);
</span><del>-    void updateAppBoundValue(WebCore::ServiceWorkerIdentifier, WebCore::LastNavigationWasAppBound);
</del><ins>+    void updateAppInitiatedValue(WebCore::ServiceWorkerIdentifier, WebCore::LastNavigationWasAppInitiated);
</ins><span class="cx">     void startFetch(WebCore::SWServerConnectionIdentifier, WebCore::ServiceWorkerIdentifier, WebCore::FetchIdentifier, WebCore::ResourceRequest&&, WebCore::FetchOptions&&, IPC::FormDataReference&&, String&& referrer);
</span><span class="cx">     void cancelFetch(WebCore::SWServerConnectionIdentifier, WebCore::ServiceWorkerIdentifier, WebCore::FetchIdentifier);
</span><span class="cx">     void continueDidReceiveFetchResponse(WebCore::SWServerConnectionIdentifier, WebCore::ServiceWorkerIdentifier, WebCore::FetchIdentifier);
</span></span></pre></div>
<a id="trunkSourceWebKitWebProcessStorageWebSWContextManagerConnectionmessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.messages.in (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.messages.in 2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.messages.in    2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -24,7 +24,7 @@
</span><span class="cx"> 
</span><span class="cx"> messages -> WebSWContextManagerConnection NotRefCounted {
</span><span class="cx">     InstallServiceWorker(struct WebCore::ServiceWorkerContextData contextData, String userAgent)
</span><del>-    UpdateAppBoundValue(WebCore::ServiceWorkerIdentifier serviceWorkerIdentifier, enum:bool WebCore::LastNavigationWasAppBound lastNavigationWasAppBound)
</del><ins>+    UpdateAppInitiatedValue(WebCore::ServiceWorkerIdentifier serviceWorkerIdentifier, enum:bool WebCore::LastNavigationWasAppInitiated lastNavigationWasAppInitiated)
</ins><span class="cx">     StartFetch(WebCore::SWServerConnectionIdentifier serverConnectionIdentifier, WebCore::ServiceWorkerIdentifier serviceWorkerIdentifier, WebCore::FetchIdentifier fetchIdentifier, WebCore::ResourceRequest request, struct WebCore::FetchOptions options, IPC::FormDataReference requestBody, String referrer)
</span><span class="cx">     CancelFetch(WebCore::SWServerConnectionIdentifier serverConnectionIdentifier, WebCore::ServiceWorkerIdentifier serviceWorkerIdentifier, WebCore::FetchIdentifier fetchIdentifier)
</span><span class="cx">     ContinueDidReceiveFetchResponse(WebCore::SWServerConnectionIdentifier serverConnectionIdentifier, WebCore::ServiceWorkerIdentifier serviceWorkerIdentifier, WebCore::FetchIdentifier fetchIdentifier)
</span></span></pre></div>
<a id="trunkSourceWebKitWebProcessWebCoreSupportWebFrameLoaderClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp   2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp      2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -243,11 +243,11 @@
</span><span class="cx">     // The API can return a completely new request. We should ensure that at least the requester
</span><span class="cx">     // is kept, so that if this is a main resource load it's still considered as such.
</span><span class="cx">     auto requester = request.requester();
</span><del>-    auto appBoundValue = request.isAppBound();
</del><ins>+    auto appInitiatedValue = request.isAppInitiated();
</ins><span class="cx">     webPage->injectedBundleResourceLoadClient().willSendRequestForFrame(*webPage, m_frame, identifier, request, redirectResponse);
</span><span class="cx">     if (!request.isNull()) {
</span><span class="cx">         request.setRequester(requester);
</span><del>-        request.setIsAppBound(appBoundValue);
</del><ins>+        request.setIsAppInitiated(appInitiatedValue);
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitWebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp       2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp  2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -538,7 +538,7 @@
</span><span class="cx"> #if ENABLE(APP_BOUND_DOMAINS)
</span><span class="cx">     , m_limitsNavigationsToAppBoundDomains(parameters.limitsNavigationsToAppBoundDomains)
</span><span class="cx"> #endif
</span><del>-    , m_lastNavigationWasAppBound(parameters.lastNavigationWasAppBound)
</del><ins>+    , m_lastNavigationWasAppInitiated(parameters.lastNavigationWasAppInitiated)
</ins><span class="cx"> #if ENABLE(APP_HIGHLIGHTS)
</span><span class="cx">     , m_appHighlightsVisible(parameters.appHighlightsVisible)
</span><span class="cx"> #endif
</span><span class="lines">@@ -1670,7 +1670,7 @@
</span><span class="cx"> 
</span><span class="cx"> void WebPage::loadRequest(LoadParameters&& loadParameters)
</span><span class="cx"> {
</span><del>-    setLastNavigationWasAppBound(loadParameters.request.isAppBound());
</del><ins>+    setLastNavigationWasAppInitiated(loadParameters.request.isAppInitiated());
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(APP_BOUND_DOMAINS)
</span><span class="cx">     setIsNavigatingToAppBoundDomain(loadParameters.isNavigatingToAppBoundDomain, &m_mainFrame.get());
</span><span class="lines">@@ -1774,6 +1774,7 @@
</span><span class="cx"> 
</span><span class="cx"> void WebPage::loadSimulatedRequestAndResponse(LoadParameters&& loadParameters, ResourceResponse&& simulatedResponse)
</span><span class="cx"> {
</span><ins>+    setLastNavigationWasAppInitiated(loadParameters.request.isAppInitiated());
</ins><span class="cx">     auto sharedBuffer = SharedBuffer::create(loadParameters.data.data(), loadParameters.data.size());
</span><span class="cx">     loadDataImpl(loadParameters.navigationID, loadParameters.shouldTreatAsContinuingLoad, WTFMove(loadParameters.websitePolicies), WTFMove(sharedBuffer), WTFMove(loadParameters.request), WTFMove(simulatedResponse), URL(), loadParameters.userData, loadParameters.isNavigatingToAppBoundDomain, SubstituteData::SessionHistoryVisibility::Visible);
</span><span class="cx"> }
</span><span class="lines">@@ -6595,7 +6596,7 @@
</span><span class="cx"> {
</span><span class="cx">     Ref<WebDocumentLoader> documentLoader = WebDocumentLoader::create(request, substituteData);
</span><span class="cx"> 
</span><del>-    documentLoader->setLastNavigationWasAppBound(m_lastNavigationWasAppBound);
</del><ins>+    documentLoader->setLastNavigationWasAppInitiated(m_lastNavigationWasAppInitiated);
</ins><span class="cx"> 
</span><span class="cx">     if (frame.isMainFrame()) {
</span><span class="cx">         if (m_pendingNavigationID) {
</span><span class="lines">@@ -7632,9 +7633,9 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-void WebPage::lastNavigationWasAppBound(CompletionHandler<void(bool)>&& completionHandler)
</del><ins>+void WebPage::lastNavigationWasAppInitiated(CompletionHandler<void(bool)>&& completionHandler)
</ins><span class="cx"> {
</span><del>-    completionHandler(mainFrame()->document()->loader()->lastNavigationWasAppBound());
</del><ins>+    completionHandler(mainFrame()->document()->loader()->lastNavigationWasAppInitiated());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if HAVE(TRANSLATION_UI_SERVICES) && ENABLE(CONTEXT_MENUS)
</span></span></pre></div>
<a id="trunkSourceWebKitWebProcessWebPageWebPageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.h (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.h 2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.h    2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -1453,8 +1453,8 @@
</span><span class="cx">     void invalidateMediaSessionCoordinator();
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    void setLastNavigationWasAppBound(bool wasAppBound) { m_lastNavigationWasAppBound = wasAppBound; }
-    void lastNavigationWasAppBound(CompletionHandler<void(bool)>&&);
</del><ins>+    void setLastNavigationWasAppInitiated(bool wasAppBound) { m_lastNavigationWasAppInitiated = wasAppBound; }
+    void lastNavigationWasAppInitiated(CompletionHandler<void(bool)>&&);
</ins><span class="cx"> 
</span><span class="cx">     bool isParentProcessAWebBrowser() const;
</span><span class="cx"> 
</span><span class="lines">@@ -2335,7 +2335,7 @@
</span><span class="cx">     bool m_navigationHasOccured { false };
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    bool m_lastNavigationWasAppBound { false };
</del><ins>+    bool m_lastNavigationWasAppInitiated { true };
</ins><span class="cx"> 
</span><span class="cx">     bool m_canUseCredentialStorage { true };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitWebProcessWebPageWebPagemessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.messages.in (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.messages.in       2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.messages.in  2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -633,7 +633,7 @@
</span><span class="cx"> 
</span><span class="cx">     DispatchWheelEventWithoutScrolling(WebKit::WebWheelEvent event) -> (bool handled) Async
</span><span class="cx"> 
</span><del>-    LastNavigationWasAppBound() -> (bool wasAppBound) Async
</del><ins>+    LastNavigationWasAppInitiated() -> (bool wasAppBound) Async
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(MEDIA_SESSION_COORDINATOR)
</span><span class="cx">     CreateMediaSessionCoordinator(String identifier) -> (bool success) Async
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog    2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Tools/ChangeLog       2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -1,3 +1,67 @@
</span><ins>+2021-07-08  Kate Cheney  <katherine_cheney@apple.com>
+
+        Clean up App Privacy Report code
+        https://bugs.webkit.org/show_bug.cgi?id=227326
+        <rdar://problem/79696849>
+
+        Reviewed by Brent Fulgham.
+
+        Delete testing functions related to attribution context. Move App
+        Privacy Report tests into their own file.
+
+        * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
+        * TestWebKitAPI/Tests/WebKitCocoa/AppPrivacyReport.mm: Added.
+        (TEST):
+        (catch):
+        (function):
+        (-[SWAppInitiatedRequestMessageHandler userContentController:didReceiveScriptMessage:]):
+        * TestWebKitAPI/Tests/WebKitCocoa/AppPrivacyReportPlugIn.mm: Renamed from Tools/TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacyPlugIn.mm.
+        (-[AppPrivacyReportPlugIn webProcessPlugInBrowserContextController:frame:willSendRequestForResource:request:redirectResponse:]):
+        * TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm:
+        (-[SWAppBoundRequestMessageHandler userContentController:didReceiveScriptMessage:]): Deleted.
+        * TestWebKitAPI/Tests/WebKitCocoa/app-privacy-report-iframe.html: Added.
+        * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
+        * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
+        (WTR::InjectedBundle::didReceiveMessageToPage):
+        * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+        (WTR::TestRunner::didLoadAppInitiatedRequest):
+        (WTR::TestRunner::didLoadNonAppInitiatedRequest):
+        (WTR::TestRunner::appBoundRequestContextDataForDomain): Deleted.
+        (WTR::TestRunner::callDidReceiveAppBoundRequestContextDataForDomainCallback): Deleted.
+        (WTR::TestRunner::didLoadAppBoundRequest): Deleted.
+        (WTR::TestRunner::didLoadNonAppBoundRequest): Deleted.
+        * WebKitTestRunner/InjectedBundle/TestRunner.h:
+        * WebKitTestRunner/TestController.cpp:
+        (WTR::TestController::resetStateToConsistentValues):
+        (WTR::TestController::didLoadAppInitiatedRequest):
+        (WTR::TestController::didLoadNonAppInitiatedRequest):
+        (WTR::TestController::clearAppPrivacyReportTestingData):
+        (WTR::TestController::appBoundRequestContextDataForDomain): Deleted.
+        (WTR::TestController::didLoadAppBoundRequest): Deleted.
+        (WTR::TestController::didLoadNonAppBoundRequest): Deleted.
+        (WTR::TestController::clearAppBoundNavigationData): Deleted.
+        * WebKitTestRunner/TestController.h:
+        * WebKitTestRunner/TestInvocation.cpp:
+        (WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
+        (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
+        (WTR::TestInvocation::didReceiveAppBoundRequestContextDataForDomain): Deleted.
+        * WebKitTestRunner/TestInvocation.h:
+        * WebKitTestRunner/cocoa/TestControllerCocoa.mm:
+        (WTR::TestController::didLoadAppInitiatedRequest):
+        (WTR::TestController::didLoadNonAppInitiatedRequest):
+        (WTR::TestController::clearAppPrivacyReportTestingData):
+        (WTR::TestController::appBoundRequestContextDataForDomain): Deleted.
+        (WTR::TestController::didLoadAppBoundRequest): Deleted.
+        (WTR::TestController::didLoadNonAppBoundRequest): Deleted.
+        (WTR::TestController::clearAppBoundNavigationData): Deleted.
+        * WebKitTestRunner/cocoa/TestRunnerWKWebView.h:
+        * WebKitTestRunner/cocoa/TestRunnerWKWebView.mm:
+        (-[TestRunnerWKWebView _didLoadAppInitiatedRequest:]):
+        (-[TestRunnerWKWebView _didLoadNonAppInitiatedRequest:]):
+        (-[TestRunnerWKWebView _appBoundNavigationDataForDomain:completionHandler:]): Deleted.
+        (-[TestRunnerWKWebView _didLoadAppBoundRequest:]): Deleted.
+        (-[TestRunnerWKWebView _didLoadNonAppBoundRequest:]): Deleted.
+
</ins><span class="cx"> 2021-07-08  Garrett Davidson  <garrett_davidson@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Update the WebAuthenticationPanel.GetAssertionLA test to expect the right value
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPITestWebKitAPIxcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj        2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj   2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -295,7 +295,7 @@
</span><span class="cx">          46FACF7423E8842300A9EBC6 /* beforeunload-slow.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 46FACF7323E883EE00A9EBC6 /* beforeunload-slow.html */; };
</span><span class="cx">          4908C71126094E41000B1B2F /* PrivateClickMeasurement.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4908C70F26094E16000B1B2F /* PrivateClickMeasurement.mm */; };
</span><span class="cx">          4909EE3A2D09480C88982D56 /* Markable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EC79F168BE454E579E417B05 /* Markable.cpp */; };
</span><del>-               491AEEF82652E33500D530A8 /* InAppBrowserPrivacyPlugIn.mm in Sources */ = {isa = PBXBuildFile; fileRef = 491AEEF42652DDD000D530A8 /* InAppBrowserPrivacyPlugIn.mm */; };
</del><ins>+                491AEEF82652E33500D530A8 /* AppPrivacyReportPlugIn.mm in Sources */ = {isa = PBXBuildFile; fileRef = 491AEEF42652DDD000D530A8 /* AppPrivacyReportPlugIn.mm */; };
</ins><span class="cx">           491F3D5226027E53000E31F7 /* pcmWithoutFraudPreventionDatabase.db in Copy Resources */ = {isa = PBXBuildFile; fileRef = 491F3D4F26027CFE000E31F7 /* pcmWithoutFraudPreventionDatabase.db */; };
</span><span class="cx">          491F3D5326027E53000E31F7 /* pcmWithoutFraudPreventionDatabase.db-shm in Copy Resources */ = {isa = PBXBuildFile; fileRef = 491F3D5026027CFE000E31F7 /* pcmWithoutFraudPreventionDatabase.db-shm */; };
</span><span class="cx">          491F3D5426027E53000E31F7 /* pcmWithoutFraudPreventionDatabase.db-wal in Copy Resources */ = {isa = PBXBuildFile; fileRef = 491F3D5126027CFE000E31F7 /* pcmWithoutFraudPreventionDatabase.db-wal */; };
</span><span class="lines">@@ -313,6 +313,7 @@
</span><span class="cx">          498D030A26376B34009CBFAD /* resourceLoadStatisticsMissingUniqueIndex.db in Copy Resources */ = {isa = PBXBuildFile; fileRef = 498D030926376B2C009CBFAD /* resourceLoadStatisticsMissingUniqueIndex.db */; };
</span><span class="cx">          4995A6F025E8772000E5F0A9 /* csp-document-uri-report.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 4995A6EF25E876A300E5F0A9 /* csp-document-uri-report.html */; };
</span><span class="cx">          49AEEF6D2407359D00C87E4C /* InAppBrowserPrivacy.mm in Sources */ = {isa = PBXBuildFile; fileRef = 49AEEF6B2407358600C87E4C /* InAppBrowserPrivacy.mm */; };
</span><ins>+               49EF6AD52677C0BE007967DC /* AppPrivacyReport.mm in Sources */ = {isa = PBXBuildFile; fileRef = 49EF6AD42677C0BE007967DC /* AppPrivacyReport.mm */; };
</ins><span class="cx">           4BFDFFA71314776C0061F24B /* HitTestResultNodeHandle_Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BFDFFA61314776C0061F24B /* HitTestResultNodeHandle_Bundle.cpp */; };
</span><span class="cx">          510477721D298DDD009747EB /* IDBDeleteRecovery.sqlite3 in Copy Resources */ = {isa = PBXBuildFile; fileRef = 5104776F1D298D85009747EB /* IDBDeleteRecovery.sqlite3 */; };
</span><span class="cx">          510477731D298DDD009747EB /* IDBDeleteRecovery.sqlite3-shm in Copy Resources */ = {isa = PBXBuildFile; fileRef = 510477701D298D85009747EB /* IDBDeleteRecovery.sqlite3-shm */; };
</span><span class="lines">@@ -2118,7 +2119,7 @@
</span><span class="cx">          46FA2FED23846C9A000CCB0C /* HTTPHeaderMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTTPHeaderMap.cpp; sourceTree = "<group>"; };
</span><span class="cx">          46FACF7323E883EE00A9EBC6 /* beforeunload-slow.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "beforeunload-slow.html"; sourceTree = "<group>"; };
</span><span class="cx">          4908C70F26094E16000B1B2F /* PrivateClickMeasurement.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PrivateClickMeasurement.mm; sourceTree = "<group>"; };
</span><del>-               491AEEF42652DDD000D530A8 /* InAppBrowserPrivacyPlugIn.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = InAppBrowserPrivacyPlugIn.mm; sourceTree = "<group>"; };
</del><ins>+                491AEEF42652DDD000D530A8 /* AppPrivacyReportPlugIn.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = AppPrivacyReportPlugIn.mm; sourceTree = "<group>"; };
</ins><span class="cx">           491F3D4F26027CFE000E31F7 /* pcmWithoutFraudPreventionDatabase.db */ = {isa = PBXFileReference; lastKnownFileType = file; path = pcmWithoutFraudPreventionDatabase.db; sourceTree = "<group>"; };
</span><span class="cx">          491F3D5026027CFE000E31F7 /* pcmWithoutFraudPreventionDatabase.db-shm */ = {isa = PBXFileReference; lastKnownFileType = file; path = "pcmWithoutFraudPreventionDatabase.db-shm"; sourceTree = "<group>"; };
</span><span class="cx">          491F3D5126027CFE000E31F7 /* pcmWithoutFraudPreventionDatabase.db-wal */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "pcmWithoutFraudPreventionDatabase.db-wal"; sourceTree = "<group>"; };
</span><span class="lines">@@ -2137,6 +2138,7 @@
</span><span class="cx">          49AEEF682407276F00C87E4C /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
</span><span class="cx">          49AEEF6B2407358600C87E4C /* InAppBrowserPrivacy.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = InAppBrowserPrivacy.mm; sourceTree = "<group>"; };
</span><span class="cx">          49D7FBA7241FDDDA00AB67FA /* in-app-browser-privacy-local-file.html */ = {isa = PBXFileReference; lastKnownFileType = text.html; path = "in-app-browser-privacy-local-file.html"; sourceTree = "<group>"; };
</span><ins>+               49EF6AD42677C0BE007967DC /* AppPrivacyReport.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = AppPrivacyReport.mm; sourceTree = "<group>"; };
</ins><span class="cx">           4A410F4B19AF7BD6002EBAB5 /* UserMedia.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UserMedia.cpp; sourceTree = "<group>"; };
</span><span class="cx">          4A410F4D19AF7BEF002EBAB5 /* getUserMedia.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = getUserMedia.html; sourceTree = "<group>"; };
</span><span class="cx">          4A410F4D19AF7BEF002EBAB6 /* ondevicechange.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = ondevicechange.html; sourceTree = "<group>"; };
</span><span class="lines">@@ -3387,6 +3389,8 @@
</span><span class="cx">                          2DE71AFD1D49C0BD00904094 /* AnimatedResize.mm */,
</span><span class="cx">                          A1798B8122431D65000764BD /* ApplePay.mm */,
</span><span class="cx">                          63F668201F97C3AA0032EE51 /* ApplicationManifest.mm */,
</span><ins>+                               49EF6AD42677C0BE007967DC /* AppPrivacyReport.mm */,
+                               491AEEF42652DDD000D530A8 /* AppPrivacyReportPlugIn.mm */,
</ins><span class="cx">                           51B40D9D23AC960E00E05241 /* AsyncFunction.mm */,
</span><span class="cx">                          834138C6203261B900F26960 /* AsyncPolicyForNavigationResponse.mm */,
</span><span class="cx">                          3760C4F0211249AF00233ACC /* AttrStyle.mm */,
</span><span class="lines">@@ -3475,7 +3479,6 @@
</span><span class="cx">                          93BCBC8023CC6EE800CA2221 /* IDBObjectStoreInfoUpgradeToV2.mm */,
</span><span class="cx">                          F44A7D1F268D5C6900B49BB8 /* ImageAnalysisTests.mm */,
</span><span class="cx">                          49AEEF6B2407358600C87E4C /* InAppBrowserPrivacy.mm */,
</span><del>-                               491AEEF42652DDD000D530A8 /* InAppBrowserPrivacyPlugIn.mm */,
</del><span class="cx">                           51A587841D272EF3004BA9AF /* IndexedDBDatabaseProcessKill.mm */,
</span><span class="cx">                          CAB0FF5422332C3A006CA5B0 /* IndexedDBFileName.mm */,
</span><span class="cx">                          9399BA01237110AE008392BF /* IndexedDBInPageCache.mm */,
</span><span class="lines">@@ -5347,6 +5350,7 @@
</span><span class="cx">                          A1798B8222431D65000764BD /* ApplePay.mm in Sources */,
</span><span class="cx">                          63F668221F97F7F90032EE51 /* ApplicationManifest.mm in Sources */,
</span><span class="cx">                          6354F4D11F7C3AB500D89DF3 /* ApplicationManifestParser.cpp in Sources */,
</span><ins>+                               49EF6AD52677C0BE007967DC /* AppPrivacyReport.mm in Sources */,
</ins><span class="cx">                           51B40D9E23AC962400E05241 /* AsyncFunction.mm in Sources */,
</span><span class="cx">                          834138C7203261CA00F26960 /* AsyncPolicyForNavigationResponse.mm in Sources */,
</span><span class="cx">                          7CCE7EB41A411A7E00447C4C /* AttributedString.mm in Sources */,
</span><span class="lines">@@ -5509,7 +5513,6 @@
</span><span class="cx">                          CDCF78A8244A32F700480311 /* FullscreenAlert.mm in Sources */,
</span><span class="cx">                          CD78E11D1DB7EA660014A2DE /* FullscreenDelegate.mm in Sources */,
</span><span class="cx">                          CDB213BD24EF522800FDE301 /* FullscreenFocus.mm in Sources */,
</span><del>-                               F44A7D20268D5C6900B49BB8 /* ImageAnalysisTests.mm in Sources */,
</del><span class="cx">                           CDE77D2525A6591C00D4115E /* FullscreenPointerLeave.mm in Sources */,
</span><span class="cx">                          CDDC7C6925FFF6D000224278 /* FullscreenRemoveNodeBeforeEnter.mm in Sources */,
</span><span class="cx">                          CDBFCC451A9FF45300A7B691 /* FullscreenZoomInitialFrame.mm in Sources */,
</span><span class="lines">@@ -5543,6 +5546,7 @@
</span><span class="cx">                          510477781D29923B009747EB /* IDBDeleteRecovery.mm in Sources */,
</span><span class="cx">                          5110FCFA1E01CDB8006F8D0B /* IDBIndexUpgradeToV2.mm in Sources */,
</span><span class="cx">                          93BCBC8323CC6F2A00CA2221 /* IDBObjectStoreInfoUpgradeToV2.mm in Sources */,
</span><ins>+                               F44A7D20268D5C6900B49BB8 /* ImageAnalysisTests.mm in Sources */,
</ins><span class="cx">                           7B18417C2673860200ED4F8D /* ImageBufferTests.cpp in Sources */,
</span><span class="cx">                          F44A9AF72649BBDD00E7CB16 /* ImmediateActionTests.mm in Sources */,
</span><span class="cx">                          49AEEF6D2407359D00C87E4C /* InAppBrowserPrivacy.mm in Sources */,
</span><span class="lines">@@ -5973,6 +5977,7 @@
</span><span class="cx">                  files = (
</span><span class="cx">                          077A5AF3230638A600A7105C /* AccessibilityTestPlugin.mm in Sources */,
</span><span class="cx">                          37E7DD671EA071F3009B396D /* AdditionalReadAccessAllowedURLsPlugin.mm in Sources */,
</span><ins>+                               491AEEF82652E33500D530A8 /* AppPrivacyReportPlugIn.mm in Sources */,
</ins><span class="cx">                           754CEC811F6722F200D0039A /* AutoFillAvailable.mm in Sources */,
</span><span class="cx">                          5C4259462266A68A0039AA7A /* BasicProposedCredentialPlugIn.mm in Sources */,
</span><span class="cx">                          374B7A611DF371CF00ACCB6C /* BundleEditingDelegatePlugIn.mm in Sources */,
</span><span class="lines">@@ -5988,7 +5993,6 @@
</span><span class="cx">                          F4B0168425AE08F800E445C4 /* DisableSpellcheckPlugIn.mm in Sources */,
</span><span class="cx">                          518EE51920A78CE500E024F3 /* DoubleDefersLoadingPlugin.mm in Sources */,
</span><span class="cx">                          5CB5B3C21FFC55CF00C27BB0 /* FrameHandleSerialization.mm in Sources */,
</span><del>-                               491AEEF82652E33500D530A8 /* InAppBrowserPrivacyPlugIn.mm in Sources */,
</del><span class="cx">                           F460F65B261119580064F2B6 /* InjectedBundleHitTestPlugIn.mm in Sources */,
</span><span class="cx">                          0E404A8C2166DE0A008271BA /* InjectedBundleNodeHandleIsSelectElement.mm in Sources */,
</span><span class="cx">                          79C5D431209D768300F1E7CA /* InjectedBundleNodeHandleIsTextField.mm in Sources */,
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsWebKitCocoaAppPrivacyReportmm"></a>
<div class="addfile"><h4>Added: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/AppPrivacyReport.mm (0 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/AppPrivacyReport.mm                          (rev 0)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/AppPrivacyReport.mm     2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -0,0 +1,736 @@
</span><ins>+/*
+ * Copyright (C) 2021 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "config.h"
+
+#import "HTTPServer.h"
+#import "PlatformUtilities.h"
+#import "ServiceWorkerTCPServer.h"
+#import "TestNavigationDelegate.h"
+#import "TestUIDelegate.h"
+#import "TestWKWebView.h"
+#import "WKWebViewConfigurationExtras.h"
+#import <Foundation/NSURLRequest.h>
+#import <WebKit/WKPreferencesPrivate.h>
+#import <WebKit/WKWebViewPrivateForTesting.h>
+#import <WebKit/WKWebsiteDataStorePrivate.h>
+#import <pal/spi/cf/CFNetworkSPI.h>
+#import <wtf/RunLoop.h>
+#import <wtf/text/WTFString.h>
+
+#if ENABLE(APP_PRIVACY_REPORT)
+TEST(AppPrivacyReport, DefaultRequestIsAppInitiated)
+{
+    auto configuration = adoptNS([[WKWebViewConfiguration alloc] init]);
+
+    auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:CGRectZero configuration:configuration.get()]);
+    NSString *url = @"https://webkit.org";
+
+    __block bool isDone = false;
+    // Don't set the attribution API on NSURLRequest to make sure the default is app initiated.
+    [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]];
+    [webView _test_waitForDidFinishNavigation];
+
+    [webView _lastNavigationWasAppInitiated:^(BOOL isAppInitiated) {
+        EXPECT_TRUE(isAppInitiated);
+        isDone = true;
+    }];
+
+    TestWebKitAPI::Util::run(&isDone);
+
+    isDone = false;
+    [webView _appPrivacyReportTestingData:^(struct WKAppPrivacyReportTestingData data) {
+        EXPECT_TRUE(data.hasLoadedAppInitiatedRequestTesting);
+        EXPECT_FALSE(data.hasLoadedNonAppInitiatedRequestTesting);
+        isDone = true;
+    }];
+
+    TestWebKitAPI::Util::run(&isDone);
+}
+
+TEST(AppPrivacyReport, AppInitiatedRequest)
+{
+    auto configuration = adoptNS([[WKWebViewConfiguration alloc] init]);
+
+    auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:CGRectZero configuration:configuration.get()]);
+    NSString *url = @"https://webkit.org";
+
+    __block bool isDone = false;
+    NSMutableURLRequest *appInitiatedRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:url]];
+    appInitiatedRequest.attribution = NSURLRequestAttributionDeveloper;
+
+    [webView loadRequest:appInitiatedRequest];
+    [webView _test_waitForDidFinishNavigation];
+
+    [webView _lastNavigationWasAppInitiated:^(BOOL isAppInitiated) {
+        EXPECT_TRUE(isAppInitiated);
+        isDone = true;
+    }];
+
+    TestWebKitAPI::Util::run(&isDone);
+
+    isDone = false;
+    [webView _appPrivacyReportTestingData:^(struct WKAppPrivacyReportTestingData data) {
+        EXPECT_TRUE(data.hasLoadedAppInitiatedRequestTesting);
+        EXPECT_FALSE(data.hasLoadedNonAppInitiatedRequestTesting);
+        isDone = true;
+    }];
+
+    TestWebKitAPI::Util::run(&isDone);
+}
+
+TEST(AppPrivacyReport, NonAppInitiatedRequest)
+{
+    auto configuration = adoptNS([[WKWebViewConfiguration alloc] init]);
+
+    auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:CGRectZero configuration:configuration.get()]);
+    NSString *url = @"https://webkit.org";
+
+    __block bool isDone = false;
+    NSMutableURLRequest *nonAppInitiatedRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:url]];
+    nonAppInitiatedRequest.attribution = NSURLRequestAttributionUser;
+
+    [webView loadRequest:nonAppInitiatedRequest];
+    [webView _test_waitForDidFinishNavigation];
+
+    [webView _lastNavigationWasAppInitiated:^(BOOL isAppInitiated) {
+        EXPECT_FALSE(isAppInitiated);
+        isDone = true;
+    }];
+
+    TestWebKitAPI::Util::run(&isDone);
+
+    isDone = false;
+    [webView _appPrivacyReportTestingData:^(struct WKAppPrivacyReportTestingData data) {
+        EXPECT_FALSE(data.hasLoadedAppInitiatedRequestTesting);
+        EXPECT_TRUE(data.hasLoadedNonAppInitiatedRequestTesting);
+        isDone = true;
+    }];
+
+    TestWebKitAPI::Util::run(&isDone);
+}
+
+TEST(AppPrivacyReport, AppInitiatedRequestWithNavigation)
+{
+    auto configuration = adoptNS([[WKWebViewConfiguration alloc] init]);
+
+    auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:CGRectZero configuration:configuration.get()]);
+    NSString *appInitiatedURL = @"https://www.webkit.org";
+    NSString *nonAppInitiatedURL = @"https://www.apple.com";
+
+    NSMutableURLRequest *appInitiatedRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:appInitiatedURL]];
+    appInitiatedRequest.attribution = NSURLRequestAttributionDeveloper;
+
+    [webView loadRequest:appInitiatedRequest];
+    [webView _test_waitForDidFinishNavigation];
+
+    __block bool isDone = false;
+    [webView _lastNavigationWasAppInitiated:^(BOOL isAppInitiated) {
+        EXPECT_TRUE(isAppInitiated);
+        isDone = true;
+    }];
+
+    TestWebKitAPI::Util::run(&isDone);
+
+    isDone = false;
+    [webView _appPrivacyReportTestingData:^(struct WKAppPrivacyReportTestingData data) {
+        EXPECT_TRUE(data.hasLoadedAppInitiatedRequestTesting);
+        EXPECT_FALSE(data.hasLoadedNonAppInitiatedRequestTesting);
+        isDone = true;
+    }];
+
+    TestWebKitAPI::Util::run(&isDone);
+
+    isDone = false;
+    NSMutableURLRequest *nonAppInitiatedRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:nonAppInitiatedURL]];
+    nonAppInitiatedRequest.attribution = NSURLRequestAttributionUser;
+
+    isDone = false;
+    [webView _clearAppPrivacyReportTestingData:^{
+        isDone = true;
+    }];
+
+    TestWebKitAPI::Util::run(&isDone);
+
+    // Load a non app initated request and confirm the loads are marked correctly.
+    [webView loadRequest:nonAppInitiatedRequest];
+    [webView _test_waitForDidFinishNavigation];
+
+    [webView _lastNavigationWasAppInitiated:^(BOOL isAppInitiated) {
+        EXPECT_FALSE(isAppInitiated);
+        isDone = true;
+    }];
+
+    TestWebKitAPI::Util::run(&isDone);
+
+    isDone = false;
+    [webView _appPrivacyReportTestingData:^(struct WKAppPrivacyReportTestingData data) {
+        EXPECT_FALSE(data.hasLoadedAppInitiatedRequestTesting);
+        EXPECT_TRUE(data.hasLoadedNonAppInitiatedRequestTesting);
+        isDone = true;
+    }];
+
+    TestWebKitAPI::Util::run(&isDone);
+}
+
+TEST(AppPrivacyReport, AppInitiatedRequestWithSubFrame)
+{
+    auto configuration = adoptNS([[WKWebViewConfiguration alloc] init]);
+    [configuration _setOverrideContentSecurityPolicy:@"script-src 'nonce-b'"];
+
+    __block bool isDone = false;
+    auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:configuration.get()]);
+    NSMutableURLRequest *appInitiatedRequest = [NSMutableURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"page-with-csp" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]];
+    appInitiatedRequest.attribution = NSURLRequestAttributionDeveloper;
+
+    [webView loadRequest:appInitiatedRequest];
+
+    [webView waitForMessage:@"MainFrame: B"];
+    [webView waitForMessage:@"Subframe: B"];
+
+    [webView _appPrivacyReportTestingData: ^(struct WKAppPrivacyReportTestingData data) {
+        EXPECT_TRUE(data.hasLoadedAppInitiatedRequestTesting);
+        EXPECT_FALSE(data.hasLoadedNonAppInitiatedRequestTesting);
+        isDone = true;
+    }];
+
+    TestWebKitAPI::Util::run(&isDone);
+}
+
+TEST(AppPrivacyReport, NonAppInitiatedRequestWithSubFrame)
+{
+    auto configuration = adoptNS([[WKWebViewConfiguration alloc] init]);
+    [configuration _setOverrideContentSecurityPolicy:@"script-src 'nonce-b'"];
+
+    __block bool isDone = false;
+    auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:configuration.get()]);
+    NSMutableURLRequest *nonAppInitiatedRequest = [NSMutableURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"page-with-csp" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]];
+    nonAppInitiatedRequest.attribution = NSURLRequestAttributionUser;
+
+    [webView loadRequest:nonAppInitiatedRequest];
+
+    [webView waitForMessage:@"MainFrame: B"];
+    [webView waitForMessage:@"Subframe: B"];
+
+    [webView _appPrivacyReportTestingData: ^(struct WKAppPrivacyReportTestingData data) {
+        EXPECT_FALSE(data.hasLoadedAppInitiatedRequestTesting);
+        EXPECT_TRUE(data.hasLoadedNonAppInitiatedRequestTesting);
+        isDone = true;
+    }];
+
+    TestWebKitAPI::Util::run(&isDone);
+}
+
+static const char* mainSWBytes = R"SWRESOURCE(
+<script>
+try {
+    navigator.serviceWorker.register('/sw.js').then(function(reg) {
+        if (reg.active) {
+            alert('worker already active');
+            return;
+        }
+        worker = reg.installing;
+        worker.addEventListener('statechange', function() {
+            if (worker.state == 'activated')
+                alert('successfully registered');
+        });
+    }).catch(function(error) {
+        alert('Registration failed with: ' + error);
+    });
+} catch(e) {
+    alert('Exception: ' + e);
+}
+</script>
+)SWRESOURCE";
+
+enum class ResponseType { Synthetic, Fetched };
+enum class IsAppInitiated : bool { No, Yes };
+static void runTest(ResponseType responseType, IsAppInitiated isAppInitiated)
+{
+    static bool isDone = false;
+    [[WKWebsiteDataStore defaultDataStore] removeDataOfTypes:[WKWebsiteDataStore allWebsiteDataTypes] modifiedSince:[NSDate distantPast] completionHandler:^() {
+        isDone = true;
+    }];
+    TestWebKitAPI::Util::run(&isDone);
+
+    const char* js = nullptr;
+    const char* expectedAlert = nullptr;
+
+    switch (responseType) {
+    case ResponseType::Synthetic:
+        js = "self.addEventListener('fetch', (event) => { event.respondWith(new Response(new Blob(['<script>alert(\"synthetic response\")</script>'], {type: 'text/html'}))); })";
+        expectedAlert = "synthetic response";
+        break;
+    case ResponseType::Fetched:
+        js = "self.addEventListener('fetch', (event) => { event.respondWith(fetch('/fetched.html')) });";
+        expectedAlert = "fetched from server";
+        break;
+    }
+
+    TestWebKitAPI::HTTPServer server({
+        { "/", { mainSWBytes } },
+        { "/sw.js", { {{ "Content-Type", "application/javascript" }}, js } },
+        { "/fetched.html", { "<script>alert('fetched from server')</script>" } },
+    }, TestWebKitAPI::HTTPServer::Protocol::Https);
+
+    auto webView = adoptNS([WKWebView new]);
+
+    auto delegate = adoptNS([TestNavigationDelegate new]);
+    [delegate setDidReceiveAuthenticationChallenge:^(WKWebView *, NSURLAuthenticationChallenge *challenge, void (^callback)(NSURLSessionAuthChallengeDisposition, NSURLCredential *)) {
+        EXPECT_WK_STREQ(challenge.protectionSpace.authenticationMethod, NSURLAuthenticationMethodServerTrust);
+        callback(NSURLSessionAuthChallengeUseCredential, [NSURLCredential credentialForTrust:challenge.protectionSpace.serverTrust]);
+    }];
+    webView.get().navigationDelegate = delegate.get();
+
+    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"https://127.0.0.1:%d/", server.port()]]];
+    auto attributionValue = isAppInitiated == IsAppInitiated::Yes ? NSURLRequestAttributionDeveloper : NSURLRequestAttributionUser;
+    request.attribution = attributionValue;
+
+    [webView loadRequest:request];
+    EXPECT_WK_STREQ([webView _test_waitForAlert], "successfully registered");
+
+    if (responseType != ResponseType::Fetched)
+        server.cancel();
+
+    bool expectingAppInitiatedRequests = isAppInitiated == IsAppInitiated::Yes;
+    isDone = false;
+    [webView _appPrivacyReportTestingData: ^(struct WKAppPrivacyReportTestingData data) {
+        EXPECT_EQ(data.hasLoadedAppInitiatedRequestTesting, expectingAppInitiatedRequests);
+        EXPECT_EQ(data.hasLoadedNonAppInitiatedRequestTesting, !expectingAppInitiatedRequests);
+        isDone = true;
+    }];
+
+    isDone = false;
+    [webView _clearAppPrivacyReportTestingData:^{
+        isDone = true;
+    }];
+
+    TestWebKitAPI::Util::run(&isDone);
+
+    [webView reload];
+    EXPECT_WK_STREQ([webView _test_waitForAlert], expectedAlert);
+
+    isDone = false;
+    [webView _appPrivacyReportTestingData: ^(struct WKAppPrivacyReportTestingData data) {
+        if (responseType == ResponseType::Synthetic) {
+            EXPECT_FALSE(data.hasLoadedAppInitiatedRequestTesting);
+            EXPECT_FALSE(data.hasLoadedNonAppInitiatedRequestTesting);
+        } else {
+            EXPECT_EQ(data.hasLoadedAppInitiatedRequestTesting, expectingAppInitiatedRequests);
+            EXPECT_EQ(data.hasLoadedNonAppInitiatedRequestTesting, !expectingAppInitiatedRequests);
+        }
+        isDone = true;
+    }];
+
+    TestWebKitAPI::Util::run(&isDone);
+}
+
+TEST(AppPrivacyReport, NonAppInitiatedRequestWithServiceWorker)
+{
+    runTest(ResponseType::Synthetic, IsAppInitiated::No);
+    runTest(ResponseType::Fetched, IsAppInitiated::No);
+}
+
+TEST(AppPrivacyReport, AppInitiatedRequestWithServiceWorker)
+{
+    runTest(ResponseType::Synthetic, IsAppInitiated::Yes);
+    runTest(ResponseType::Fetched, IsAppInitiated::Yes);
+}
+
+TEST(AppPrivacyReport, MultipleWebViewsWithSharedServiceWorker)
+{
+    static bool isDone = false;
+
+    [[WKWebsiteDataStore defaultDataStore] removeDataOfTypes:[WKWebsiteDataStore allWebsiteDataTypes] modifiedSince:[NSDate distantPast] completionHandler:^() {
+        isDone = true;
+    }];
+    TestWebKitAPI::Util::run(&isDone);
+
+    const char* js = "self.addEventListener('fetch', (event) => { event.respondWith(fetch('/fetched.html')) })";
+    const char* expectedAlert = "fetched from server";
+
+    TestWebKitAPI::HTTPServer server({
+        { "/", { mainSWBytes } },
+        { "/sw.js", { {{ "Content-Type", "application/javascript" }}, js } },
+        { "/fetched.html", { "<script>alert('fetched from server')</script>" } },
+    }, TestWebKitAPI::HTTPServer::Protocol::Https);
+
+    auto webView1 = adoptNS([WKWebView new]);
+    auto webView2 = adoptNS([WKWebView new]);
+
+    auto delegate = adoptNS([TestNavigationDelegate new]);
+    [delegate setDidReceiveAuthenticationChallenge:^(WKWebView *, NSURLAuthenticationChallenge *challenge, void (^callback)(NSURLSessionAuthChallengeDisposition, NSURLCredential *)) {
+        EXPECT_WK_STREQ(challenge.protectionSpace.authenticationMethod, NSURLAuthenticationMethodServerTrust);
+        callback(NSURLSessionAuthChallengeUseCredential, [NSURLCredential credentialForTrust:challenge.protectionSpace.serverTrust]);
+    }];
+    webView1.get().navigationDelegate = delegate.get();
+    webView2.get().navigationDelegate = delegate.get();
+
+    NSMutableURLRequest *appInitiatedRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"https://127.0.0.1:%d/", server.port()]]];
+    appInitiatedRequest.attribution = NSURLRequestAttributionDeveloper;
+    [webView1 loadRequest:appInitiatedRequest];
+    EXPECT_WK_STREQ([webView1 _test_waitForAlert], "successfully registered");
+
+    [webView1 reload];
+    EXPECT_WK_STREQ([webView1 _test_waitForAlert], expectedAlert);
+
+    isDone = false;
+    [webView1 _appPrivacyReportTestingData: ^(struct WKAppPrivacyReportTestingData data) {
+        EXPECT_TRUE(data.hasLoadedAppInitiatedRequestTesting);
+        EXPECT_FALSE(data.hasLoadedNonAppInitiatedRequestTesting);
+        isDone = true;
+    }];
+
+    TestWebKitAPI::Util::run(&isDone);
+
+    isDone = false;
+    [webView1 _clearAppPrivacyReportTestingData:^{
+        isDone = true;
+    }];
+
+    TestWebKitAPI::Util::run(&isDone);
+
+    isDone = false;
+    NSMutableURLRequest *nonAppInitiatedRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"https://127.0.0.1:%d/", server.port()]]];
+    nonAppInitiatedRequest.attribution = NSURLRequestAttributionUser;
+    [webView2 loadRequest:nonAppInitiatedRequest];
+    EXPECT_WK_STREQ([webView2 _test_waitForAlert], "fetched from server");
+
+    [webView2 reload];
+    EXPECT_WK_STREQ([webView2 _test_waitForAlert], expectedAlert);
+
+    [webView2 _appPrivacyReportTestingData: ^(struct WKAppPrivacyReportTestingData data) {
+        EXPECT_FALSE(data.hasLoadedAppInitiatedRequestTesting);
+        EXPECT_TRUE(data.hasLoadedNonAppInitiatedRequestTesting);
+        isDone = true;
+    }];
+    TestWebKitAPI::Util::run(&isDone);
+}
+
+static void softUpdateTest(IsAppInitiated isAppInitiated)
+{
+    static bool isDone = false;
+    [[WKWebsiteDataStore defaultDataStore] removeDataOfTypes:[WKWebsiteDataStore allWebsiteDataTypes] modifiedSince:[NSDate distantPast] completionHandler:^() {
+        isDone = true;
+    }];
+    TestWebKitAPI::Util::run(&isDone);
+
+    auto delegate = adoptNS([TestNavigationDelegate new]);
+    [delegate setDidReceiveAuthenticationChallenge:^(WKWebView *, NSURLAuthenticationChallenge *challenge, void (^callback)(NSURLSessionAuthChallengeDisposition, NSURLCredential *)) {
+        EXPECT_WK_STREQ(challenge.protectionSpace.authenticationMethod, NSURLAuthenticationMethodServerTrust);
+        callback(NSURLSessionAuthChallengeUseCredential, [NSURLCredential credentialForTrust:challenge.protectionSpace.serverTrust]);
+    }];
+
+    auto configuration = adoptNS([[WKWebViewConfiguration alloc] init]);
+    auto webView1 = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:configuration.get()]);
+    auto webView2 = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:configuration.get()]);
+
+    webView1.get().navigationDelegate = delegate.get();
+    webView2.get().navigationDelegate = delegate.get();
+
+    uint16_t serverPort;
+    static const char* js = "self.addEventListener('fetch', (event) => { event.respondWith(new Response(new Blob(['<script>alert(\"synthetic response\")</script>'], {type: 'text/html'}))); })";
+
+    {
+        TestWebKitAPI::HTTPServer server1({
+            { "/", { mainSWBytes } },
+            { "/sw.js", { {{ "Content-Type", "application/javascript" }}, js } },
+        }, TestWebKitAPI::HTTPServer::Protocol::Https, nullptr, testIdentity());
+        serverPort = server1.port();
+
+        NSURLRequest *request = server1.request();
+        if (isAppInitiated == IsAppInitiated::No) {
+            NSMutableURLRequest *nonAppInitiatedRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"https://127.0.0.1:%d/", server1.port()]]];
+            nonAppInitiatedRequest.attribution = NSURLRequestAttributionDeveloper;
+            request = nonAppInitiatedRequest;
+        }
+
+        [webView1 loadRequest:request];
+        EXPECT_WK_STREQ([webView1 _test_waitForAlert], "successfully registered");
+
+        server1.cancel();
+    }
+
+    {
+        TestWebKitAPI::HTTPServer server2({
+            { "/", { mainSWBytes } },
+            { "/sw.js", { {{ "Content-Type", "application/javascript" }}, js } }
+        }, TestWebKitAPI::HTTPServer::Protocol::Https, nullptr, testIdentity2(), serverPort);
+
+        NSMutableURLRequest *request2 = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"https://127.0.0.1:%d/", server2.port()]]];
+        auto attributionValue = isAppInitiated == IsAppInitiated::Yes ? NSURLRequestAttributionDeveloper : NSURLRequestAttributionUser;
+        request2.attribution = attributionValue;
+
+        isDone = false;
+        [webView1 _clearAppPrivacyReportTestingData:^{
+            isDone = true;
+        }];
+
+        TestWebKitAPI::Util::run(&isDone);
+
+        [webView2 loadRequest:request2];
+        EXPECT_WK_STREQ([webView2 _test_waitForAlert], "synthetic response");
+    }
+
+    isDone = false;
+    bool expectingAppInitiatedRequests = isAppInitiated == IsAppInitiated::Yes ? true : false;
+    while (!isDone) {
+        [webView2 _appPrivacyReportTestingData: ^(struct WKAppPrivacyReportTestingData data) {
+            if (!data.didPerformSoftUpdate)
+                return;
+
+            EXPECT_EQ(data.hasLoadedAppInitiatedRequestTesting, expectingAppInitiatedRequests);
+            EXPECT_EQ(data.hasLoadedNonAppInitiatedRequestTesting, !expectingAppInitiatedRequests);
+            isDone = true;
+        }];
+        TestWebKitAPI::Util::spinRunLoop(1);
+    }
+}
+
+TEST(AppPrivacyReport, AppInitiatedRequestWithServiceWorkerSoftUpdate)
+{
+    softUpdateTest(IsAppInitiated::Yes);
+}
+
+TEST(AppPrivacyReport, NonAppInitiatedRequestWithServiceWorkerSoftUpdate)
+{
+    softUpdateTest(IsAppInitiated::No);
+}
+
+static void runWebProcessPlugInTest(IsAppInitiated isAppInitiated)
+{
+    WKWebViewConfiguration *configuration = [WKWebViewConfiguration _test_configurationWithTestPlugInClassName:@"AppPrivacyReportPlugIn"];
+    auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:CGRectMake(0, 0, 320, 500) configuration:configuration]);
+
+    NSString *url = @"https://webkit.org";
+
+    __block bool isDone = false;
+    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:url]];
+    auto attributionValue = isAppInitiated == IsAppInitiated::Yes ? NSURLRequestAttributionDeveloper : NSURLRequestAttributionUser;
+    request.attribution = attributionValue;
+
+    [webView loadRequest:request];
+    [webView _test_waitForDidFinishNavigation];
+
+    isDone = false;
+    bool expectingAppInitiatedRequests = isAppInitiated == IsAppInitiated::Yes ? true : false;
+    [webView _appPrivacyReportTestingData:^(struct WKAppPrivacyReportTestingData data) {
+        EXPECT_EQ(data.hasLoadedAppInitiatedRequestTesting, expectingAppInitiatedRequests);
+        EXPECT_EQ(data.hasLoadedNonAppInitiatedRequestTesting, !expectingAppInitiatedRequests);
+        isDone = true;
+    }];
+
+    TestWebKitAPI::Util::run(&isDone);
+}
+
+TEST(AppPrivacyReport, WebProcessPluginTestAppInitiated)
+{
+    runWebProcessPlugInTest(IsAppInitiated::Yes);
+}
+
+TEST(AppPrivacyReport, WebProcessPluginTestNonAppInitiated)
+{
+    runWebProcessPlugInTest(IsAppInitiated::No);
+}
+
+#if WK_HAVE_C_SPI
+
+static const char* mainSWBytesDefaultValue = R"SWRESOURCE(
+<script>
+
+function log(msg)
+{
+    window.webkit.messageHandlers.sw.postMessage(msg);
+}
+
+navigator.serviceWorker.addEventListener("message", function(event) {
+    log(event.data);
+});
+
+try {
+    navigator.serviceWorker.register('/sw.js').then(function(reg) {
+        if (reg.active) {
+            worker = reg.active;
+            worker.postMessage("SECOND");
+            return;
+        }
+        worker = reg.installing;
+        worker.addEventListener('statechange', function() {
+            if (worker.state == 'activated')
+                worker.postMessage("FIRST");
+        });
+    }).catch(function(error) {
+        log('Registration failed with: ' + error);
+    });
+} catch(e) {
+    log('Exception: ' + e);
+}
+</script>
+)SWRESOURCE";
+
+static const char* scriptBytesDefaultValue = R"SWRESOURCE(
+self.addEventListener('message', async (event) => {
+    if (!self.internals) {
+        event.source.postMessage('No internals');
+        return;
+    }
+
+    queryAppPrivacyReportValue(event, false);
+});
+
+async function queryAppPrivacyReportValue(event, haveSentInitialMessage)
+{
+    var result = await internals.lastNavigationWasAppPrivacyReport();
+    if (result) {
+        if (event.data == "FIRST") {
+            event.source.postMessage('app initiated');
+            return;
+        }
+
+        if (!haveSentInitialMessage)
+            event.source.postMessage('starts app initiated');
+
+        queryAppPrivacyReportValue(event, true);
+        return;
+    }
+
+    event.source.postMessage('non app initiated');
+}
+
+)SWRESOURCE";
+
+
+static String expectedMessage;
+static bool receivedMessage = false;
+
+@interface SWAppInitiatedRequestMessageHandler : NSObject <WKScriptMessageHandler>
+@end
+
+@implementation SWAppInitiatedRequestMessageHandler
+- (void)userContentController:(WKUserContentController *)userContentController didReceiveScriptMessage:(WKScriptMessage *)message
+{
+    EXPECT_WK_STREQ(message.body, expectedMessage);
+    receivedMessage = true;
+}
+@end
+
+TEST(AppPrivacyReport, RegisterServiceWorkerClientUpdatesAppInitiatedValue)
+{
+    static bool isDone = false;
+
+    [[WKWebsiteDataStore defaultDataStore] removeDataOfTypes:[WKWebsiteDataStore allWebsiteDataTypes] modifiedSince:[NSDate distantPast] completionHandler:^() {
+        isDone = true;
+    }];
+    TestWebKitAPI::Util::run(&isDone);
+
+    WKWebViewConfiguration *configuration = [WKWebViewConfiguration _test_configurationWithTestPlugInClassName:@"WebProcessPlugInWithInternals" configureJSCForTesting:YES];
+    WKRetainPtr<WKContextRef> context = adoptWK(TestWebKitAPI::Util::createContextForInjectedBundleTest("InternalsInjectedBundleTest"));
+    configuration.processPool = (WKProcessPool *)context.get();
+
+    RetainPtr<SWAppInitiatedRequestMessageHandler> messageHandler = adoptNS([[SWAppInitiatedRequestMessageHandler alloc] init]);
+    [[configuration userContentController] addScriptMessageHandler:messageHandler.get() name:@"sw"];
+
+    auto webView1 = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:configuration]);
+    auto webView2 = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:configuration]);
+
+    auto delegate = adoptNS([TestNavigationDelegate new]);
+    [delegate setDidReceiveAuthenticationChallenge:^(WKWebView *, NSURLAuthenticationChallenge *challenge, void (^callback)(NSURLSessionAuthChallengeDisposition, NSURLCredential *)) {
+        EXPECT_WK_STREQ(challenge.protectionSpace.authenticationMethod, NSURLAuthenticationMethodServerTrust);
+        callback(NSURLSessionAuthChallengeUseCredential, [NSURLCredential credentialForTrust:challenge.protectionSpace.serverTrust]);
+    }];
+
+    webView1.get().navigationDelegate = delegate.get();
+    webView2.get().navigationDelegate = delegate.get();
+
+    ServiceWorkerTCPServer server({
+        { "text/html", mainSWBytesDefaultValue },
+        { "application/javascript", scriptBytesDefaultValue },
+    }, {
+        { "text/html", mainSWBytesDefaultValue },
+        { "application/javascript", scriptBytesDefaultValue },
+    });
+
+    // Load WebView with an app initiated request. We expect the ServiceWorkerThreadProxy to be app initiated.
+    expectedMessage = "app initiated";
+    [webView1 loadRequest:server.request()];
+    TestWebKitAPI::Util::run(&receivedMessage);
+
+    // Load WebView with a non app initiated request. We expect the ServiceWorkerThreadProxy to be app initiated
+    // at first, but then become non app initiated once the second webView is closed and its client is unregistered.
+    expectedMessage = "starts app initiated";
+    receivedMessage = false;
+    NSMutableURLRequest *nonAppInitiatedRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://127.0.0.1:%d/main.html", server.port()]]];
+    nonAppInitiatedRequest.attribution = NSURLRequestAttributionUser;
+
+    [webView2 loadRequest:nonAppInitiatedRequest];
+    TestWebKitAPI::Util::run(&receivedMessage);
+
+    // Close the app initiated view. We expect that the existing worker will become non app initiated
+    // now that all app initiated clients have been removed.
+    expectedMessage = "non app initiated";
+    receivedMessage = false;
+    [webView1 _close];
+    webView1 = nullptr;
+
+    TestWebKitAPI::Util::run(&receivedMessage);
+}
+
+#endif // WK_HAVE_C_SPI
+
+static void loadSimulatedRequestTest(IsAppInitiated isAppInitiated)
+{
+    auto webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600)]);
+
+    auto delegate = adoptNS([[TestNavigationDelegate alloc] init]);
+    [webView setNavigationDelegate:delegate.get()];
+
+    NSMutableURLRequest *loadRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://webkit.org"]];
+    loadRequest.attribution = isAppInitiated == IsAppInitiated::Yes ? NSURLRequestAttributionDeveloper : NSURLRequestAttributionUser;
+
+    NSString *HTML = @"<html><head></head><body><img src='https://apple.com/'></img></body></html>";
+    [webView loadSimulatedRequest:loadRequest responseHTMLString:HTML];
+    [delegate waitForDidFinishNavigation];
+
+    static bool isDone = false;
+    bool expectingAppInitiatedRequests = isAppInitiated == IsAppInitiated::Yes ? true : false;
+    [webView _appPrivacyReportTestingData:^(struct WKAppPrivacyReportTestingData data) {
+        EXPECT_EQ(data.hasLoadedAppInitiatedRequestTesting, expectingAppInitiatedRequests);
+        EXPECT_EQ(data.hasLoadedNonAppInitiatedRequestTesting, !expectingAppInitiatedRequests);
+        isDone = true;
+    }];
+    TestWebKitAPI::Util::run(&isDone);
+}
+
+TEST(AppPrivacyReport, LoadSimulatedRequestIsAppInitiated)
+{
+    loadSimulatedRequestTest(IsAppInitiated::Yes);
+}
+
+TEST(AppPrivacyReport, LoadSimulatedRequestIsNonAppInitiated)
+{
+    loadSimulatedRequestTest(IsAppInitiated::No);
+}
+
+#endif // APP_PRIVACY_REPORT
</ins></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsWebKitCocoaAppPrivacyReportPlugInmmfromrev279749trunkToolsTestWebKitAPITestsWebKitCocoaInAppBrowserPrivacyPlugInmm"></a>
<div class="copfile"><h4>Copied: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/AppPrivacyReportPlugIn.mm (from rev 279749, trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacyPlugIn.mm) (0 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/AppPrivacyReportPlugIn.mm                            (rev 0)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/AppPrivacyReportPlugIn.mm       2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -0,0 +1,43 @@
</span><ins>+/*
+ * Copyright (C) 2021 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "config.h"
+
+#import "PlatformUtilities.h"
+#import <WebKit/WKWebProcessPlugIn.h>
+#import <WebKit/WKWebProcessPlugInLoadDelegate.h>
+#import <wtf/RetainPtr.h>
+
+@interface AppPrivacyReportPlugIn : NSObject <WKWebProcessPlugIn, WKWebProcessPlugInLoadDelegate>
+@end
+
+@implementation AppPrivacyReportPlugIn { }
+
+- (NSURLRequest *)webProcessPlugInBrowserContextController:(WKWebProcessPlugInBrowserContextController *)controller frame:(WKWebProcessPlugInFrame *)frame willSendRequestForResource:(uint64_t)resource request:(NSURLRequest *)request redirectResponse:(NSURLResponse *)redirectResponse
+{
+    return adoptNS([[NSURLRequest alloc] initWithURL:request.URL]).autorelease();
+}
+
+@end
</ins></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsWebKitCocoaInAppBrowserPrivacymm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm       2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm  2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -25,11 +25,9 @@
</span><span class="cx"> 
</span><span class="cx"> #import "config.h"
</span><span class="cx"> 
</span><del>-#import "HTTPServer.h"
</del><span class="cx"> #import "PlatformUtilities.h"
</span><span class="cx"> #import "ServiceWorkerTCPServer.h"
</span><span class="cx"> #import "TestNavigationDelegate.h"
</span><del>-#import "TestUIDelegate.h"
</del><span class="cx"> #import "TestURLSchemeHandler.h"
</span><span class="cx"> #import "TestWKWebView.h"
</span><span class="cx"> #import "WKWebViewConfigurationExtras.h"
</span><span class="lines">@@ -44,7 +42,6 @@
</span><span class="cx"> #import <WebKit/WKWebsiteDataStorePrivate.h>
</span><span class="cx"> #import <WebKit/_WKUserContentWorld.h>
</span><span class="cx"> #import <WebKit/_WKUserStyleSheet.h>
</span><del>-#import <pal/spi/cf/CFNetworkSPI.h>
</del><span class="cx"> #import <wtf/RunLoop.h>
</span><span class="cx"> #import <wtf/text/WTFString.h>
</span><span class="cx"> 
</span><span class="lines">@@ -1417,659 +1414,3 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(APP_BOUND_DOMAINS)
</span><del>-
-#if ENABLE(APP_PRIVACY_REPORT)
-TEST(InAppBrowserPrivacy, AppBoundRequest)
-{
-    auto configuration = adoptNS([[WKWebViewConfiguration alloc] init]);
-
-    auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:CGRectZero configuration:configuration.get()]);
-    NSString *url = @"https://webkit.org";
-
-    __block bool isDone = false;
-    NSMutableURLRequest *nonAppBoundRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:url]];
-
-    ALLOW_DEPRECATED_DECLARATIONS_BEGIN
-    nonAppBoundRequest._isNonAppInitiated = YES;
-    ALLOW_DEPRECATED_DECLARATIONS_END
-
-    [webView loadRequest:nonAppBoundRequest];
-    [webView _test_waitForDidFinishNavigation];
-
-    [webView _lastNavigationWasAppBound:^(BOOL isAppBound) {
-        EXPECT_FALSE(isAppBound);
-        isDone = true;
-    }];
-
-    TestWebKitAPI::Util::run(&isDone);
-    
-    isDone = false;
-    [webView _appBoundNavigationData:^(struct WKAppBoundNavigationTestingData data) {
-        EXPECT_FALSE(data.hasLoadedAppBoundRequestTesting);
-        EXPECT_TRUE(data.hasLoadedNonAppBoundRequestTesting);
-        isDone = true;
-    }];
-
-    TestWebKitAPI::Util::run(&isDone);
-}
-
-TEST(InAppBrowserPrivacy, AppBoundRequestWithNavigation)
-{
-    auto configuration = adoptNS([[WKWebViewConfiguration alloc] init]);
-
-    auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:CGRectZero configuration:configuration.get()]);
-    NSString *startingURL = @"https://www.webkit.org";
-    NSString *nonAppBoundURL = @"https://www.apple.com";
-
-    NSMutableURLRequest *startingRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:startingURL]];
-
-    [webView loadRequest:startingRequest];
-    [webView _test_waitForDidFinishNavigation];
-
-    __block bool isDone = false;
-    [webView _lastNavigationWasAppBound:^(BOOL isAppBound) {
-        EXPECT_TRUE(isAppBound);
-        isDone = true;
-    }];
-
-    TestWebKitAPI::Util::run(&isDone);
-    
-    isDone = false;
-    [webView _appBoundNavigationData:^(struct WKAppBoundNavigationTestingData data) {
-        EXPECT_TRUE(data.hasLoadedAppBoundRequestTesting);
-        EXPECT_FALSE(data.hasLoadedNonAppBoundRequestTesting);
-        isDone = true;
-    }];
-
-    TestWebKitAPI::Util::run(&isDone);
-    
-    isDone = false;
-    NSMutableURLRequest *nonAppBoundRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:nonAppBoundURL]];
-    ALLOW_DEPRECATED_DECLARATIONS_BEGIN
-    nonAppBoundRequest._isNonAppInitiated = YES;
-    ALLOW_DEPRECATED_DECLARATIONS_END
-    
-    isDone = false;
-    [webView _clearAppBoundNavigationData:^{
-        isDone = true;
-    }];
-
-    TestWebKitAPI::Util::run(&isDone);
-
-    [webView loadRequest:nonAppBoundRequest];
-    [webView _test_waitForDidFinishNavigation];
-
-    [webView _lastNavigationWasAppBound:^(BOOL isAppBound) {
-        EXPECT_FALSE(isAppBound);
-        isDone = true;
-    }];
-
-    TestWebKitAPI::Util::run(&isDone);
-    
-    isDone = false;
-    [webView _appBoundNavigationData:^(struct WKAppBoundNavigationTestingData data) {
-        EXPECT_FALSE(data.hasLoadedAppBoundRequestTesting);
-        EXPECT_TRUE(data.hasLoadedNonAppBoundRequestTesting);
-        isDone = true;
-    }];
-
-    TestWebKitAPI::Util::run(&isDone);
-}
-
-TEST(InAppBrowserPrivacy, AppBoundRequestWithSubFrame)
-{
-    auto configuration = adoptNS([[WKWebViewConfiguration alloc] init]);
-    [configuration _setOverrideContentSecurityPolicy:@"script-src 'nonce-b'"];
-
-    auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:configuration.get()]);
-    [webView loadTestPageNamed:@"page-with-csp"];
-
-    [webView waitForMessage:@"MainFrame: B"];
-    [webView waitForMessage:@"Subframe: B"];
-
-    __block bool isDone = false;
-    [webView _appBoundNavigationData:^(struct WKAppBoundNavigationTestingData data) {
-        EXPECT_TRUE(data.hasLoadedAppBoundRequestTesting);
-        EXPECT_FALSE(data.hasLoadedNonAppBoundRequestTesting);
-        isDone = true;
-    }];
-
-    TestWebKitAPI::Util::run(&isDone);
-};
-
-TEST(InAppBrowserPrivacy, NonAppBoundRequestWithSubFrame)
-{
-    auto configuration = adoptNS([[WKWebViewConfiguration alloc] init]);
-    [configuration _setOverrideContentSecurityPolicy:@"script-src 'nonce-b'"];
-
-    __block bool isDone = false;
-    auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:configuration.get()]);
-    NSMutableURLRequest *nonAppBoundRequest = [NSMutableURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"page-with-csp" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]];
-    ALLOW_DEPRECATED_DECLARATIONS_BEGIN
-    nonAppBoundRequest._isNonAppInitiated = YES;
-    ALLOW_DEPRECATED_DECLARATIONS_END
-
-    [webView loadRequest:nonAppBoundRequest];
-
-    [webView waitForMessage:@"MainFrame: B"];
-    [webView waitForMessage:@"Subframe: B"];
-
-    [webView _appBoundNavigationData: ^(struct WKAppBoundNavigationTestingData data) {
-        EXPECT_FALSE(data.hasLoadedAppBoundRequestTesting);
-        EXPECT_TRUE(data.hasLoadedNonAppBoundRequestTesting);
-        isDone = true;
-    }];
-
-    TestWebKitAPI::Util::run(&isDone);
-};
-
-static const char* mainSWBytes = R"SWRESOURCE(
-<script>
-try {
-    navigator.serviceWorker.register('/sw.js').then(function(reg) {
-        if (reg.active) {
-            alert('worker already active');
-            return;
-        }
-        worker = reg.installing;
-        worker.addEventListener('statechange', function() {
-            if (worker.state == 'activated')
-                alert('successfully registered');
-        });
-    }).catch(function(error) {
-        alert('Registration failed with: ' + error);
-    });
-} catch(e) {
-    alert('Exception: ' + e);
-}
-</script>
-)SWRESOURCE";
-
-enum class ResponseType { Synthetic, Fetched };
-enum class IsAppBound : bool { No, Yes };
-static void runTest(ResponseType responseType, IsAppBound appBound)
-{
-    static bool isDone = false;
-    [[WKWebsiteDataStore defaultDataStore] removeDataOfTypes:[WKWebsiteDataStore allWebsiteDataTypes] modifiedSince:[NSDate distantPast] completionHandler:^() {
-        isDone = true;
-    }];
-    TestWebKitAPI::Util::run(&isDone);
-
-    const char* js = nullptr;
-    const char* expectedAlert = nullptr;
-
-    switch (responseType) {
-    case ResponseType::Synthetic:
-        js = "self.addEventListener('fetch', (event) => { event.respondWith(new Response(new Blob(['<script>alert(\"synthetic response\")</script>'], {type: 'text/html'}))); })";
-        expectedAlert = "synthetic response";
-        break;
-    case ResponseType::Fetched:
-        js = "self.addEventListener('fetch', (event) => { event.respondWith(fetch('/fetched.html')) });";
-        expectedAlert = "fetched from server";
-        break;
-    }
-
-    TestWebKitAPI::HTTPServer server({
-        { "/", { mainSWBytes } },
-        { "/sw.js", { {{ "Content-Type", "application/javascript" }}, js } },
-        { "/fetched.html", { "<script>alert('fetched from server')</script>" } },
-    }, TestWebKitAPI::HTTPServer::Protocol::Https);
-
-    auto webView = adoptNS([WKWebView new]);
-
-    auto delegate = adoptNS([TestNavigationDelegate new]);
-    [delegate setDidReceiveAuthenticationChallenge:^(WKWebView *, NSURLAuthenticationChallenge *challenge, void (^callback)(NSURLSessionAuthChallengeDisposition, NSURLCredential *)) {
-        EXPECT_WK_STREQ(challenge.protectionSpace.authenticationMethod, NSURLAuthenticationMethodServerTrust);
-        callback(NSURLSessionAuthChallengeUseCredential, [NSURLCredential credentialForTrust:challenge.protectionSpace.serverTrust]);
-    }];
-    webView.get().navigationDelegate = delegate.get();
-
-    NSURLRequest *request = server.request();
-    if (appBound == IsAppBound::No) {
-        NSMutableURLRequest *nonAppBoundRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"https://127.0.0.1:%d/", server.port()]]];
-        ALLOW_DEPRECATED_DECLARATIONS_BEGIN
-        nonAppBoundRequest._isNonAppInitiated = YES;
-        ALLOW_DEPRECATED_DECLARATIONS_END
-        request = nonAppBoundRequest;
-    }
-
-    [webView loadRequest:request];
-    EXPECT_WK_STREQ([webView _test_waitForAlert], "successfully registered");
-
-    if (responseType != ResponseType::Fetched)
-        server.cancel();
-
-    bool expectingAppBoundRequests = appBound == IsAppBound::Yes;
-    isDone = false;
-    [webView _appBoundNavigationData: ^(struct WKAppBoundNavigationTestingData data) {
-        EXPECT_EQ(data.hasLoadedAppBoundRequestTesting, expectingAppBoundRequests);
-        EXPECT_EQ(data.hasLoadedNonAppBoundRequestTesting, !expectingAppBoundRequests);
-        isDone = true;
-    }];
-
-    isDone = false;
-    [webView _clearAppBoundNavigationData:^{
-        isDone = true;
-    }];
-
-    TestWebKitAPI::Util::run(&isDone);
-
-    [webView reload];
-    EXPECT_WK_STREQ([webView _test_waitForAlert], expectedAlert);
-
-    isDone = false;
-    [webView _appBoundNavigationData: ^(struct WKAppBoundNavigationTestingData data) {
-        if (responseType == ResponseType::Synthetic) {
-            EXPECT_FALSE(data.hasLoadedAppBoundRequestTesting);
-            EXPECT_FALSE(data.hasLoadedNonAppBoundRequestTesting);
-        } else {
-            EXPECT_EQ(data.hasLoadedAppBoundRequestTesting, expectingAppBoundRequests);
-            EXPECT_EQ(data.hasLoadedNonAppBoundRequestTesting, !expectingAppBoundRequests);
-        }
-        isDone = true;
-    }];
-
-    TestWebKitAPI::Util::run(&isDone);
-}
-
-TEST(InAppBrowserPrivacy, NonAppBoundRequestWithServiceWorker)
-{
-    runTest(ResponseType::Synthetic, IsAppBound::No);
-    runTest(ResponseType::Fetched, IsAppBound::No);
-}
-
-TEST(InAppBrowserPrivacy, AppBoundRequestWithServiceWorker)
-{
-    runTest(ResponseType::Synthetic, IsAppBound::Yes);
-    runTest(ResponseType::Fetched, IsAppBound::Yes);
-}
-
-TEST(InAppBrowserPrivacy, MultipleWebViewsWithSharedServiceWorker)
-{
-    static bool isDone = false;
-
-    [[WKWebsiteDataStore defaultDataStore] removeDataOfTypes:[WKWebsiteDataStore allWebsiteDataTypes] modifiedSince:[NSDate distantPast] completionHandler:^() {
-        isDone = true;
-    }];
-    TestWebKitAPI::Util::run(&isDone);
-
-    const char* js = "self.addEventListener('fetch', (event) => { event.respondWith(fetch('/fetched.html')) })";
-    const char* expectedAlert = "fetched from server";
-
-    TestWebKitAPI::HTTPServer server({
-        { "/", { mainSWBytes } },
-        { "/sw.js", { {{ "Content-Type", "application/javascript" }}, js } },
-        { "/fetched.html", { "<script>alert('fetched from server')</script>" } },
-    }, TestWebKitAPI::HTTPServer::Protocol::Https);
-
-    auto webView1 = adoptNS([WKWebView new]);
-    auto webView2 = adoptNS([WKWebView new]);
-
-    auto delegate = adoptNS([TestNavigationDelegate new]);
-    [delegate setDidReceiveAuthenticationChallenge:^(WKWebView *, NSURLAuthenticationChallenge *challenge, void (^callback)(NSURLSessionAuthChallengeDisposition, NSURLCredential *)) {
-        EXPECT_WK_STREQ(challenge.protectionSpace.authenticationMethod, NSURLAuthenticationMethodServerTrust);
-        callback(NSURLSessionAuthChallengeUseCredential, [NSURLCredential credentialForTrust:challenge.protectionSpace.serverTrust]);
-    }];
-    webView1.get().navigationDelegate = delegate.get();
-    webView2.get().navigationDelegate = delegate.get();
-
-    [webView1 loadRequest:server.request()];
-    EXPECT_WK_STREQ([webView1 _test_waitForAlert], "successfully registered");
-
-    [webView1 reload];
-    EXPECT_WK_STREQ([webView1 _test_waitForAlert], expectedAlert);
-
-    isDone = false;
-    [webView1 _appBoundNavigationData: ^(struct WKAppBoundNavigationTestingData data) {
-        EXPECT_TRUE(data.hasLoadedAppBoundRequestTesting);
-        EXPECT_FALSE(data.hasLoadedNonAppBoundRequestTesting);
-        isDone = true;
-    }];
-
-    TestWebKitAPI::Util::run(&isDone);
-
-    isDone = false;
-    [webView1 _clearAppBoundNavigationData:^{
-        isDone = true;
-    }];
-
-    TestWebKitAPI::Util::run(&isDone);
-
-    isDone = false;
-    NSMutableURLRequest *nonAppBoundRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"https://127.0.0.1:%d/main.html", server.port()]]];
-    ALLOW_DEPRECATED_DECLARATIONS_BEGIN
-    nonAppBoundRequest._isNonAppInitiated = YES;
-    ALLOW_DEPRECATED_DECLARATIONS_END
-    [webView2 loadRequest:nonAppBoundRequest];
-    EXPECT_WK_STREQ([webView2 _test_waitForAlert], "fetched from server");
-
-    [webView2 reload];
-    EXPECT_WK_STREQ([webView2 _test_waitForAlert], expectedAlert);
-
-    [webView2 _appBoundNavigationData: ^(struct WKAppBoundNavigationTestingData data) {
-        EXPECT_FALSE(data.hasLoadedAppBoundRequestTesting);
-        EXPECT_TRUE(data.hasLoadedNonAppBoundRequestTesting);
-        isDone = true;
-    }];
-    TestWebKitAPI::Util::run(&isDone);
-    isDone = false;
-}
-
-static void softUpdateTest(IsAppBound isAppBound)
-{
-    __block bool isDone = false;
-    [[WKWebsiteDataStore defaultDataStore] removeDataOfTypes:[WKWebsiteDataStore allWebsiteDataTypes] modifiedSince:[NSDate distantPast] completionHandler:^() {
-        isDone = true;
-    }];
-    TestWebKitAPI::Util::run(&isDone);
-
-    auto delegate = adoptNS([TestNavigationDelegate new]);
-    [delegate setDidReceiveAuthenticationChallenge:^(WKWebView *, NSURLAuthenticationChallenge *challenge, void (^callback)(NSURLSessionAuthChallengeDisposition, NSURLCredential *)) {
-        EXPECT_WK_STREQ(challenge.protectionSpace.authenticationMethod, NSURLAuthenticationMethodServerTrust);
-        callback(NSURLSessionAuthChallengeUseCredential, [NSURLCredential credentialForTrust:challenge.protectionSpace.serverTrust]);
-    }];
-
-    auto configuration = adoptNS([[WKWebViewConfiguration alloc] init]);
-    auto webView1 = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:configuration.get()]);
-    auto webView2 = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:configuration.get()]);
-
-    webView1.get().navigationDelegate = delegate.get();
-    webView2.get().navigationDelegate = delegate.get();
-
-    uint16_t serverPort;
-    static const char* js = "self.addEventListener('fetch', (event) => { event.respondWith(new Response(new Blob(['<script>alert(\"synthetic response\")</script>'], {type: 'text/html'}))); })";
-
-    {
-        TestWebKitAPI::HTTPServer server1({
-            { "/", { mainSWBytes } },
-            { "/sw.js", { {{ "Content-Type", "application/javascript" }}, js } },
-        }, TestWebKitAPI::HTTPServer::Protocol::Https, nullptr, testIdentity());
-        serverPort = server1.port();
-
-        NSURLRequest *request = server1.request();
-        if (isAppBound == IsAppBound::No) {
-            NSMutableURLRequest *nonAppBoundRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"https://127.0.0.1:%d/", server1.port()]]];
-            ALLOW_DEPRECATED_DECLARATIONS_BEGIN
-            nonAppBoundRequest._isNonAppInitiated = YES;
-            ALLOW_DEPRECATED_DECLARATIONS_END
-            request = nonAppBoundRequest;
-        }
-
-        [webView1 loadRequest:request];
-        EXPECT_WK_STREQ([webView1 _test_waitForAlert], "successfully registered");
-
-        server1.cancel();
-    }
-
-    {
-        TestWebKitAPI::HTTPServer server2({
-            { "/", { mainSWBytes } },
-            { "/sw.js", { {{ "Content-Type", "application/javascript" }}, js } }
-        }, TestWebKitAPI::HTTPServer::Protocol::Https, nullptr, testIdentity2(), serverPort);
-
-        NSURLRequest *request2 = server2.request();
-        if (isAppBound == IsAppBound::No) {
-            NSMutableURLRequest *nonAppBoundRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"https://127.0.0.1:%d/", server2.port()]]];
-            ALLOW_DEPRECATED_DECLARATIONS_BEGIN
-            nonAppBoundRequest._isNonAppInitiated = YES;
-            ALLOW_DEPRECATED_DECLARATIONS_END
-            request2 = nonAppBoundRequest;
-        }
-
-        isDone = false;
-        [webView1 _clearAppBoundNavigationData:^{
-            isDone = true;
-        }];
-
-        TestWebKitAPI::Util::run(&isDone);
-
-        [webView2 loadRequest:request2];
-        EXPECT_WK_STREQ([webView2 _test_waitForAlert], "synthetic response");
-    }
-
-    isDone = false;
-    bool expectingAppBoundRequests = isAppBound == IsAppBound::Yes ? true : false;
-    while (!isDone) {
-        [webView2 _appBoundNavigationData: ^(struct WKAppBoundNavigationTestingData data) {
-            if (!data.didPerformSoftUpdate)
-                return;
-
-            EXPECT_EQ(data.hasLoadedAppBoundRequestTesting, expectingAppBoundRequests);
-            EXPECT_EQ(data.hasLoadedNonAppBoundRequestTesting, !expectingAppBoundRequests);
-            isDone = true;
-        }];
-        TestWebKitAPI::Util::spinRunLoop(1);
-    }
-}
-
-TEST(InAppBrowserPrivacy, AppBoundRequestWithServiceWorkerSoftUpdate)
-{
-    softUpdateTest(IsAppBound::Yes);
-}
-
-TEST(InAppBrowserPrivacy, NonAppBoundRequestWithServiceWorkerSoftUpdate)
-{
-    softUpdateTest(IsAppBound::No);
-}
-
-static void runWebProcessPlugInTest(IsAppBound isAppBound)
-{
-    WKWebViewConfiguration *configuration = [WKWebViewConfiguration _test_configurationWithTestPlugInClassName:@"InAppBrowserPrivacyPlugIn"];
-    auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:CGRectMake(0, 0, 320, 500) configuration:configuration]);
-
-    NSString *url = @"https://webkit.org";
-
-    __block bool isDone = false;
-    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:url]];
-    if (isAppBound == IsAppBound::No) {
-        NSMutableURLRequest *nonAppBoundRequest = request;
-        ALLOW_DEPRECATED_DECLARATIONS_BEGIN
-        nonAppBoundRequest._isNonAppInitiated = YES;
-        ALLOW_DEPRECATED_DECLARATIONS_END
-        request = nonAppBoundRequest;
-    }
-
-    [webView loadRequest:request];
-    [webView _test_waitForDidFinishNavigation];
-
-    isDone = false;
-    bool expectingAppBoundRequests = isAppBound == IsAppBound::Yes ? true : false;
-    [webView _appBoundNavigationData:^(struct WKAppBoundNavigationTestingData data) {
-        EXPECT_EQ(data.hasLoadedAppBoundRequestTesting, expectingAppBoundRequests);
-        EXPECT_EQ(data.hasLoadedNonAppBoundRequestTesting, !expectingAppBoundRequests);
-        isDone = true;
-    }];
-
-    TestWebKitAPI::Util::run(&isDone);
-}
-
-TEST(InAppBrowserPrivacy, WebProcessPluginTestAppBound)
-{
-    runWebProcessPlugInTest(IsAppBound::Yes);
-}
-
-TEST(InAppBrowserPrivacy, WebProcessPluginTestNonAppBound)
-{
-    runWebProcessPlugInTest(IsAppBound::No);
-}
-
-#if WK_HAVE_C_SPI
-
-static const char* mainSWBytesDefaultValue = R"SWRESOURCE(
-<script>
-
-function log(msg)
-{
-    window.webkit.messageHandlers.sw.postMessage(msg);
-}
-
-navigator.serviceWorker.addEventListener("message", function(event) {
-    log(event.data);
-});
-
-try {
-    navigator.serviceWorker.register('/sw.js').then(function(reg) {
-        if (reg.active) {
-            worker = reg.active;
-            worker.postMessage("SECOND");
-            return;
-        }
-        worker = reg.installing;
-        worker.addEventListener('statechange', function() {
-            if (worker.state == 'activated')
-                worker.postMessage("FIRST");
-        });
-    }).catch(function(error) {
-        log('Registration failed with: ' + error);
-    });
-} catch(e) {
-    log('Exception: ' + e);
-}
-</script>
-)SWRESOURCE";
-
-static const char* scriptBytesDefaultValue = R"SWRESOURCE(
-self.addEventListener('message', async (event) => {
-    if (!self.internals) {
-        event.source.postMessage('No internals');
-        return;
-    }
-
-    queryAppBoundValue(event, false);
-});
-
-async function queryAppBoundValue(event, haveSentInitialMessage)
-{
-    var result = await internals.lastNavigationWasAppBound();
-    if (result) {
-        if (event.data == "FIRST") {
-            event.source.postMessage('app-bound');
-            return;
-        }
-
-        if (!haveSentInitialMessage)
-            event.source.postMessage('starts app-bound');
-
-        queryAppBoundValue(event, true);
-        return;
-    }
-
-    event.source.postMessage('non app-bound');
-}
-
-)SWRESOURCE";
-
-
-static String expectedMessage;
-static bool receivedMessage = false;
-
-@interface SWAppBoundRequestMessageHandler : NSObject <WKScriptMessageHandler>
-@end
-
-@implementation SWAppBoundRequestMessageHandler
-- (void)userContentController:(WKUserContentController *)userContentController didReceiveScriptMessage:(WKScriptMessage *)message
-{
-    EXPECT_WK_STREQ(message.body, expectedMessage);
-    receivedMessage = true;
-}
-@end
-
-TEST(InAppBrowserPrivacy, RegisterServiceWorkerClientUpdatesAppBoundValue)
-{
-    static bool isDone = false;
-
-    [[WKWebsiteDataStore defaultDataStore] removeDataOfTypes:[WKWebsiteDataStore allWebsiteDataTypes] modifiedSince:[NSDate distantPast] completionHandler:^() {
-        isDone = true;
-    }];
-    TestWebKitAPI::Util::run(&isDone);
-
-    WKWebViewConfiguration *configuration = [WKWebViewConfiguration _test_configurationWithTestPlugInClassName:@"WebProcessPlugInWithInternals" configureJSCForTesting:YES];
-    WKRetainPtr<WKContextRef> context = adoptWK(TestWebKitAPI::Util::createContextForInjectedBundleTest("InternalsInjectedBundleTest"));
-    configuration.processPool = (WKProcessPool *)context.get();
-
-    RetainPtr<SWAppBoundRequestMessageHandler> messageHandler = adoptNS([[SWAppBoundRequestMessageHandler alloc] init]);
-    [[configuration userContentController] addScriptMessageHandler:messageHandler.get() name:@"sw"];
-
-    auto webView1 = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:configuration]);
-    auto webView2 = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:configuration]);
-
-    auto delegate = adoptNS([TestNavigationDelegate new]);
-    [delegate setDidReceiveAuthenticationChallenge:^(WKWebView *, NSURLAuthenticationChallenge *challenge, void (^callback)(NSURLSessionAuthChallengeDisposition, NSURLCredential *)) {
-        EXPECT_WK_STREQ(challenge.protectionSpace.authenticationMethod, NSURLAuthenticationMethodServerTrust);
-        callback(NSURLSessionAuthChallengeUseCredential, [NSURLCredential credentialForTrust:challenge.protectionSpace.serverTrust]);
-    }];
-
-    webView1.get().navigationDelegate = delegate.get();
-    webView2.get().navigationDelegate = delegate.get();
-
-    ServiceWorkerTCPServer server({
-        { "text/html", mainSWBytesDefaultValue },
-        { "application/javascript", scriptBytesDefaultValue },
-    }, {
-        { "text/html", mainSWBytesDefaultValue },
-        { "application/javascript", scriptBytesDefaultValue },
-    });
-
-    // Load WebView with an app-bound request. We expect the ServiceWorkerThreadProxy to be app-bound.
-    expectedMessage = "app-bound";
-    [webView1 loadRequest:server.request()];
-    TestWebKitAPI::Util::run(&receivedMessage);
-
-    // Load WebView with a non app-bound request. We expect the ServiceWorkerThreadProxy to be app-bound
-    // at first, but then become non app-bound once the second webView is closed and its client is unregistered.
-    expectedMessage = "starts app-bound";
-    receivedMessage = false;
-    NSMutableURLRequest *nonAppBoundRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://127.0.0.1:%d/main.html", server.port()]]];
-    ALLOW_DEPRECATED_DECLARATIONS_BEGIN
-    nonAppBoundRequest._isNonAppInitiated = YES;
-    ALLOW_DEPRECATED_DECLARATIONS_END
-
-    [webView2 loadRequest:nonAppBoundRequest];
-    TestWebKitAPI::Util::run(&receivedMessage);
-
-    // Close the app-bound view. We expect that the existing worker will become non app-bound
-    // now that all app-bound clients have been removed.
-    expectedMessage = "non app-bound";
-    receivedMessage = false;
-    [webView1 _close];
-    webView1 = nullptr;
-
-    TestWebKitAPI::Util::run(&receivedMessage);
-}
-
-#endif
-
-static void loadSimulatedRequestTest(bool isAppInitiated)
-{
-    auto webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600)]);
-
-    auto delegate = adoptNS([[TestNavigationDelegate alloc] init]);
-    [webView setNavigationDelegate:delegate.get()];
-
-    NSMutableURLRequest *loadRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://webkit.org"]];
-    loadRequest.attribution = isAppInitiated ? NSURLRequestAttributionDeveloper : NSURLRequestAttributionUser;
-
-    NSString *HTML = @"<html><head></head><body><img src='https://apple.com/'></img></body></html>";
-    [webView loadSimulatedRequest:loadRequest responseHTMLString:HTML];
-    [delegate waitForDidFinishNavigation];
-
-    static bool isDone = false;
-    [webView _appBoundNavigationData:^(struct WKAppBoundNavigationTestingData data) {
-        EXPECT_EQ(data.hasLoadedAppBoundRequestTesting, isAppInitiated);
-        EXPECT_EQ(data.hasLoadedNonAppBoundRequestTesting, !isAppInitiated);
-        isDone = true;
-    }];
-    TestWebKitAPI::Util::run(&isDone);
-}
-
-TEST(InAppBrowserPrivacy, LoadSimulatedRequestIsAppInitiated)
-{
-    loadSimulatedRequestTest(true);
-}
-
-TEST(InAppBrowserPrivacy, LoadSimulatedRequestIsNonAppInitiated)
-{
-    loadSimulatedRequestTest(false);
-}
-
-#endif
</del></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsWebKitCocoaInAppBrowserPrivacyPlugInmm"></a>
<div class="delfile"><h4>Deleted: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacyPlugIn.mm (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacyPlugIn.mm 2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacyPlugIn.mm    2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -1,43 +0,0 @@
</span><del>-/*
- * Copyright (C) 2021 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import "config.h"
-
-#import "PlatformUtilities.h"
-#import <WebKit/WKWebProcessPlugIn.h>
-#import <WebKit/WKWebProcessPlugInLoadDelegate.h>
-#import <wtf/RetainPtr.h>
-
-@interface InAppBrowserPrivacyPlugIn : NSObject <WKWebProcessPlugIn, WKWebProcessPlugInLoadDelegate>
-@end
-
-@implementation InAppBrowserPrivacyPlugIn { }
-
-- (NSURLRequest *)webProcessPlugInBrowserContextController:(WKWebProcessPlugInBrowserContextController *)controller frame:(WKWebProcessPlugInFrame *)frame willSendRequestForResource:(uint64_t)resource request:(NSURLRequest *)request redirectResponse:(NSURLResponse *)redirectResponse
-{
-    return adoptNS([[NSURLRequest alloc] initWithURL:request.URL]).autorelease();
-}
-
-@end
</del></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsWebKitCocoaappprivacyreportiframehtml"></a>
<div class="addfile"><h4>Added: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/app-privacy-report-iframe.html ( => )</h4>
<pre class="diff"><span>
<span class="info">Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl
===================================================================
</span><del>--- trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl 2021-07-08 20:45:38 UTC (rev 279749)
</del><ins>+++ trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl  2021-07-08 20:54:04 UTC (rev 279750)
</ins><span class="lines">@@ -388,9 +388,8 @@
</span><span class="cx">     boolean hasAppBoundSession();
</span><span class="cx">     undefined clearAppBoundSession();
</span><span class="cx">     undefined setAppBoundDomains(object originsArray, object callback);
</span><del>-    undefined appBoundRequestContextDataForDomain(DOMString domain, object callback);
-    boolean didLoadAppBoundRequest();
-    boolean didLoadNonAppBoundRequest();
</del><ins>+    boolean didLoadAppInitiatedRequest();
+    boolean didLoadNonAppInitiatedRequest();
</ins><span class="cx"> 
</span><span class="cx">     undefined injectUserScript(DOMString string);
</span><span class="cx">     readonly attribute unsigned long userScriptInjectedCount;
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundleInjectedBundlecpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp   2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp      2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -417,15 +417,7 @@
</span><span class="cx">         m_testRunner->callDidReceiveLoadedSubresourceDomainsCallback(WTFMove(domains));
</span><span class="cx">         return;
</span><span class="cx">     }
</span><del>-    
-    if (WKStringIsEqualToUTF8CString(messageName, "CallDidReceiveAppBoundRequestContextDataForDomain")) {
-        ASSERT(messageBody);
-        ASSERT(WKGetTypeID(messageBody) == WKStringGetTypeID());
</del><span class="cx"> 
</span><del>-        auto resultString = toWTFString(static_cast<WKStringRef>(messageBody));
-        m_testRunner->callDidReceiveAppBoundRequestContextDataForDomainCallback(WTFMove(resultString));
-    }
-
</del><span class="cx">     if (WKStringIsEqualToUTF8CString(messageName, "CallDidRemoveAllSessionCredentialsCallback")) {
</span><span class="cx">         m_testRunner->callDidRemoveAllSessionCredentialsCallback();
</span><span class="cx">         return;
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundleTestRunnercpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp       2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp  2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -2116,28 +2116,16 @@
</span><span class="cx">     callTestRunnerCallback(DidSetAppBoundDomainsCallbackID);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void TestRunner::appBoundRequestContextDataForDomain(JSStringRef domain, JSValueRef callback)
</del><ins>+bool TestRunner::didLoadAppInitiatedRequest()
</ins><span class="cx"> {
</span><del>-    cacheTestRunnerCallback(AppBoundRequestContextDataForDomainCallbackID, callback);
-    postMessage("AppBoundRequestContextDataForDomain", domain);
</del><ins>+    return postSynchronousPageMessageReturningBoolean("DidLoadAppInitiatedRequest");
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void TestRunner::callDidReceiveAppBoundRequestContextDataForDomainCallback(String&& contextDomain)
</del><ins>+bool TestRunner::didLoadNonAppInitiatedRequest()
</ins><span class="cx"> {
</span><del>-    JSValueRef resultValue = JSValueMakeString(mainFrameJSContext(), createJSString(contextDomain.utf8().data()).get());
-    callTestRunnerCallback(AppBoundRequestContextDataForDomainCallbackID, 1, &resultValue);
</del><ins>+    return postSynchronousPageMessageReturningBoolean("DidLoadNonAppInitiatedRequest");
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool TestRunner::didLoadAppBoundRequest()
-{
-    return postSynchronousPageMessageReturningBoolean("DidLoadAppBoundRequest");
-}
-
-bool TestRunner::didLoadNonAppBoundRequest()
-{
-    return postSynchronousPageMessageReturningBoolean("DidLoadNonAppBoundRequest");
-}
-
</del><span class="cx"> void TestRunner::setIsSpeechRecognitionPermissionGranted(bool granted)
</span><span class="cx"> {
</span><span class="cx">     postSynchronousPageMessage("SetIsSpeechRecognitionPermissionGranted", granted);
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundleTestRunnerh"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h 2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h    2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -497,11 +497,10 @@
</span><span class="cx">     void clearAppBoundSession();
</span><span class="cx">     void setAppBoundDomains(JSValueRef originArray, JSValueRef callback);
</span><span class="cx">     void didSetAppBoundDomainsCallback();
</span><del>-    void appBoundRequestContextDataForDomain(JSStringRef, JSValueRef);
-    void callDidReceiveAppBoundRequestContextDataForDomainCallback(String&&);
-    bool didLoadAppBoundRequest();
-    bool didLoadNonAppBoundRequest();
</del><span class="cx"> 
</span><ins>+    bool didLoadAppInitiatedRequest();
+    bool didLoadNonAppInitiatedRequest();
+
</ins><span class="cx">     size_t userScriptInjectedCount() const;
</span><span class="cx">     void injectUserScript(JSStringRef);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerTestControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/TestController.cpp (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/TestController.cpp  2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Tools/WebKitTestRunner/TestController.cpp     2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -1081,7 +1081,7 @@
</span><span class="cx">         updateLiveDocumentsAfterTest();
</span><span class="cx"> #if PLATFORM(COCOA)
</span><span class="cx">         clearApplicationBundleIdentifierTestingOverride();
</span><del>-        clearAppBoundNavigationData();
</del><ins>+        clearAppPrivacyReportTestingData();
</ins><span class="cx"> #endif
</span><span class="cx">         clearBundleIdentifierInNetworkProcess();
</span><span class="cx">     }
</span><span class="lines">@@ -2726,21 +2726,17 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void TestController::appBoundRequestContextDataForDomain(WKStringRef)
</del><ins>+bool TestController::didLoadAppInitiatedRequest()
</ins><span class="cx"> {
</span><del>-}
-
-bool TestController::didLoadAppBoundRequest()
-{
</del><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool TestController::didLoadNonAppBoundRequest()
</del><ins>+bool TestController::didLoadNonAppInitiatedRequest()
</ins><span class="cx"> {
</span><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void TestController::clearAppBoundNavigationData()
</del><ins>+void TestController::clearAppPrivacyReportTestingData()
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerTestControllerh"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/TestController.h (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/TestController.h    2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Tools/WebKitTestRunner/TestController.h       2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -262,10 +262,9 @@
</span><span class="cx">     void clearLoadedSubresourceDomains();
</span><span class="cx">     void clearAppBoundSession();
</span><span class="cx">     void reinitializeAppBoundDomains();
</span><del>-    void appBoundRequestContextDataForDomain(WKStringRef);
-    void clearAppBoundNavigationData();
-    bool didLoadAppBoundRequest();
-    bool didLoadNonAppBoundRequest();
</del><ins>+    void clearAppPrivacyReportTestingData();
+    bool didLoadAppInitiatedRequest();
+    bool didLoadNonAppInitiatedRequest();
</ins><span class="cx"> 
</span><span class="cx">     void updateBundleIdentifierInNetworkProcess(const std::string& bundleIdentifier);
</span><span class="cx">     void clearBundleIdentifierInNetworkProcess();
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerTestInvocationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/TestInvocation.cpp (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/TestInvocation.cpp  2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Tools/WebKitTestRunner/TestInvocation.cpp     2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -792,12 +792,6 @@
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (WKStringIsEqualToUTF8CString(messageName, "AppBoundRequestContextDataForDomain")) {
-        WKStringRef domain = stringValue(messageBody);
-        TestController::singleton().appBoundRequestContextDataForDomain(domain);
-        return;
-    }
-
</del><span class="cx">     ASSERT_NOT_REACHED();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -1071,11 +1065,11 @@
</span><span class="cx">         return adoptWK(WKBooleanCreate(statisticInDatabaseOnce));
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (WKStringIsEqualToUTF8CString(messageName, "DidLoadAppBoundRequest"))
-        return adoptWK(WKBooleanCreate(TestController::singleton().didLoadAppBoundRequest()));
</del><ins>+    if (WKStringIsEqualToUTF8CString(messageName, "DidLoadAppInitiatedRequest"))
+        return adoptWK(WKBooleanCreate(TestController::singleton().didLoadAppInitiatedRequest()));
</ins><span class="cx"> 
</span><del>-    if (WKStringIsEqualToUTF8CString(messageName, "DidLoadNonAppBoundRequest"))
-        return adoptWK(WKBooleanCreate(TestController::singleton().didLoadNonAppBoundRequest()));
</del><ins>+    if (WKStringIsEqualToUTF8CString(messageName, "DidLoadNonAppInitiatedRequest"))
+        return adoptWK(WKBooleanCreate(TestController::singleton().didLoadNonAppInitiatedRequest()));
</ins><span class="cx"> 
</span><span class="cx">     if (WKStringIsEqualToUTF8CString(messageName, "SetStatisticsGrandfathered")) {
</span><span class="cx">         auto messageBodyDictionary = dictionaryValue(messageBody);
</span><span class="lines">@@ -1582,12 +1576,6 @@
</span><span class="cx">     postPageMessage("CallDidReceiveLoadedSubresourceDomains", messageBody);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void TestInvocation::didReceiveAppBoundRequestContextDataForDomain(String&& domain)
-{
-    auto messageBody = WKStringCreateWithUTF8CString(domain.utf8().data());
-    postPageMessage("CallDidReceiveAppBoundRequestContextDataForDomain", messageBody);
-}
-
</del><span class="cx"> void TestInvocation::didRemoveAllSessionCredentials()
</span><span class="cx"> {
</span><span class="cx">     postPageMessage("CallDidRemoveAllSessionCredentialsCallback");
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerTestInvocationh"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/TestInvocation.h (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/TestInvocation.h    2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Tools/WebKitTestRunner/TestInvocation.h       2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -97,7 +97,6 @@
</span><span class="cx">     void didRemoveAllSessionCredentials();
</span><span class="cx"> 
</span><span class="cx">     void didSetAppBoundDomains();
</span><del>-    void didReceiveAppBoundRequestContextDataForDomain(String&&);
</del><span class="cx"> 
</span><span class="cx">     void dumpResourceLoadStatistics();
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnercocoaTestControllerCocoamm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm        2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm   2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -384,31 +384,15 @@
</span><span class="cx">     [[globalWebViewConfiguration() websiteDataStore] _clearLoadedSubresourceDomainsFor:parentView->platformView()];
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void TestController::appBoundRequestContextDataForDomain(WKStringRef domain)
</del><ins>+bool TestController::didLoadAppInitiatedRequest()
</ins><span class="cx"> {
</span><span class="cx">     auto* parentView = mainWebView();
</span><span class="cx">     if (!parentView)
</span><del>-        return;
-
-    [m_mainWebView->platformView() _appBoundNavigationDataForDomain:toWTFString(domain) completionHandler:^(NSString *context) {
-        if (!context) {
-            m_currentInvocation->didReceiveAppBoundRequestContextDataForDomain({ });
-            return;
-        }
-
-        m_currentInvocation->didReceiveAppBoundRequestContextDataForDomain(String(context));
-    }];
-}
-
-bool TestController::didLoadAppBoundRequest()
-{
-    auto* parentView = mainWebView();
-    if (!parentView)
</del><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     __block bool isDone = false;
</span><span class="cx">     __block bool didLoadResult = false;
</span><del>-    [m_mainWebView->platformView() _didLoadAppBoundRequest:^(BOOL result) {
</del><ins>+    [m_mainWebView->platformView() _didLoadAppInitiatedRequest:^(BOOL result) {
</ins><span class="cx">         didLoadResult = result;
</span><span class="cx">         isDone = true;
</span><span class="cx">     }];
</span><span class="lines">@@ -416,7 +400,7 @@
</span><span class="cx">     return didLoadResult;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool TestController::didLoadNonAppBoundRequest()
</del><ins>+bool TestController::didLoadNonAppInitiatedRequest()
</ins><span class="cx"> {
</span><span class="cx">     auto* parentView = mainWebView();
</span><span class="cx">     if (!parentView)
</span><span class="lines">@@ -424,7 +408,7 @@
</span><span class="cx"> 
</span><span class="cx">     __block bool isDone = false;
</span><span class="cx">     __block bool didLoadResult = false;
</span><del>-    [m_mainWebView->platformView() _didLoadNonAppBoundRequest:^(BOOL result) {
</del><ins>+    [m_mainWebView->platformView() _didLoadNonAppInitiatedRequest:^(BOOL result) {
</ins><span class="cx">         didLoadResult = result;
</span><span class="cx">         isDone = true;
</span><span class="cx">     }];
</span><span class="lines">@@ -432,7 +416,7 @@
</span><span class="cx">     return didLoadResult;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void TestController::clearAppBoundNavigationData()
</del><ins>+void TestController::clearAppPrivacyReportTestingData()
</ins><span class="cx"> {
</span><span class="cx">     auto* parentView = mainWebView();
</span><span class="cx">     if (!parentView)
</span><span class="lines">@@ -439,7 +423,7 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     __block bool doneClearing = false;
</span><del>-    [m_mainWebView->platformView() _clearAppBoundNavigationData:^{
</del><ins>+    [m_mainWebView->platformView() _clearAppPrivacyReportTestingData:^{
</ins><span class="cx">         doneClearing = true;
</span><span class="cx">     }];
</span><span class="cx">     platformRunUntil(doneClearing, noTimeout);
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnercocoaTestRunnerWKWebViewh"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/cocoa/TestRunnerWKWebView.h (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/cocoa/TestRunnerWKWebView.h 2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Tools/WebKitTestRunner/cocoa/TestRunnerWKWebView.h    2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -83,8 +83,7 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)dismissActiveMenu;
</span><span class="cx"> - (void)resetInteractionCallbacks;
</span><del>-- (void)_appBoundNavigationDataForDomain:(NSString *)domain completionHandler:(void (^)(NSString * context))completionHandler;
-- (void)_didLoadAppBoundRequest:(void (^)(BOOL result))completionHandler;
-- (void)_didLoadNonAppBoundRequest:(void (^)(BOOL result))completionHandler;
</del><ins>+- (void)_didLoadAppInitiatedRequest:(void (^)(BOOL result))completionHandler;
+- (void)_didLoadNonAppInitiatedRequest:(void (^)(BOOL result))completionHandler;
</ins><span class="cx"> 
</span><span class="cx"> @end
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnercocoaTestRunnerWKWebViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/cocoa/TestRunnerWKWebView.mm (279749 => 279750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/cocoa/TestRunnerWKWebView.mm        2021-07-08 20:45:38 UTC (rev 279749)
+++ trunk/Tools/WebKitTestRunner/cocoa/TestRunnerWKWebView.mm   2021-07-08 20:54:04 UTC (rev 279750)
</span><span class="lines">@@ -607,19 +607,14 @@
</span><span class="cx">         self.didHideContactPickerCallback();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-- (void)_appBoundNavigationDataForDomain:(NSString *)domain completionHandler:(void (^)(NSString * context))completionHandler
</del><ins>+- (void)_didLoadAppInitiatedRequest:(void (^)(BOOL result))completionHandler
</ins><span class="cx"> {
</span><del>-    [super _appBoundNavigationDataForDomain:domain completionHandler:completionHandler];
</del><ins>+    [super _didLoadAppInitiatedRequest:completionHandler];
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-- (void)_didLoadAppBoundRequest:(void (^)(BOOL result))completionHandler
</del><ins>+- (void)_didLoadNonAppInitiatedRequest:(void (^)(BOOL result))completionHandler
</ins><span class="cx"> {
</span><del>-    [super _didLoadAppBoundRequest:completionHandler];
</del><ins>+    [super _didLoadNonAppInitiatedRequest:completionHandler];
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-- (void)_didLoadNonAppBoundRequest:(void (^)(BOOL result))completionHandler
-{
-    [super _didLoadNonAppBoundRequest:completionHandler];
-}
-
</del><span class="cx"> @end
</span></span></pre>
</div>
</div>

</body>
</html>