From 2f9eee451dcb98e10cfae5ed2712cd2a65695963 Mon Sep 17 00:00:00 2001 From: Manish Goregaokar Date: Sat, 31 Jan 2015 01:40:09 +0530 Subject: [PATCH] Make mutable() use the disabled state --- components/script/dom/htmlinputelement.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/script/dom/htmlinputelement.rs b/components/script/dom/htmlinputelement.rs index f0af836c983..e99bdaf3fcf 100644 --- a/components/script/dom/htmlinputelement.rs +++ b/components/script/dom/htmlinputelement.rs @@ -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 = 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