Skip to content

Commit

Permalink
remove type match in is_instance_activatable
Browse files Browse the repository at this point in the history
  • Loading branch information
yodalee committed Feb 3, 2015
1 parent 5f82780 commit 7f64c27
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions components/script/dom/htmlbuttonelement.rs
Expand Up @@ -185,13 +185,9 @@ impl<'a> Activatable for JSRef<'a, HTMLButtonElement> {
}

fn is_instance_activatable(&self) -> bool {
match self.button_type.get() {
//https://html.spec.whatwg.org/multipage/forms.html#the-button-element
_ => {
let node: JSRef<Node> = NodeCast::from_ref(*self);
!(node.get_disabled_state())
}
}
//https://html.spec.whatwg.org/multipage/forms.html#the-button-element
let node: JSRef<Node> = NodeCast::from_ref(*self);
!(node.get_disabled_state())
}

// https://html.spec.whatwg.org/multipage/interaction.html#run-pre-click-activation-steps
Expand Down

4 comments on commit 7f64c27

@bors-servo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from jdm
at yodalee@7f64c27

@bors-servo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging yodalee/servo/issue4534-form-submission-for-button-elements = 7f64c27 into auto

@bors-servo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yodalee/servo/issue4534-form-submission-for-button-elements = 7f64c27 merged ok, testing candidate = 5a6f598

@bors-servo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.