diff options
Diffstat (limited to 'components/script/dom/htmlbuttonelement.rs')
-rw-r--r-- | components/script/dom/htmlbuttonelement.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/components/script/dom/htmlbuttonelement.rs b/components/script/dom/htmlbuttonelement.rs index 661fb3d6f68..342d4173343 100644 --- a/components/script/dom/htmlbuttonelement.rs +++ b/components/script/dom/htmlbuttonelement.rs @@ -18,6 +18,7 @@ use dom::htmlformelement::{FormControl, FormSubmitter, ResetFrom}; use dom::htmlformelement::{SubmittedFrom, HTMLFormElement}; use dom::node::{Node, UnbindContext, document_from_node, window_from_node}; use dom::nodelist::NodeList; +use dom::validation::Validatable; use dom::validitystate::ValidityState; use dom::virtualmethods::VirtualMethods; use std::ascii::AsciiExt; @@ -66,7 +67,7 @@ impl HTMLButtonElementMethods for HTMLButtonElement { // https://html.spec.whatwg.org/multipage/#dom-cva-validity fn Validity(&self) -> Root<ValidityState> { let window = window_from_node(self); - ValidityState::new(window.r()) + ValidityState::new(window.r(), self.upcast()) } // https://html.spec.whatwg.org/multipage/#dom-fe-disabled @@ -203,6 +204,8 @@ impl VirtualMethods for HTMLButtonElement { impl FormControl for HTMLButtonElement {} +impl Validatable for HTMLButtonElement {} + impl Activatable for HTMLButtonElement { fn as_element(&self) -> &Element { self.upcast() |