mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-10 05:02:54 +00:00
WebContent+LibWebView: Consolidate the way browsers connect to WebDriver
Currently, on Serenity, we connect to WebDriver from the browser-side of the WebContent connection for both Browser and headless-browser. On Lagom, we connect from within the WebContent process itself, signaled by a command line flag. This patch changes Lagom browsers to connect to WebDriver the same way that Serenity browsers do. This will ensure we can do other initializers in the same order across all platforms and browsers.
This commit is contained in:
parent
3a7257c9fe
commit
700ad6bf35
Notes:
sideshowbarker
2024-07-17 16:23:55 +09:00
Author: https://github.com/trflynn89
Commit: 700ad6bf35
Pull-request: https://github.com/SerenityOS/serenity/pull/17882
Reviewed-by: https://github.com/linusg ✅
7 changed files with 19 additions and 20 deletions
|
@ -603,7 +603,7 @@ void WebContentView::create_client()
|
|||
m_client_state = {};
|
||||
|
||||
auto candidate_web_content_paths = get_paths_for_helper_process("WebContent"sv).release_value_but_fixme_should_propagate_errors();
|
||||
auto new_client = launch_web_content_process(candidate_web_content_paths, m_webdriver_content_ipc_path).release_value_but_fixme_should_propagate_errors();
|
||||
auto new_client = launch_web_content_process(candidate_web_content_paths).release_value_but_fixme_should_propagate_errors();
|
||||
|
||||
m_web_content_notifier.setSocket(new_client->socket().fd().value());
|
||||
m_web_content_notifier.setEnabled(true);
|
||||
|
@ -636,6 +636,9 @@ void WebContentView::create_client()
|
|||
|
||||
// FIXME: Get the screen rect.
|
||||
// client().async_update_screen_rects(GUI::Desktop::the().rects(), GUI::Desktop::the().main_screen_index());
|
||||
|
||||
if (!m_webdriver_content_ipc_path.is_empty())
|
||||
client().async_connect_to_webdriver(m_webdriver_content_ipc_path);
|
||||
}
|
||||
|
||||
void WebContentView::handle_web_content_process_crash()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue