aboutsummaryrefslogtreecommitdiffstats
path: root/components/shared/embedder/webdriver.rs
diff options
context:
space:
mode:
authorDelan Azabani <dazabani@igalia.com>2025-03-06 02:47:13 +0800
committerGitHub <noreply@github.com>2025-03-05 18:47:13 +0000
commit69e749947910480e97ffaf22031316ebe7f67b9c (patch)
tree27e3a28bf12adbae06221e9219b60aaa356e94db /components/shared/embedder/webdriver.rs
parent16aeeaec85ec1eef985224fae8f38aa31f0eb22b (diff)
downloadservo-69e749947910480e97ffaf22031316ebe7f67b9c.tar.gz
servo-69e749947910480e97ffaf22031316ebe7f67b9c.zip
compositor: Make input event handling per-WebView (#35716)
This is another step in the move to having a per-WebView renderer. In this step event handling is made per-WebView. Most events sent to Servo are sent via the WebView API already, so this just moves more event handling code to the per-WebView render portion of the compositor. - ServoRenderer is given shared ownership and interior mutability as it is now shared among all WebView(Renderers). - Some messages coming from other parts of Servo must now carry a WebViewId as well so that they can be associated with a particular WebView. - There needs to be some reorganization of `ServoRenderer` in order to avoid issues with double borrow of `RefCells`. Signed-off-by: Delan Azabani <dazabani@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
Diffstat (limited to 'components/shared/embedder/webdriver.rs')
-rw-r--r--components/shared/embedder/webdriver.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/shared/embedder/webdriver.rs b/components/shared/embedder/webdriver.rs
index 1da996038a8..349a45edf1b 100644
--- a/components/shared/embedder/webdriver.rs
+++ b/components/shared/embedder/webdriver.rs
@@ -41,9 +41,9 @@ pub enum WebDriverCommandMsg {
/// Act as if keys were pressed or release in the browsing context with the given ID.
KeyboardAction(BrowsingContextId, KeyboardEvent),
/// Act as if the mouse was clicked in the browsing context with the given ID.
- MouseButtonAction(MouseButtonAction, MouseButton, f32, f32),
+ MouseButtonAction(WebViewId, MouseButtonAction, MouseButton, f32, f32),
/// Act as if the mouse was moved in the browsing context with the given ID.
- MouseMoveAction(f32, f32),
+ MouseMoveAction(WebViewId, f32, f32),
/// Set the window size.
SetWindowSize(WebViewId, DeviceIntSize, IpcSender<Size2D<f32, CSSPixel>>),
/// Take a screenshot of the window.