mirror of
https://github.com/servo/servo.git
synced 2025-06-10 09:33:13 +00:00
remove type match in is_instance_activatable
This commit is contained in:
parent
5f82780d3a
commit
7f64c27a8f
1 changed files with 3 additions and 7 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue