-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement postMessage for site-isolated iframes after cross-origin navigation #16017
Merged
webkit-commit-queue
merged 1 commit into
WebKit:main
from
achristensen07:eng/Implement-postMessage-for-site-isolated-iframes-after-cross-origin-navigation
Jul 24, 2023
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
EWS run on current version of this PR (hash ba4e4f5) |
nt1m
approved these changes
Jul 24, 2023
β¦vigation https://bugs.webkit.org/show_bug.cgi?id=259423 rdar://112719991 Reviewed by Tim Nguyen. Broadcasting process identifier updates when an iframe changes processes would necessarily introduce a point of time where messages could be dropped because updates hadn't been received in the sending web content processes. Rather than trying to keep that information up to date in all web content processes, use the UI process as the source of truth for what frame is in what process. The FrameIdentifier is therefore all the context we need when sending messages to another process. * Source/WebCore/page/Page.cpp: (WebCore::createMainFrame): * Source/WebCore/page/PageConfiguration.cpp: (WebCore::PageConfiguration::PageConfiguration): * Source/WebCore/page/PageConfiguration.h: * Source/WebCore/page/RemoteDOMWindow.cpp: (WebCore::RemoteDOMWindow::postMessage): * Source/WebCore/page/RemoteFrame.cpp: (WebCore::RemoteFrame::createMainFrame): (WebCore::RemoteFrame::createSubframe): (WebCore::RemoteFrame::createSubframeWithContentsInAnotherProcess): (WebCore::RemoteFrame::RemoteFrame): (WebCore::m_layerHostingContextIdentifier): (WebCore::RemoteFrame::renderTreeAsText): (WebCore::m_remoteProcessIdentifier): Deleted. * Source/WebCore/page/RemoteFrame.h: * Source/WebCore/page/RemoteFrameClient.h: * Source/WebKit/Shared/FrameTreeCreationParameters.h: * Source/WebKit/Shared/FrameTreeCreationParameters.serialization.in: * Source/WebKit/UIProcess/ProvisionalPageProxy.cpp: (WebKit::ProvisionalPageProxy::didCommitLoadForFrame): * Source/WebKit/UIProcess/WebFrameProxy.cpp: (WebKit::WebFrameProxy::commitProvisionalFrame): (WebKit::WebFrameProxy::frameTreeCreationParameters const): * Source/WebKit/UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::createRemoteSubframesInOtherProcesses): * Source/WebKit/UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::postMessageToRemote): (WebKit::WebProcessProxy::renderTreeAsText): * Source/WebKit/UIProcess/WebProcessProxy.h: * Source/WebKit/UIProcess/WebProcessProxy.messages.in: * Source/WebKit/WebProcess/WebCoreSupport/WebRemoteFrameClient.cpp: (WebKit::WebRemoteFrameClient::postMessageToRemote): (WebKit::WebRemoteFrameClient::renderTreeAsText): * Source/WebKit/WebProcess/WebCoreSupport/WebRemoteFrameClient.h: * Source/WebKit/WebProcess/WebPage/WebFrame.cpp: (WebKit::WebFrame::createRemoteSubframe): (WebKit::WebFrame::didCommitLoadInAnotherProcess): * Source/WebKit/WebProcess/WebPage/WebFrame.h: * Source/WebKit/WebProcess/WebPage/WebPage.cpp: (WebKit::clientForMainFrame): (WebKit::m_appHighlightsVisible): (WebKit::WebPage::constructFrameTree): (WebKit::WebPage::createRemoteSubframe): (WebKit::WebPage::didCommitLoadInAnotherProcess): * Source/WebKit/WebProcess/WebPage/WebPage.h: * Source/WebKit/WebProcess/WebPage/WebPage.messages.in: * Source/WebKit/WebProcess/WebProcess.messages.in: * Tools/TestWebKitAPI/Tests/WebKitCocoa/SiteIsolation.mm: (TestWebKitAPI::TEST): Canonical link: https://commits.webkit.org/266266@main
ba4e4f5
to
3a7682e
Compare
Committed 266266@main (3a7682e): https://commits.webkit.org/266266@main Reviewed commits have been landed. Closing PR #16017 and removing active labels. |
nt1m
reviewed
Jul 24, 2023
@@ -512,13 +512,13 @@ static Vector<UserContentURLPattern> parseAndAllowAccessToCORSDisablingPatterns( | |||
return parsedPatterns; | |||
} | |||
|
|||
static std::variant<UniqueRef<LocalFrameLoaderClient>, PageConfiguration::RemoteMainFrameCreationParameters> clientForMainFrame(Ref<WebFrame>&& mainFrame, std::optional<WebCore::ProcessIdentifier> remoteProcessIdentifier) | |||
static std::variant<UniqueRef<LocalFrameLoaderClient>, UniqueRef<RemoteFrameClient>> clientForMainFrame(Ref<WebFrame>&& mainFrame, bool localMainFrame) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the bool parameter should probably be an enum class
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
3a7682e
ba4e4f5