mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
clippy: Fix option_map_unit_fn warnings (#31906)
This commit is contained in:
parent
a5bcae212a
commit
da76ebabe9
11 changed files with 43 additions and 30 deletions
|
@ -2832,18 +2832,20 @@ impl Activatable for HTMLInputElement {
|
|||
// https://html.spec.whatwg.org/multipage/#submit-button-state-(type=submit):activation-behavior
|
||||
// FIXME (Manishearth): support document owners (needs ability to get parent browsing context)
|
||||
// Check if document owner is fully active
|
||||
self.form_owner().map(|o| {
|
||||
if let Some(o) = self.form_owner() {
|
||||
o.submit(
|
||||
SubmittedFrom::NotFromForm,
|
||||
FormSubmitter::InputElement(self),
|
||||
)
|
||||
});
|
||||
}
|
||||
},
|
||||
InputType::Reset => {
|
||||
// https://html.spec.whatwg.org/multipage/#reset-button-state-(type=reset):activation-behavior
|
||||
// FIXME (Manishearth): support document owners (needs ability to get parent browsing context)
|
||||
// Check if document owner is fully active
|
||||
self.form_owner().map(|o| o.reset(ResetFrom::NotFromForm));
|
||||
if let Some(o) = self.form_owner() {
|
||||
o.reset(ResetFrom::NotFromForm)
|
||||
}
|
||||
},
|
||||
InputType::Checkbox | InputType::Radio => {
|
||||
// https://html.spec.whatwg.org/multipage/#checkbox-state-(type=checkbox):activation-behavior
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue