Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: f6a87862c44de5e1ce311bb7064af66428b40d48
https://github.com/WebKit/WebKit/commit/f6a87862c44de5e1ce311bb7064af66428b40d48
Author: Brady Eidson <[email protected]>
Date: 2024-12-17 (Tue, 17 Dec 2024)
Changed paths:
M Source/WebCore/Scripts/generate-process-sync-data.py
M Source/WebCore/Scripts/tests/DocumentSyncData.cpp
M Source/WebCore/Scripts/tests/DocumentSyncData.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/dom/Document.cpp
M Source/WebCore/dom/Document.h
M Source/WebCore/page/Page.cpp
M Source/WebCore/page/Page.h
M Source/WebKit/UIProcess/WebPageProxy.cpp
M Source/WebKit/UIProcess/WebPageProxy.h
M Source/WebKit/UIProcess/WebPageProxy.messages.in
M Source/WebKit/WebProcess/WebCoreSupport/WebProcessSyncClient.cpp
M 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
Log Message:
-----------
on Make DocumentSyncData RefCounted, and have Page objects reference the main
document copy
rdar://141587316
https://bugs.webkit.org/show_bug.cgi?id=284792
Reviewed by Alex Christensen.
This page makes DocumentSyncData RefCounted, and Documents always ref() their
own copy.
Pages used to clear out their `m_topDocumentSyncData` member whenever the main
document changed.
Now - whenever the main document changes - the Page will ref() its copy instead.
This easily propagates existing data from the new top document into the Pages
concept of that data.
It also allows us to broadcast the entire DocumentSyncData to all other
processes at the point in
time that the main document changes.
* Source/WebCore/Scripts/generate-process-sync-data.py:
(generate_process_sync_client_impl):
(generate_process_sync_data_header):
(generate_document_synched_data_header):
(generate_document_synched_data_impl):
(generate_process_sync_data_serialiation_in):
(generate_process_sync_data_serialiation_in.WebCore):
(sort_data_lists):
(sort_datas_for_variant_order):
(sort_datas_for_document_sync_data_order):
(main):
* Source/WebCore/Scripts/tests/DocumentSyncData.cpp:
(WebCore::DocumentSyncData::update):
(WebCore::DocumentSyncData::DocumentSyncData):
* Source/WebCore/Scripts/tests/DocumentSyncData.h:
(WebCore::DocumentSyncData::create):
* Source/WebCore/Scripts/tests/ProcessSyncClient.cpp:
(WebCore::ProcessSyncClient::broadcastAudioSessionTypeToOtherProcesses):
(WebCore::ProcessSyncClient::broadcastMainFrameURLChangeToOtherProcesses):
(WebCore::ProcessSyncClient::broadcastUserDidInteractWithPageToOtherProcesses):
(WebCore::ProcessSyncClient::broadcastIsAutofocusProcessedToOtherProcesses):
* Source/WebCore/Scripts/tests/ProcessSyncClient.h:
(WebCore::ProcessSyncClient::broadcastTopDocumentSyncDataToOtherProcesses):
* Source/WebCore/Scripts/tests/ProcessSyncData.h:
* Source/WebCore/Scripts/tests/ProcessSyncData.serialization.in:
* Source/WebCore/dom/Document.cpp:
(WebCore::m_syncData):
(WebCore::m_frameIdentifier): Deleted.
* Source/WebCore/dom/Document.h:
(WebCore::Document::syncData):
* Source/WebCore/page/Page.cpp:
(WebCore::Page::updateTopDocumentSyncData):
(WebCore::Page::hasLocalMainFrame):
(WebCore::Page::didChangeMainDocument):
* Source/WebCore/page/Page.h:
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::broadcastTopDocumentSyncData):
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/UIProcess/WebPageProxy.messages.in:
* Source/WebKit/WebProcess/WebCoreSupport/WebProcessSyncClient.cpp:
(WebKit::WebProcessSyncClient::broadcastTopDocumentSyncDataToOtherProcesses):
* Source/WebKit/WebProcess/WebCoreSupport/WebProcessSyncClient.h:
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::processSyncDataChangedInAnotherProcess):
(WebKit::WebPage::topDocumentSyncDataChangedInAnotherProcess):
* Source/WebKit/WebProcess/WebPage/WebPage.h:
* Source/WebKit/WebProcess/WebPage/WebPage.messages.in:
Canonical link: https://commits.webkit.org/287960@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