[webkit-changes] [WebKit/WebKit] f8feef: Autogenerate syncing of `IsAutofocusProcessed` and...
Brady Eidson
noreply at github.com
Fri Dec 13 15:24:04 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: f8feef1a83396879cc2755f94cb25c2871fd0a27
https://github.com/WebKit/WebKit/commit/f8feef1a83396879cc2755f94cb25c2871fd0a27
Author: Brady Eidson <beidson at apple.com>
Date: 2024-12-13 (Fri, 13 Dec 2024)
Changed paths:
M Source/WebCore/Scripts/generate-process-sync-data.py
M Source/WebCore/dom/Document.cpp
M Source/WebCore/dom/Document.h
M Source/WebCore/dom/Element.cpp
M Source/WebCore/dom/UserGestureIndicator.cpp
M Source/WebCore/html/HTMLDialogElement.cpp
M Source/WebCore/html/HTMLElement.cpp
M Source/WebCore/loader/FrameLoader.cpp
M Source/WebCore/page/EventHandler.cpp
M Source/WebCore/page/Page.cpp
M Source/WebCore/page/Page.h
M Source/WebCore/page/ProcessSyncData.in
Log Message:
-----------
Autogenerate syncing of `IsAutofocusProcessed` and `UserDidInteractWithPage` data
rdar://141378639
https://bugs.webkit.org/show_bug.cgi?id=284573
Reviewed by Alex Christensen.
Adding these two types at the same time exposed the next issue that needed to be solved
in the generator script - having multiple copies of the same type in the variant.
We handle this by:
1 - Switching from direct initialization of the variant to using emplace() with an index
2 - Switching from std::get<type> to std::get<(integer index>)
3 - Giving explicit integer values to the `enum class` member that aligns with the type's index
* 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_document_synched_data_header):
(generate_document_synched_data_impl):
(generate_process_sync_data_serialiation_in):
(sort_datas_for_variant_order):
(main):
(sorted_qualified_types): Deleted.
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::noteUserInteractionWithMediaElement):
(WebCore::Document::flushAutofocusCandidates):
* Source/WebCore/dom/Document.h:
(WebCore::Document::isAutofocusProcessed const): Deleted.
(WebCore::Document::setAutofocusProcessed): Deleted.
(WebCore::Document::setUserDidInteractWithPage): Deleted.
(WebCore::Document::userDidInteractWithPage const): Deleted.
* Source/WebCore/dom/Element.cpp:
(WebCore::shouldAutofocus):
* Source/WebCore/dom/UserGestureIndicator.cpp:
* Source/WebCore/html/HTMLDialogElement.cpp:
(WebCore::HTMLDialogElement::runFocusingSteps):
* Source/WebCore/html/HTMLElement.cpp:
(WebCore::runPopoverFocusingSteps):
* Source/WebCore/loader/FrameLoader.cpp:
(WebCore::shouldAskForNavigationConfirmation):
* Source/WebCore/page/EventHandler.cpp:
(WebCore::EventHandler::keyEvent):
* Source/WebCore/page/Page.cpp:
(WebCore::Page::setUserDidInteractWithPage):
(WebCore::Page::userDidInteractWithPage const):
(WebCore::Page::setAutofocusProcessed):
(WebCore::Page::autofocusProcessed const):
(WebCore::Page::updateProcessSyncData):
* Source/WebCore/page/Page.h:
* Source/WebCore/page/ProcessSyncData.in:
Canonical link: https://commits.webkit.org/287820@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