Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 050cd7e231dfd128deae7a194884e7879bb41cf9
https://github.com/WebKit/WebKit/commit/050cd7e231dfd128deae7a194884e7879bb41cf9
Author: Matt Woodrow <[email protected]>
Date: 2025-09-29 (Mon, 29 Sep 2025)
Changed paths:
M Source/WebCore/CMakeLists.txt
M Source/WebCore/DerivedSources-input.xcfilelist
M Source/WebCore/DerivedSources-output.xcfilelist
M Source/WebCore/DerivedSources.make
M Source/WebCore/Headers.cmake
M Source/WebCore/Scripts/generate-process-sync-data.py
M Source/WebCore/Sources.txt
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/dom/Document.cpp
M Source/WebCore/dom/Document.h
M Source/WebCore/loader/EmptyClients.cpp
A Source/WebCore/page/DocumentSyncData.in
A Source/WebCore/page/FrameTreeSyncData.in
M Source/WebCore/page/LocalFrame.cpp
M Source/WebCore/page/Page.cpp
M Source/WebCore/page/Page.h
M Source/WebCore/page/PageConfiguration.cpp
M Source/WebCore/page/PageConfiguration.h
R Source/WebCore/page/ProcessSyncData.in
M Source/WebKit/CMakeLists.txt
M Source/WebKit/DerivedSources-input.xcfilelist
M Source/WebKit/DerivedSources.make
M Source/WebKit/Scripts/webkit/messages.py
M Source/WebKit/Sources.txt
M Source/WebKit/UIProcess/WebPageProxy.cpp
M Source/WebKit/UIProcess/WebPageProxy.h
M Source/WebKit/UIProcess/WebPageProxy.messages.in
M Source/WebKit/WebKit.xcodeproj/project.pbxproj
A Source/WebKit/WebProcess/WebCoreSupport/WebDocumentSyncClient.cpp
A Source/WebKit/WebProcess/WebCoreSupport/WebDocumentSyncClient.h
R Source/WebKit/WebProcess/WebCoreSupport/WebProcessSyncClient.cpp
R Source/WebKit/WebProcess/WebCoreSupport/WebProcessSyncClient.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/WebView.mm
Log Message:
-----------
ProcessSyncClient doesn't have enough context to broadcast FrameTreeSyncData
changes.
https://bugs.webkit.org/show_bug.cgi?id=299139
<rdar://problem/160897245>
Reviewed by Alex Christensen.
ProcessSyncClient just receives the changed value, but doesn't know which Frame
it should be applied to in other processes.
The proposed solution here is to split ProcessSyncClient/ProcessSyncData so that
we have DocumentSyncClient and FrameTreeSyncClient.
This is acheived by changing the generator script to just generate a single
client/data output (with the 'Document'/'FrameTree' prefix passed as a
parameter), and then run it twice, with separate *.in files.
The change should largely be a functional no-op, except for the addition of
MESSAGE_CHECKS in WebPageProxy.
'DocumentSyncData' is kept for all Documents, but WebDocumentSyncClient is only
instantiated per-page to broadcast changes to the sync data for the
top-document. I did some renaming using the 'TopDocument' prefix at the
WebKit-level to try clarify that somewhat.
The next step here is to have WebKit implement a WebFrameTreeSyncClient, and
provide one for every Frame (possibly by super-classing an existing Client?).
With that, and the matching broadcastX(FrameIdentifier, value) IPC messages, we
should have working mutations of FrameTreeSyncData within a web process.
* Source/WebCore/CMakeLists.txt:
* Source/WebCore/DerivedSources-input.xcfilelist:
* Source/WebCore/DerivedSources-output.xcfilelist:
* Source/WebCore/DerivedSources.make:
* Source/WebCore/Headers.cmake:
* Source/WebCore/Scripts/generate-process-sync-data.py:
(SyncedData.__init__):
(generate_process_sync_client_header):
(generate_process_sync_client_impl):
(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_process_sync_data_header.ProcessSyncDataType): Deleted.
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/dom/Document.cpp:
(WebCore::m_syncData):
(WebCore::Document::populateDocumentSyncDataForNewlyConstructedDocument):
* Source/WebCore/dom/Document.h:
* Source/WebCore/loader/EmptyClients.cpp:
(WebCore::pageConfigurationWithEmptyClients):
* Source/WebCore/page/DocumentSyncData.in: Renamed from
Source/WebCore/page/ProcessSyncData.in.
* Source/WebCore/page/FrameTreeSyncData.in: Added.
* Source/WebCore/page/LocalFrame.cpp:
* Source/WebCore/page/Page.cpp:
(WebCore::Page::Page):
(WebCore::Page::setMainFrameURLAndOrigin):
(WebCore::Page::setIsClosing):
(WebCore::Page::setAudioSessionType):
(WebCore::Page::setUserDidInteractWithPage):
(WebCore::Page::setAutofocusProcessed):
(WebCore::Page::setHasInjectedUserScript):
(WebCore::Page::updateTopDocumentSyncData):
(WebCore::Page::didChangeMainDocument):
(WebCore::Page::updateProcessSyncData): Deleted.
* Source/WebCore/page/Page.h:
(WebCore::Page::documentSyncClient):
(WebCore::Page::documentSyncClient const):
(WebCore::Page::processSyncClient): Deleted.
(WebCore::Page::processSyncClient const): Deleted.
* Source/WebCore/page/PageConfiguration.cpp:
(WebCore::PageConfiguration::PageConfiguration):
* Source/WebCore/page/PageConfiguration.h:
* Source/WebKit/DerivedSources-input.xcfilelist:
* Source/WebKit/DerivedSources.make:
* Source/WebKit/Scripts/webkit/messages.py:
(headers_for_type):
* Source/WebKit/Sources.txt:
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::broadcastDocumentSyncData):
(WebKit::WebPageProxy::broadcastAllDocumentSyncData):
(WebKit::WebPageProxy::broadcastProcessSyncData): Deleted.
(WebKit::WebPageProxy::broadcastTopDocumentSyncData): Deleted.
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/UIProcess/WebPageProxy.messages.in:
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:
* Source/WebKit/WebProcess/WebCoreSupport/WebDocumentSyncClient.cpp: Renamed
from Source/WebKit/WebProcess/WebCoreSupport/WebProcessSyncClient.cpp.
(WebKit::WebDocumentSyncClient::WebDocumentSyncClient):
(WebKit::WebDocumentSyncClient::protectedPage const):
(WebKit::WebDocumentSyncClient::siteIsolationEnabled):
(WebKit::WebDocumentSyncClient::broadcastDocumentSyncDataToOtherProcesses):
(WebKit::WebDocumentSyncClient::broadcastAllDocumentSyncDataToOtherProcesses):
* Source/WebKit/WebProcess/WebCoreSupport/WebDocumentSyncClient.h: Renamed from
Source/WebKit/WebProcess/WebCoreSupport/WebProcessSyncClient.h.
* Source/WebKit/WebProcess/WebCoreSupport/WebPermissionController.cpp:
(WebKit::WebPermissionController::query):
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::m_toolbarsAreVisible):
(WebKit::WebPage::topDocumentSyncDataChangedInAnotherProcess):
(WebKit::WebPage::allTopDocumentSyncDataChangedInAnotherProcess):
(WebKit::WebPage::processSyncDataChangedInAnotherProcess): Deleted.
* Source/WebKit/WebProcess/WebPage/WebPage.h:
* Source/WebKit/WebProcess/WebPage/WebPage.messages.in:
* Source/WebKitLegacy/mac/WebView/WebView.mm:
(-[WebView _commonInitializationWithFrameName:groupName:]):
(-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]):
Canonical link: https://commits.webkit.org/300728@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes