mirror of
https://github.com/servo/servo.git
synced 2025-08-02 04:00:32 +01:00
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:
parent
6ace7ad577
commit
f726737f24
9 changed files with 16 additions and 35 deletions
|
@ -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!(
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue