Skip to content

Commit

Permalink
Remove unnecessary checks
Browse files Browse the repository at this point in the history
  • Loading branch information
ghostd committed Sep 24, 2020
1 parent 8238695 commit 15376d0
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions components/script/dom/htmlinputelement.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {
Expand Down Expand Up @@ -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) => {
Expand Down

0 comments on commit 15376d0

Please sign in to comment.