[webkit-changes] [WebKit/WebKit] a8f0d8: Prepare Frame constructor to have RemoteFrame as t...

Alex Christensen noreply at github.com
Mon Mar 6 08:17:08 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a8f0d81d245cbe7d6fc82ea13a299d3c849a0974
      https://github.com/WebKit/WebKit/commit/a8f0d81d245cbe7d6fc82ea13a299d3c849a0974
  Author: Alex Christensen <achristensen at apple.com>
  Date:   2023-03-06 (Mon, 06 Mar 2023)

  Changed paths:
    M Source/WebCore/page/AbstractFrame.cpp
    M Source/WebCore/page/AbstractFrame.h
    M Source/WebCore/page/Frame.cpp
    M Source/WebCore/page/Frame.h
    M Source/WebCore/page/Page.cpp
    M Source/WebCore/page/RemoteFrame.cpp
    M Source/WebCore/page/RemoteFrame.h
    M Source/WebCore/rendering/RenderLayerBacking.cpp
    M Source/WebKit/WebProcess/WebPage/WebFrame.cpp
    M Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm
    M Source/WebKitLegacy/mac/WebView/WebFrame.mm
    M Source/WebKitLegacy/mac/WebView/WebFrameInternal.h

  Log Message:
  -----------
  Prepare Frame constructor to have RemoteFrame as the main frame in a site-isolated iframe process
https://bugs.webkit.org/show_bug.cgi?id=253389

Reviewed by Chris Dumez.

There are two distinct types of Frames: one with an owner (subframe) and one without an owner (main frame).
We are about to need another type: a Frame with a parent in another process.  We will know about its parent
because we will have an AbstractFrame, but we won't have a HTMLFrameOwnerElement because it is in another process.
Frame::createSubframeHostedInAnotherProcess is introduced and soon to be used for this purpose.

Symmetrically, there needs to be three ways to construct a RemoteFrame: createMainFrame and createSubframe
just like the corresponding Frame constructors, but we will also need createSubframeWithContentsInAnotherProcess
to represent such a RemoteFrame in the process that has the HTMLFrameOwnerElement.

I also clean up the construction sites a little to pass non-null Pages and other parameters to where the should be.

* Source/WebCore/page/AbstractFrame.cpp:
(WebCore::AbstractFrame::AbstractFrame):
(WebCore::parentFrame): Deleted.
* Source/WebCore/page/AbstractFrame.h:
* Source/WebCore/page/Frame.cpp:
(WebCore::Frame::Frame):
(WebCore::Frame::createMainFrame):
(WebCore::Frame::createSubframe):
(WebCore::Frame::createSubframeHostedInAnotherProcess):
(WebCore::Frame::create): Deleted.
* Source/WebCore/page/Frame.h:
* Source/WebCore/page/Page.cpp:
(WebCore::Page::Page):
* Source/WebCore/page/RemoteFrame.cpp:
(WebCore::RemoteFrame::createMainFrame):
(WebCore::RemoteFrame::createSubframe):
(WebCore::RemoteFrame::createSubframeWithContentsInAnotherProcess):
(WebCore::RemoteFrame::RemoteFrame):
* Source/WebCore/page/RemoteFrame.h:
* Source/WebCore/rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateConfiguration):
* Source/WebKit/WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::createSubframe):
(WebKit::WebFrame::didCommitLoadInAnotherProcess):
* Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::createFrame):
* Source/WebKitLegacy/mac/WebView/WebFrame.mm:
(+[WebFrame _createFrameWithPage:frameName:frameView:ownerElement:]):
(+[WebFrame _createSubframeWithOwnerElement:page:frameName:frameView:]):
(+[WebFrame _createSubframeWithOwnerElement:frameName:frameView:]): Deleted.
* Source/WebKitLegacy/mac/WebView/WebFrameInternal.h:

Canonical link: https://commits.webkit.org/261270@main




More information about the webkit-changes mailing list