Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f4204f6a8b5bc3d84a744b15fb1ec8d082a03c2e
      
https://github.com/WebKit/WebKit/commit/f4204f6a8b5bc3d84a744b15fb1ec8d082a03c2e
  Author: Brady Eidson <beid...@apple.com>
  Date:   2025-03-19 (Wed, 19 Mar 2025)

  Changed paths:
    M Source/WebCore/CMakeLists.txt
    M Source/WebCore/DerivedSources-output.xcfilelist
    M Source/WebCore/DerivedSources.make
    M Source/WebCore/Headers.cmake
    M Source/WebCore/Modules/applepay/PaymentSession.cpp
    M Source/WebCore/Modules/applepay/PaymentSession.h
    M Source/WebCore/Scripts/generate-process-sync-data.py
    M Source/WebCore/Scripts/tests/DocumentSyncData.cpp
    M Source/WebCore/Scripts/tests/DocumentSyncData.h
    A Source/WebCore/Scripts/tests/FrameTreeSyncData.cpp
    A Source/WebCore/Scripts/tests/FrameTreeSyncData.h
    M Source/WebCore/Scripts/tests/ProcessSyncClient.cpp
    M Source/WebCore/Scripts/tests/ProcessSyncClient.h
    M Source/WebCore/Scripts/tests/ProcessSyncData.h
    M Source/WebCore/Scripts/tests/ProcessSyncData.serialization.in
    M Source/WebCore/Scripts/tests/TestProcessSyncData.in
    M Source/WebCore/Sources.txt
    M Source/WebCore/WebCore.xcodeproj/project.pbxproj
    M Source/WebCore/dom/Document.cpp
    M Source/WebCore/page/Frame.cpp
    M Source/WebCore/page/Frame.h
    M Source/WebCore/page/LocalFrame.cpp
    M Source/WebCore/page/LocalFrame.h
    M Source/WebCore/page/Page.cpp
    M Source/WebCore/page/ProcessSyncData.in
    M Source/WebCore/page/RemoteFrame.cpp
    M Source/WebCore/page/RemoteFrame.h
    M Source/WebKit/Shared/FrameTreeCreationParameters.h
    M Source/WebKit/Shared/FrameTreeCreationParameters.serialization.in
    M Source/WebKit/UIProcess/RemotePageProxy.cpp
    M Source/WebKit/UIProcess/WebFrameProxy.cpp
    M Source/WebKit/UIProcess/WebFrameProxy.h
    M Source/WebKit/UIProcess/WebPageProxy.cpp
    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
    M Source/WebKit/WebProcess/WebPage/WebPage.messages.in
    M Source/WebKitLegacy/mac/WebView/WebFrame.mm

  Log Message:
  -----------
  Generate "FrameTreeSyncData", applying it first to support 
PaymentSession::canCreateSession()
https://bugs.webkit.org/show_bug.cgi?id=290047
rdar://147412463

Reviewed by Alex Christensen.

Under site isolation the frames for a given web page may be spread out over 
multiple WebContent processes.
In that scenario, each WebContent process has its own notion of the FrameTree 
for the page.

Before this change, that frame tree consists of very basic nodes with little 
more than frame names at each node.
But various parts of WebCore and WebKit will require more information about 
nodes in the FrameTree to do their job locally.

This change builds upon the ProcessSyncData machinery to add FrameTreeSyncData. 
Each Frame - whether it is Local or Remote -
will maintain its own FrameTreeSyncData. Each Frame starts out with a snapshot 
of its data from the UIProcess when it was created,
and the UIProcess drives further updates to relevant Frames in each relevant 
WebProcess when needed.

The proof of concept for this new machinery is moving the concept of 
PaymentSession::canCreateSession to the UIProcess,
which can then send the bits out to the frame trees in each WebContent process.

As usual, should be no behavior change when site isolation is disabled.

* Source/WebCore/CMakeLists.txt:
* Source/WebCore/DerivedSources-output.xcfilelist:
* Source/WebCore/DerivedSources.make:

* Source/WebCore/Modules/applepay/PaymentSession.cpp:
(WebCore::PaymentSession::isSecureForSession):
(WebCore::PaymentSession::canCreateSession):
(WebCore::isSecure): Deleted.
* Source/WebCore/Modules/applepay/PaymentSession.h:

* Source/WebCore/Scripts/generate-process-sync-data.py:
(SyncedData.__init__):
(generate_process_sync_data_header):
(generate_synched_data_header):
(generate_synched_data_impl):
(generate_process_sync_data_serialiation_in):
(generate_process_sync_data_serialiation_in.WebCore):
(sort_datas_for_sync_data_order):
(main):
(generate_document_synched_data_header): Deleted.
(generate_document_synched_data_impl): Deleted.
(sort_datas_for_document_sync_data_order): Deleted.

* Source/WebCore/Scripts/tests/FrameTreeSyncData.cpp: Copied from 
Source/WebCore/Scripts/tests/ProcessSyncClient.h.
(WebCore::FrameTreeSyncData::update):
(WebCore::FrameTreeSyncData::FrameTreeSyncData):
* Source/WebCore/Scripts/tests/FrameTreeSyncData.h: Copied from 
Source/WebCore/Scripts/tests/ProcessSyncClient.h.
(WebCore::FrameTreeSyncData::create):
* Source/WebCore/Scripts/tests/ProcessSyncClient.cpp:
(WebCore::ProcessSyncClient::broadcastAnotherOneToOtherProcesses):
* Source/WebCore/Scripts/tests/ProcessSyncClient.h:
* Source/WebCore/Scripts/tests/ProcessSyncData.h:
* Source/WebCore/Scripts/tests/ProcessSyncData.serialization.in:
* Source/WebCore/Scripts/tests/TestProcessSyncData.in:

* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:

* Source/WebCore/dom/Document.cpp:
(WebCore::Document::populateDocumentSyncDataForNewlyConstructedDocument):

* Source/WebCore/page/Frame.cpp:
(WebCore::Frame::Frame):
(WebCore::Frame::updateFrameTreeSyncData):
(WebCore::Frame::frameCanCreatePaymentSession const):
* Source/WebCore/page/Frame.h:
(WebCore::Frame::frameTreeSyncData):

* Source/WebCore/page/LocalFrame.cpp:
(WebCore::LocalFrame::LocalFrame):
(WebCore::LocalFrame::createMainFrame):
(WebCore::LocalFrame::createSubframe):
(WebCore::LocalFrame::createProvisionalSubframe):
(WebCore::LocalFrame::frameCanCreatePaymentSession const):
* Source/WebCore/page/LocalFrame.h:

* Source/WebCore/page/Page.cpp:
(WebCore::createMainFrame):
(WebCore::Page::Page):
(WebCore::Page::updateProcessSyncData):
* Source/WebCore/page/ProcessSyncData.in:

* Source/WebCore/page/RemoteFrame.cpp:
(WebCore::RemoteFrame::createMainFrame):
(WebCore::RemoteFrame::createSubframe):
(WebCore::RemoteFrame::createSubframeWithContentsInAnotherProcess):
(WebCore::RemoteFrame::RemoteFrame):
* Source/WebCore/page/RemoteFrame.h:

* Source/WebKit/Shared/FrameTreeCreationParameters.h:
* Source/WebKit/Shared/FrameTreeCreationParameters.serialization.in:

* Source/WebKit/UIProcess/RemotePageProxy.cpp:
(WebKit::RemotePageProxy::processDidTerminate):

* Source/WebKit/UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::didCommitLoad):
(WebKit::WebFrameProxy::frameTreeCreationParameters const):
(WebKit::WebFrameProxy::remoteProcessDidTerminate):
(WebKit::WebFrameProxy::calculateFrameTreeSyncData const):
(WebKit::WebFrameProxy::broadcastFrameTreeSyncData):
(WebKit::WebFrameProxy::notifyParentOfLoadCompletion):
* Source/WebKit/UIProcess/WebFrameProxy.h:

* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didFailProvisionalLoadForFrameShared):
(WebKit::WebPageProxy::observeAndCreateRemoteSubframesInOtherProcesses):
(WebKit::WebPageProxy::didFinishLoadForFrame):
(WebKit::WebPageProxy::didFailLoadForFrame):

* Source/WebKit/WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::createSubframe):
(WebKit::WebFrame::createRemoteSubframe):
(WebKit::WebFrame::loadDidCommitInAnotherProcess):
(WebKit::WebFrame::createProvisionalFrame):
* Source/WebKit/WebProcess/WebPage/WebFrame.h:

* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::m_textAnimationController):
(WebKit::WebPage::constructFrameTree):
(WebKit::WebPage::createRemoteSubframe):
(WebKit::WebPage::updateFrameTreeSyncData):
* Source/WebKit/WebProcess/WebPage/WebPage.h:
* Source/WebKit/WebProcess/WebPage/WebPage.messages.in:

* Source/WebKitLegacy/mac/WebView/WebFrame.mm:
(+[WebFrame _createFrameWithPage:frameName:frameView:ownerElement:]):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to