Make mutable() use the disabled state

This commit is contained in:
Manish Goregaokar 2015-01-31 01:40:09 +05:30
parent 26732403b9
commit 2f9eee451d

View file

@ -588,7 +588,8 @@ impl<'a> FormControl<'a> for JSRef<'a, HTMLInputElement> {
fn mutable(self) -> bool {
// https://html.spec.whatwg.org/multipage/forms.html#the-input-element:concept-fe-mutable
// https://html.spec.whatwg.org/multipage/forms.html#the-readonly-attribute:concept-fe-mutable
!(self.Disabled() || self.ReadOnly())
let node: JSRef<Node> = NodeCast::from_ref(self);
!(node.get_disabled_state() || self.ReadOnly())
}
// https://html.spec.whatwg.org/multipage/forms.html#the-input-element:concept-form-reset-control