Reduce redundancy in servoshell webdriver message forwarding and add log for script::handle_send_keys_non_typeable (#38238)

There was a new commit for after
https://github.com/servo/servo/pull/38189#discussion_r2224805172, but
that does not seem to update/stop MQ.
Also removed `forward_webdriver_command` in servoshell according to
https://github.com/servo/servo/pull/38212#discussion_r2221854327.

---------

Signed-off-by: Euclid Ye <euclid.ye@huawei.com>
This commit is contained in:
Euclid Ye 2025-07-24 12:22:04 +08:00 committed by GitHub
parent 6ace7ad577
commit f726737f24
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 16 additions and 35 deletions

View file

@ -520,7 +520,6 @@ impl HTMLInputElement {
self.input_type.get()
}
#[inline]
/// <https://w3c.github.io/webdriver/#dfn-non-typeable-form-control>
pub(crate) fn is_nontypeable(&self) -> bool {
matches!(

View file

@ -532,7 +532,7 @@ pub(crate) fn handle_execute_script(
};
if reply.send(result).is_err() {
info!("Webdriver might already be released by embedder before reply is sent");
error!("Webdriver might already be released by embedder before reply is sent");
};
},
None => {
@ -540,7 +540,7 @@ pub(crate) fn handle_execute_script(
.send(Err(WebDriverJSError::BrowsingContextNotFound))
.is_err()
{
info!("Webdriver might already be released by embedder before reply is sent");
error!("Webdriver might already be released by embedder before reply is sent");
};
},
}
@ -1120,7 +1120,11 @@ fn handle_send_keys_non_typeable(
}
// Step 3. Set a property value to text on element.
if input_element.SetValue(text.into(), can_gc).is_err() {
if let Err(error) = input_element.SetValue(text.into(), can_gc) {
error!(
"Failed to set value on non-typeable input element: {:?}",
error
);
return Err(ErrorStatus::UnknownError);
}