mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
webdriver: Evaluate script commands via the WebView
API in servoshell (#37663)
Let `WebDriverCommandMsg::ScriptCommand` goes through embedder first. Give `embedder` the ability to release `webdriver` from waiting for a response of `ExecuteScript`. Tests: https://github.com/longvatrong111/servo/actions/runs/16071375821 No regression compared to CI run on main branch. Fixes: https://github.com/servo/servo/issues/37370 cc: @xiaochengh --------- Signed-off-by: batu_hoang <longvatrong111@gmail.com> Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
562d9e4a21
commit
4499fdeb2b
14 changed files with 75 additions and 150 deletions
|
@ -726,10 +726,10 @@ impl Handler {
|
|||
if let VerifyBrowsingContextIsOpen::Yes = verify {
|
||||
self.verify_browsing_context_is_open(browsing_context_id)?;
|
||||
}
|
||||
let msg = EmbedderToConstellationMessage::WebDriverCommand(
|
||||
WebDriverCommandMsg::ScriptCommand(browsing_context_id, cmd_msg),
|
||||
);
|
||||
self.constellation_chan.send(msg).unwrap();
|
||||
self.send_message_to_embedder(WebDriverCommandMsg::ScriptCommand(
|
||||
browsing_context_id,
|
||||
cmd_msg,
|
||||
))?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -746,10 +746,10 @@ impl Handler {
|
|||
self.verify_top_level_browsing_context_is_open(webview_id)?;
|
||||
}
|
||||
let browsing_context_id = BrowsingContextId::from(webview_id);
|
||||
let msg = EmbedderToConstellationMessage::WebDriverCommand(
|
||||
WebDriverCommandMsg::ScriptCommand(browsing_context_id, cmd_msg),
|
||||
);
|
||||
self.constellation_chan.send(msg).unwrap();
|
||||
self.send_message_to_embedder(WebDriverCommandMsg::ScriptCommand(
|
||||
browsing_context_id,
|
||||
cmd_msg,
|
||||
))?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue