[webkit-changes] [WebKit/WebKit] 786784: WebFrame transition from RemoteFrame to LocalFrame...
Alex Christensen
noreply at github.com
Thu Apr 27 09:17:33 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 786784fcad5d8b4086949b22bad554248e8d848d
https://github.com/WebKit/WebKit/commit/786784fcad5d8b4086949b22bad554248e8d848d
Author: Alex Christensen <achristensen at apple.com>
Date: 2023-04-27 (Thu, 27 Apr 2023)
Changed paths:
M Source/WebCore/loader/FrameLoader.cpp
M Source/WebCore/loader/FrameLoader.h
M Source/WebCore/page/RemoteFrame.cpp
M Source/WebKit/Shared/WebPageCreationParameters.cpp
M Source/WebKit/Shared/WebPageCreationParameters.h
M Source/WebKit/UIProcess/ProvisionalFrameProxy.cpp
M Source/WebKit/UIProcess/ProvisionalFrameProxy.h
M Source/WebKit/UIProcess/SubframePageProxy.cpp
M Source/WebKit/UIProcess/WebFrameProxy.cpp
M Source/WebKit/UIProcess/WebFrameProxy.h
M Source/WebKit/UIProcess/WebPageProxy.cpp
M Source/WebKit/UIProcess/WebPageProxy.h
M Source/WebKit/UIProcess/WebProcessPool.cpp
M Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
M Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.h
M Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm
M Source/WebKit/WebProcess/WebPage/WebFrame.cpp
M Source/WebKit/WebProcess/WebPage/WebFrame.h
M Source/WebKit/WebProcess/WebPage/WebPage.cpp
M Source/WebKit/WebProcess/WebPage/WebPage.h
Log Message:
-----------
WebFrame transition from RemoteFrame to LocalFrame should use same WebFrame
https://bugs.webkit.org/show_bug.cgi?id=255765
rdar://108354414
Reviewed by Chris Dumez.
Instead of replacing the WebFrame, just replace its m_coreFrame.
This is more symmetric with WebFrame::didCommitLoadInAnotherProcess which transitions the other way.
Also tie the WebPage lifetime more closely with the SubframePageProxy lifetime,
which requires initially creating a frame tree with all RemoteFrames, then transitioning them
to LocalFrames as ProvisionalFrameProxies are made to start loads in the frames.
In order to prevent the load event from happening early, I needed to also make
FrameLoader::subframeIsLoading return true if a provisional or committed load is happening
in another process, which can't be queried through FrameLoader::provisionalDocumentLoader
because the DocumentLoader is in another process. I added a bool to keep track of whether
this is happening, and some further refinement is needed here so I added some FIXME comments.
* Source/WebKit/Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode const):
(WebKit::WebPageCreationParameters::decode):
(WebKit::WebPageCreationParameters::SubframeProcessFrameTreeInitializationParameters::encode const): Deleted.
(WebKit::WebPageCreationParameters::SubframeProcessFrameTreeInitializationParameters::decode): Deleted.
* Source/WebKit/Shared/WebPageCreationParameters.h:
* Source/WebKit/UIProcess/ProvisionalFrameProxy.cpp:
(WebKit::ProvisionalFrameProxy::ProvisionalFrameProxy):
* Source/WebKit/UIProcess/ProvisionalFrameProxy.h:
* Source/WebKit/UIProcess/SubframePageProxy.cpp:
(WebKit::SubframePageProxy::SubframePageProxy):
* Source/WebKit/UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::swapToProcess):
* Source/WebKit/UIProcess/WebFrameProxy.h:
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::receivedNavigationPolicyDecision):
(WebKit::WebPageProxy::continueNavigationInNewProcess):
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::processForNavigation):
* Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::WebFrameLoaderClient):
* Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
* Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:
(WebKit::initialRootFrame):
* Source/WebKit/WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::createSubframe):
(WebKit::WebFrame::createLocalSubframeHostedInAnotherProcess):
(WebKit::WebFrame::createRemoteSubframe):
(WebKit::WebFrame::makeInvalidator):
(WebKit::WebFrame::transitionToLocal):
* Source/WebKit/WebProcess/WebPage/WebFrame.h:
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::clientForMainFrame):
(WebKit::m_appHighlightsVisible):
(WebKit::WebPage::constructFrameTree):
(WebKit::WebPage::loadRequestByCreatingNewLocalFrameOrConvertingRemoteFrame):
(WebKit::WebPage::loadRequest):
* Source/WebKit/WebProcess/WebPage/WebPage.h:
Canonical link: https://commits.webkit.org/263458@main
More information about the webkit-changes
mailing list