From 606299563668b44f0a0b4593790324d776ffb2a5 Mon Sep 17 00:00:00 2001 From: Martin Robinson Date: Mon, 24 Feb 2025 14:57:28 +0100 Subject: libservo: Move WebDriver messages to the `embedder` crate (#35602) This is the first step toward moving the WebDriver implementation to servoshell. This move will make it possible to start testing the embedding API with WebDriver. See [this zulip thread][a] for more details. While WebDriver will be able to use a lot of API commands to do what it is doing now, there will still need to be some "cheat codes" for more gnarly access to `ScriptThread` details. That's why we likely won't be able to remove all WebDriver-specific messages from the API -- but maybe they will be useful for embedders somehow. A couple messages have to change as they depended on `script_traits` types, particularly those that used `WindowSizeData` and `LoadData`. I think this helps to encapsulate the WebDriver commands a bit more though. [a]: https://servo.zulipchat.com/#narrow/channel/437943-embedding/topic/webdriver.20as.20embedding.20api.20playgound Signed-off-by: Martin Robinson --- components/script/script_thread.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'components/script/script_thread.rs') diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs index 34b212ed9fb..e0998db7b2b 100644 --- a/components/script/script_thread.rs +++ b/components/script/script_thread.rs @@ -45,7 +45,9 @@ use devtools_traits::{ CSSError, DevtoolScriptControlMsg, DevtoolsPageInfo, NavigationState, ScriptToDevtoolsControlMsg, WorkerId, }; -use embedder_traits::{EmbedderMsg, InputEvent, MediaSessionActionType, Theme}; +use embedder_traits::{ + EmbedderMsg, InputEvent, MediaSessionActionType, Theme, WebDriverScriptCommand, +}; use euclid::default::Rect; use fonts::{FontContext, SystemFontServiceProxy}; use headers::{HeaderMapExt, LastModified, ReferrerPolicy as ReferrerPolicyHeader}; @@ -77,7 +79,6 @@ use profile_traits::time_profile; use script_layout_interface::{ node_id_from_scroll_id, LayoutConfig, LayoutFactory, ReflowGoal, ScriptThreadFactory, }; -use script_traits::webdriver_msg::WebDriverScriptCommand; use script_traits::{ ConstellationInputEvent, DiscardBrowsingContext, DocumentActivity, EventResult, InitialScriptState, JsEvalResult, LoadData, LoadOrigin, NavigationHistoryBehavior, -- cgit v1.2.3