[webkit-changes] [WebKit/WebKit] d911eb: Add abstractions for instantiating remote frame tr...

Alex Christensen noreply at github.com
Tue Mar 7 02:38:56 PST 2023


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

  Changed paths:
    M Source/WebCore/loader/EmptyClients.cpp
    M Source/WebCore/page/Page.cpp
    M Source/WebCore/page/PageConfiguration.cpp
    M Source/WebCore/page/PageConfiguration.h
    M Source/WebKit/CMakeLists.txt
    M Source/WebKit/DerivedSources-input.xcfilelist
    M Source/WebKit/DerivedSources.make
    A Source/WebKit/Shared/FrameTreeCreationParameters.h
    A Source/WebKit/Shared/FrameTreeCreationParameters.serialization.in
    M Source/WebKit/Shared/WebPageCreationParameters.cpp
    M Source/WebKit/Shared/WebPageCreationParameters.h
    M Source/WebKit/UIProcess/ProvisionalFrameProxy.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/WebKit.xcodeproj/project.pbxproj
    M Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.cpp
    M Source/WebKit/WebProcess/Storage/WebSharedWorkerContextManagerConnection.cpp
    M Source/WebKit/WebProcess/WebPage/WebPage.cpp
    M Source/WebKitLegacy/mac/WebView/WebView.mm

  Log Message:
  -----------
  Add abstractions for instantiating remote frame trees in iframe processes
https://bugs.webkit.org/show_bug.cgi?id=253482

Reviewed by Chris Dumez and Per Arne Vollan.

This PR does three things, all of which are useful when instantiating remote frame trees.

1. Instead of passing a FrameLoaderClient in the PageConfiguration, pass either a FrameLoaderClient
for a LocalFrame as the main frame, or a RemoteFrameClient for a RemoteFrame as the main frame.
2. Also pass a FrameIdentifier in all cases, which moves the logic about where it comes from
to the WebPage constructor (or to WebView.mm for WebKitLegacy).
3. Gather and send a FrameCreationParameters object with WebPageCreationParameters when setting up
a ProvisionalFrameProxy.  It currently only contains FrameIdentifiers in a frame tree and is unused,
but will soon contain more info like security origins and be used to construct the whole frame tree
in iframe processes.

* Source/WebCore/loader/EmptyClients.cpp:
(WebCore::pageConfigurationWithEmptyClients):
* Source/WebCore/page/Page.cpp:
(WebCore::createMainFrame):
(WebCore::Page::Page):
* Source/WebCore/page/PageConfiguration.cpp:
(WebCore::PageConfiguration::PageConfiguration):
* Source/WebCore/page/PageConfiguration.h:
* Source/WebKit/CMakeLists.txt:
* Source/WebKit/DerivedSources-input.xcfilelist:
* Source/WebKit/DerivedSources.make:
* Source/WebKit/Shared/FrameCreationParameters.h: Added.
* Source/WebKit/Shared/FrameCreationParameters.serialization.in: Added.
* Source/WebKit/Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode const):
(WebKit::WebPageCreationParameters::decode):
* Source/WebKit/Shared/WebPageCreationParameters.h:
* Source/WebKit/UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::frameCreationParameters const):
* Source/WebKit/UIProcess/WebFrameProxy.h:
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::frameCreationParameters const):
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:
* Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.cpp:
(WebKit::WebSWContextManagerConnection::installServiceWorker):
* Source/WebKit/WebProcess/Storage/WebSharedWorkerContextManagerConnection.cpp:
(WebKit::WebSharedWorkerContextManagerConnection::launchSharedWorker):
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::m_appHighlightsVisible):
* Source/WebKitLegacy/mac/WebView/WebView.mm:
(-[WebView _commonInitializationWithFrameName:groupName:]):
(-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]):

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




More information about the webkit-changes mailing list