mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Remove unnecessary checks
This commit is contained in:
parent
82386953b9
commit
15376d031d
1 changed files with 0 additions and 13 deletions
|
@ -2736,13 +2736,6 @@ impl Activatable for HTMLInputElement {
|
|||
|
||||
// https://dom.spec.whatwg.org/#eventtarget-legacy-pre-activation-behavior
|
||||
fn legacy_pre_activation_behavior(&self) -> Option<InputActivationState> {
|
||||
if !self.is_mutable() &&
|
||||
self.input_type() != InputType::Checkbox &&
|
||||
self.input_type() != InputType::Radio
|
||||
{
|
||||
return None;
|
||||
}
|
||||
|
||||
let ty = self.input_type();
|
||||
match ty {
|
||||
InputType::Checkbox => {
|
||||
|
@ -2777,12 +2770,6 @@ impl Activatable for HTMLInputElement {
|
|||
// https://dom.spec.whatwg.org/#eventtarget-legacy-canceled-activation-behavior
|
||||
fn legacy_canceled_activation_behavior(&self, cache: Option<InputActivationState>) {
|
||||
// Step 1
|
||||
if !self.is_mutable() &&
|
||||
self.input_type() != InputType::Checkbox &&
|
||||
self.input_type() != InputType::Radio
|
||||
{
|
||||
return;
|
||||
}
|
||||
let ty = self.input_type();
|
||||
let cache = match cache {
|
||||
Some(cache) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue