[webkit-changes] [WebKit/WebKit] 3c6899: Add `DocumentSyncData` to process sync data machin...

Brady Eidson noreply at github.com
Wed Dec 11 19:05:39 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 3c6899ca1a461716192c9dd3c2c0f7ce012c8f88
      https://github.com/WebKit/WebKit/commit/3c6899ca1a461716192c9dd3c2c0f7ce012c8f88
  Author: Brady Eidson <beidson at apple.com>
  Date:   2024-12-11 (Wed, 11 Dec 2024)

  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/audiosession/DOMAudioSession.cpp
    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.h
    M Source/WebCore/page/LocalFrame.cpp
    M Source/WebCore/page/Page.cpp
    M Source/WebCore/page/Page.h
    M Source/WebCore/page/ProcessSyncData.in
    M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in

  Log Message:
  -----------
  Add `DocumentSyncData` to process sync data machinery, and make first use of it for audio session
rdar://141294171
https://bugs.webkit.org/show_bug.cgi?id=284474

Reviewed by Alex Christensen.

This patch adds a `DocumentSyncData` object - to be stored on Page - that is a stand-in for all
data that used to be stored on the topDocument().

It adds capabilities to generate-process-sync-data.py to enable:
- Data types to opt-in to being part of "DocumentSyncData"
- Data types to have a compile-time conditional
- Data types to specify their associated required header instead of throwing it into a global set

Most of the magic is in the generated code, as evidence by how little of the hand written code
had to change to support this.

* Source/WebCore/CMakeLists.txt:
* Source/WebCore/DerivedSources-output.xcfilelist:
* Source/WebCore/DerivedSources.make:
* Source/WebCore/Headers.cmake:
* Source/WebCore/Modules/audiosession/DOMAudioSession.cpp:
(WebCore::DOMAudioSession::setType):
(WebCore::DOMAudioSession::type const):
* Source/WebCore/Scripts/generate-process-sync-data.py:
(SyncedData.__init__):
(sorted_headers_from_datas):
(parse_process_sync_data):
(generate_process_sync_client_header):
(generate_process_sync_client_impl):
(sorted_qualified_types):
(generate_process_sync_data_header):
(generate_document_synched_data_header):
(generate_document_synched_data_impl):
(generate_process_sync_data_serialiation_in):
(main):
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/dom/Document.h:
(WebCore::Document::setAudioSessionType): Deleted.
(WebCore::Document::audioSessionType const): Deleted.
* Source/WebCore/page/LocalFrame.cpp:
(WebCore::LocalFrame::documentURLDidChange):
* Source/WebCore/page/Page.cpp:
(WebCore::m_documentSyncData):
(WebCore::Page::setMainFrameURLInternal):
(WebCore::Page::setMainFrameURL):
(WebCore::Page::setAudioSessionType):
(WebCore::Page::audioSessionType const):
(WebCore::Page::updateProcessSyncData):
(WebCore::m_activeNowPlayingSessionUpdateTimer): Deleted.
* Source/WebCore/page/Page.h:
* Source/WebCore/page/ProcessSyncData.in:
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:

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



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list