Branch: refs/heads/safari-7615.1.18-branch Home: https://github.com/WebKit/WebKit Commit: 8907b7a225ed08e647c76120b08a6ac66e64c6ac https://github.com/WebKit/WebKit/commit/8907b7a225ed08e647c76120b08a6ac66e64c6ac Author: Alex Christensen <achristen...@apple.com> Date: 2023-01-20 (Fri, 20 Jan 2023)
Changed paths: M Source/WebKit/NetworkProcess/NetworkProcess.cpp M Source/WebKit/NetworkProcess/NetworkProcess.h M Source/WebKit/NetworkProcess/NetworkProcess.messages.in M Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp M Source/WebKit/NetworkProcess/NetworkSession.cpp M Source/WebKit/NetworkProcess/SharedWorker/WebSharedWorkerServer.cpp A Source/WebKit/Shared/LoadedWebArchive.h M Source/WebKit/UIProcess/WebPageProxy.cpp M Source/WebKit/UIProcess/WebProcessPool.cpp M Source/WebKit/WebKit.xcodeproj/project.pbxproj M Tools/TestWebKitAPI/Tests/WebKitCocoa/CreateWebArchive.mm Log Message: ----------- Cherry-pick 9c2ad9a13f93. rdar://problem/103003585 WebArchive content should not terminate web process when accessing cookies https://bugs.webkit.org/show_bug.cgi?id=250537 rdar://103003585 Reviewed by Chris Dumez. There are 3 different ways I'm aware of to load WebArchives. All of them needed fixing. When we load a web archive, it is only parsed in the web process, which is the only place we can find out what domain it was originally fetched from, which is contained inside the web archive data, which only has a way to parse it in its entirety. Rather than parse the whole thing in the UI process or buffer it in the network process memory then parse it, I just disable cookie domain checks when a web archive has been loaded, which is rare. * Source/WebCore/loader/DocumentLoader.cpp: (WebCore::DocumentLoader::maybeCreateArchive): * Source/WebCore/loader/FrameLoaderClient.h: * Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::NetworkConnectionToWebProcess::allowCookieAccessForWebArchive): * Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h: * Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in: * Source/WebKit/NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::initializeNetworkProcess): (WebKit::NetworkProcess::addAllowedFirstPartyForCookies): (WebKit::NetworkProcess::webProcessWillLoadWebArchive): (WebKit::NetworkProcess::webProcessDidLoadWebArchive): (WebKit::NetworkProcess::allowsFirstPartyForCookies): * Source/WebKit/NetworkProcess/NetworkProcess.h: * Source/WebKit/NetworkProcess/NetworkProcess.messages.in: * Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::didReceiveMainResourceResponse): * Source/WebKit/NetworkProcess/NetworkSession.cpp: (WebKit::NetworkSession::ensureSWServer): * Source/WebKit/NetworkProcess/SharedWorker/WebSharedWorkerServer.cpp: (WebKit::WebSharedWorkerServer::createContextConnection): * Source/WebKit/Shared/LoadedWebArchive.h: Added. * Source/WebKit/UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::loadAlternateHTML): (WebKit::WebPageProxy::loadWebArchiveData): (WebKit::WebPageProxy::triggerBrowsingContextGroupSwitchForNavigation): * Source/WebKit/UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::processForNavigation): * Source/WebKit/WebKit.xcodeproj/project.pbxproj: * Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::allowCookieAccessForWebArchive): * Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.h: * Tools/TestWebKitAPI/Tests/WebKitCocoa/CreateWebArchive.mm: Canonical link: https://commits.webkit.org/258901@main Canonical link: https://commits.webkit.org/258608.23@safari-7615.1.18-branch _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes