[webkit-changes] [WebKit/WebKit] 4aa7c4: [Site Isolation] Isolated subframes should use the...
Charlie Wolfe
noreply at github.com
Thu Feb 15 16:53:34 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 4aa7c4c9b5a35bf5e68871fd6ff955ced5011869
https://github.com/WebKit/WebKit/commit/4aa7c4c9b5a35bf5e68871fd6ff955ced5011869
Author: Charlie Wolfe <charliew at apple.com>
Date: 2024-02-15 (Thu, 15 Feb 2024)
Changed paths:
M Source/WebCore/loader/FrameLoader.cpp
M Source/WebCore/page/Frame.h
M Source/WebCore/page/LocalFrame.cpp
M Source/WebCore/page/LocalFrame.h
M Source/WebCore/page/RemoteFrame.cpp
M Source/WebCore/page/RemoteFrame.h
M Source/WebKit/Shared/WebPageCreationParameters.h
M Source/WebKit/Shared/WebPageCreationParameters.serialization.in
M Source/WebKit/Shared/WebsitePoliciesData.h
M Source/WebKit/UIProcess/ProvisionalPageProxy.cpp
M Source/WebKit/UIProcess/ProvisionalPageProxy.h
M Source/WebKit/UIProcess/RemotePageProxy.cpp
M Source/WebKit/UIProcess/WebPageProxy.cpp
M Source/WebKit/UIProcess/WebPageProxy.h
M Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
M Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.h
M Source/WebKit/WebProcess/WebCoreSupport/WebLocalFrameLoaderClient.cpp
M Source/WebKit/WebProcess/WebCoreSupport/WebLocalFrameLoaderClient.h
M Source/WebKit/WebProcess/WebCoreSupport/WebRemoteFrameClient.cpp
M Source/WebKit/WebProcess/WebCoreSupport/WebRemoteFrameClient.h
M Source/WebKit/WebProcess/WebPage/WebFrame.cpp
M Source/WebKit/WebProcess/WebPage/WebFrame.h
M Source/WebKit/WebProcess/WebPage/WebPage.cpp
M Tools/TestWebKitAPI/Tests/WebKitCocoa/SiteIsolation.mm
Log Message:
-----------
[Site Isolation] Isolated subframes should use the user agent set from website policies
https://bugs.webkit.org/show_bug.cgi?id=269213
rdar://122817201
Reviewed by Alex Christensen.
To ensure that the correct website policies are sent to navigating subframes, we need to store the
website policies when a main frame provisional load has started. The page should not be updated with the
stored website policies until the provisional load has been committed.
The tests verify that the subframe has the correct user agent and that the website policies are only
applied once a provisional load has been committed.
* Source/WebCore/loader/FrameLoader.cpp:
(WebCore::FrameLoader::userAgent const):
* Source/WebCore/page/Frame.h:
* Source/WebCore/page/LocalFrame.cpp:
(WebCore::LocalFrame::customUserAgent const):
(WebCore::LocalFrame::customUserAgentAsSiteSpecificQuirks const):
* Source/WebCore/page/LocalFrame.h:
* Source/WebCore/page/RemoteFrame.cpp:
(WebCore::RemoteFrame::customUserAgent const):
(WebCore::RemoteFrame::customUserAgentAsSiteSpecificQuirks const):
* Source/WebCore/page/RemoteFrame.h:
* Source/WebKit/Shared/WebPageCreationParameters.h:
* Source/WebKit/Shared/WebPageCreationParameters.serialization.in:
* Source/WebKit/UIProcess/ProvisionalPageProxy.cpp:
(WebKit::ProvisionalPageProxy::initializeWebPage):
* Source/WebKit/UIProcess/ProvisionalPageProxy.h:
(WebKit::ProvisionalPageProxy::mainFrameWebsitePoliciesData const):
* Source/WebKit/UIProcess/RemotePageProxy.cpp:
(WebKit::RemotePageProxy::injectPageIntoNewProcess):
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::receivedNavigationActionPolicyDecision):
(WebKit::WebPageProxy::commitProvisionalPage):
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
* Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
* Source/WebKit/WebProcess/WebCoreSupport/WebLocalFrameLoaderClient.cpp:
(WebKit::WebLocalFrameLoaderClient::applyWebsitePolicies):
(WebKit::WebLocalFrameLoaderClient::applyToDocumentLoader): Deleted.
* Source/WebKit/WebProcess/WebCoreSupport/WebLocalFrameLoaderClient.h:
* Source/WebKit/WebProcess/WebCoreSupport/WebRemoteFrameClient.cpp:
(WebKit::WebRemoteFrameClient::applyWebsitePolicies):
* Source/WebKit/WebProcess/WebCoreSupport/WebRemoteFrameClient.h:
* Source/WebKit/WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::remoteFrameClient const):
(WebKit::WebFrame::didReceivePolicyDecision):
* Source/WebKit/WebProcess/WebPage/WebFrame.h:
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::m_unifiedTextReplacementController):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/SiteIsolation.mm:
(TestWebKitAPI::TEST):
Canonical link: https://commits.webkit.org/274779@main
More information about the webkit-changes
mailing list