mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +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,14 +185,10 @@ 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/interaction.html#run-pre-click-activation-steps
|
||||
// https://html.spec.whatwg.org/multipage/forms.html#the-button-element:activation-behavior
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue