aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom
diff options
context:
space:
mode:
authoryodalee <lc85301@gmail.com>2015-02-03 21:39:24 +0800
committeryodalee <lc85301@gmail.com>2015-02-03 21:39:24 +0800
commit7f64c27a8fd997f97cd63f5995e91e454e2315c5 (patch)
treeeb6df27410dd930ea8b7548ae90c7c7dbfc78bf4 /components/script/dom
parent5f82780d3a517d2e6a2b2f25d2ec43a668516bcb (diff)
downloadservo-7f64c27a8fd997f97cd63f5995e91e454e2315c5.tar.gz
servo-7f64c27a8fd997f97cd63f5995e91e454e2315c5.zip
remove type match in is_instance_activatable
Diffstat (limited to 'components/script/dom')
-rw-r--r--components/script/dom/htmlbuttonelement.rs10
1 files changed, 3 insertions, 7 deletions
diff --git a/components/script/dom/htmlbuttonelement.rs b/components/script/dom/htmlbuttonelement.rs
index b0dd5d7c244..2f5496ee38b 100644
--- a/components/script/dom/htmlbuttonelement.rs
+++ b/components/script/dom/htmlbuttonelement.rs
@@ -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