mirror of
https://github.com/servo/servo.git
synced 2025-08-08 06:55:31 +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
|
@ -1468,6 +1468,9 @@ where
|
|||
)
|
||||
}
|
||||
},
|
||||
EmbedderToConstellationMessage::SetWebDriverResponseSender(sender) => {
|
||||
self.webdriver.input_command_response_sender = Some(sender);
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1850,7 +1853,6 @@ where
|
|||
.send(WebDriverCommandResponse { id: msg_id })
|
||||
.unwrap_or_else(|_| {
|
||||
warn!("Failed to send WebDriverInputComplete {:?}", msg_id);
|
||||
self.webdriver.input_command_response_sender = None;
|
||||
});
|
||||
} else {
|
||||
warn!("No WebDriver input_command_response_sender");
|
||||
|
@ -4616,14 +4618,7 @@ where
|
|||
}
|
||||
}
|
||||
},
|
||||
WebDriverCommandMsg::KeyboardAction(
|
||||
browsing_context_id,
|
||||
key_event,
|
||||
msg_id,
|
||||
response_sender,
|
||||
) => {
|
||||
self.webdriver.input_command_response_sender = Some(response_sender);
|
||||
|
||||
WebDriverCommandMsg::KeyboardAction(browsing_context_id, key_event, msg_id) => {
|
||||
let pipeline_id = match self.browsing_contexts.get(&browsing_context_id) {
|
||||
Some(browsing_context) => browsing_context.pipeline_id,
|
||||
None => {
|
||||
|
@ -4649,50 +4644,14 @@ where
|
|||
self.handle_send_error(pipeline_id, e)
|
||||
}
|
||||
},
|
||||
WebDriverCommandMsg::MouseButtonAction(
|
||||
webview_id,
|
||||
mouse_event_type,
|
||||
mouse_button,
|
||||
x,
|
||||
y,
|
||||
msg_id,
|
||||
response_sender,
|
||||
) => {
|
||||
self.webdriver.input_command_response_sender = Some(response_sender);
|
||||
|
||||
self.compositor_proxy
|
||||
.send(CompositorMsg::WebDriverMouseButtonEvent(
|
||||
webview_id,
|
||||
mouse_event_type,
|
||||
mouse_button,
|
||||
x,
|
||||
y,
|
||||
msg_id,
|
||||
));
|
||||
WebDriverCommandMsg::MouseButtonAction(..) => {
|
||||
unreachable!("This command should be send directly to the embedder.");
|
||||
},
|
||||
WebDriverCommandMsg::MouseMoveAction(webview_id, x, y, msg_id, response_sender) => {
|
||||
self.webdriver.input_command_response_sender = Some(response_sender);
|
||||
|
||||
self.compositor_proxy
|
||||
.send(CompositorMsg::WebDriverMouseMoveEvent(
|
||||
webview_id, x, y, msg_id,
|
||||
));
|
||||
WebDriverCommandMsg::MouseMoveAction(..) => {
|
||||
unreachable!("This command should be send directly to the embedder.");
|
||||
},
|
||||
WebDriverCommandMsg::WheelScrollAction(
|
||||
webview_id,
|
||||
x,
|
||||
y,
|
||||
delta_x,
|
||||
delta_y,
|
||||
msg_id,
|
||||
response_sender,
|
||||
) => {
|
||||
self.webdriver.input_command_response_sender = Some(response_sender);
|
||||
|
||||
self.compositor_proxy
|
||||
.send(CompositorMsg::WebDriverWheelScrollEvent(
|
||||
webview_id, x, y, delta_x, delta_y, msg_id,
|
||||
));
|
||||
WebDriverCommandMsg::WheelScrollAction(..) => {
|
||||
unreachable!("This command should be send directly to the embedder.");
|
||||
},
|
||||
WebDriverCommandMsg::TakeScreenshot(webview_id, rect, response_sender) => {
|
||||
self.compositor_proxy.send(CompositorMsg::CreatePng(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue