Skip to content

Truly independent web browser

WebContent: Make the test request for system focus synchronous

Luke Wilde430a49b57695
diff --git a/Services/WebContent/PageClient.cpp b/Services/WebContent/PageClient.cpp
index 84227b89ecc..6fef8477297 100644
--- a/Services/WebContent/PageClient.cpp
+++ b/Services/WebContent/PageClient.cpp
@@ -1737,7 +1737,8 @@ void PageClient::page_did_set_session_history_entry_document_state_reload_pendin
void PageClient::page_did_request_set_system_focus(bool has_system_focus)
{
- client().async_did_request_set_system_focus(m_id, has_system_focus);
+ // Synchronous, so that the UI process has the new focus before input the test sends next over the test connection.
+ client().did_request_set_system_focus(m_id, has_system_focus);
}
void PageClient::page_did_change_focused_navigable(Web::HTML::CrossProcessId navigable_id)
diff --git a/Services/WebContent/WebContentClient.ipc b/Services/WebContent/WebContentClient.ipc
index 753f4e809d5..0e93a547149 100644
--- a/Services/WebContent/WebContentClient.ipc
+++ b/Services/WebContent/WebContentClient.ipc
@@ -258,7 +258,7 @@ endpoint WebContentClient routed by Web::PageId page_id
did_update_session_history_entry_scroll_restoration_mode(Web::PageId page_id, Web::HTML::CrossProcessId navigable_id, Web::HTML::SessionHistoryEntryIdentity entry_identity, Web::HTML::ScrollRestorationMode scroll_restoration_mode) =|
did_update_session_history_entry_document_state_navigable_target_name(Web::PageId page_id, Web::HTML::CrossProcessId navigable_id, Web::HTML::SessionHistoryEntryIdentity entry_identity, Utf16String navigable_target_name) =|
did_set_session_history_entry_document_state_reload_pending(Web::PageId page_id, Web::HTML::CrossProcessId navigable_id, Utf16String navigation_api_key, bool reload_pending) =|
- did_request_set_system_focus(Web::PageId page_id, bool has_system_focus) =|
+ did_request_set_system_focus(Web::PageId page_id, bool has_system_focus) => ()
did_change_focused_navigable(Web::PageId page_id, Web::HTML::CrossProcessId navigable_id) =|
did_request_key_event_for_testing(Web::PageId page_id, Web::KeyEvent event) =|
did_request_spelling_menu_action_for_testing(Web::PageId page_id, Web::SpellingMenuActionForTesting action, u32 guess_index) =|