mirror of
https://github.com/servo/servo.git
synced 2025-06-06 00:25:37 +00:00
fix lint error
Signed-off-by: PotatoCP <kenzieradityatirtarahardja18@gmail.com>
This commit is contained in:
parent
a3d88a93c0
commit
c12e21bf3a
1 changed files with 4 additions and 12 deletions
|
@ -846,17 +846,9 @@ pub(crate) fn handle_send_keys_setup(
|
|||
reply
|
||||
.send(
|
||||
find_node_by_unique_id(documents, pipeline, element_id).and_then(|node| {
|
||||
let file_input = {
|
||||
if let Some(input_element) = node.downcast::<HTMLInputElement>() {
|
||||
if input_element.input_type() == InputType::File {
|
||||
Some(input_element)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
} else {
|
||||
None
|
||||
}
|
||||
};
|
||||
let file_input = node
|
||||
.downcast::<HTMLInputElement>()
|
||||
.filter(|&input_element| input_element.input_type() == InputType::File);
|
||||
|
||||
if file_input.is_none() || strict_file_interactability {
|
||||
match node.downcast::<HTMLElement>() {
|
||||
|
@ -883,7 +875,7 @@ pub(crate) fn handle_send_keys_setup(
|
|||
|
||||
// TODO: Check non-typeable form control
|
||||
|
||||
return Ok(true);
|
||||
Ok(true)
|
||||
}),
|
||||
)
|
||||
.unwrap();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue