remove type match in is_instance_activatable

This commit is contained in:
yodalee 2015-02-03 21:39:24 +08:00
parent 5f82780d3a
commit 7f64c27a8f

View file

@ -185,13 +185,9 @@ impl<'a> Activatable for JSRef<'a, HTMLButtonElement> {
} }
fn is_instance_activatable(&self) -> bool { fn is_instance_activatable(&self) -> bool {
match self.button_type.get() { //https://html.spec.whatwg.org/multipage/forms.html#the-button-element
//https://html.spec.whatwg.org/multipage/forms.html#the-button-element let node: JSRef<Node> = NodeCast::from_ref(*self);
_ => { !(node.get_disabled_state())
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 // https://html.spec.whatwg.org/multipage/interaction.html#run-pre-click-activation-steps