mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Move webdriver actions commands to servoshell (#37669)
Move webdriver actions commands to servoshell. Testing: Test with webdriver enable in the CI [Test result 1](https://github.com/longvatrong111/servo/actions/runs/15875355256) [Test result 2](https://github.com/longvatrong111/servo/actions/runs/15875356595) [Test result 3](https://github.com/longvatrong111/servo/actions/runs/15875361886) Fixes: https://github.com/servo/servo/issues/37370 Signed-off-by: batu_hoang <longvatrong111@gmail.com>
This commit is contained in:
parent
9bd8d4f026
commit
940eff9497
12 changed files with 126 additions and 208 deletions
|
@ -792,22 +792,6 @@ impl WebViewRenderer {
|
|||
}));
|
||||
}
|
||||
|
||||
/// Push scroll pending event when receiving wheel action from webdriver
|
||||
pub(crate) fn on_webdriver_wheel_action(
|
||||
&mut self,
|
||||
scroll_delta: Vector2D<f32, DevicePixel>,
|
||||
point: Point2D<f32, DevicePixel>,
|
||||
) {
|
||||
if self.global.borrow().shutdown_state() != ShutdownState::NotShuttingDown {
|
||||
return;
|
||||
}
|
||||
|
||||
let scroll_location =
|
||||
ScrollLocation::Delta(LayoutVector2D::from_untyped(scroll_delta.to_untyped()));
|
||||
let cursor = DeviceIntPoint::new(point.x as i32, point.y as i32);
|
||||
self.on_scroll_window_event(scroll_location, cursor)
|
||||
}
|
||||
|
||||
/// Process pending scroll events for this [`WebViewRenderer`]. Returns a tuple containing:
|
||||
///
|
||||
/// - A boolean that is true if a zoom occurred.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue