LibWeb+WebContent+WebDriver+UI: Make window rect updates asynchronous

It's currently possible for window size/position updates to hang, as the
underlying IPCs are synchronous. This updates the WebDriver endpoint to
be async, to unblock the WebContent process while the update is ongoing.
The UI process is now responsible for informing WebContent when the
update is complete.
This commit is contained in:
Timothy Flynn 2024-10-28 23:37:11 -04:00 committed by Tim Ledbetter
commit fa83cc722c
Notes: github-actions[bot] 2024-10-29 11:04:46 +00:00
22 changed files with 94 additions and 43 deletions

View file

@ -209,6 +209,13 @@ Web::WebDriver::Response Session::navigate_to(JsonValue payload) const
});
}
Web::WebDriver::Response Session::set_window_rect(JsonValue payload) const
{
return perform_async_action(web_content_connection().on_window_rect_updated, [&]() {
return web_content_connection().set_window_rect(move(payload));
});
}
Web::WebDriver::Response Session::execute_script(JsonValue payload, ScriptMode mode) const
{
return perform_async_action(web_content_connection().on_script_executed, [&]() {