diff options
Diffstat (limited to 'components/script/dom/htmlinputelement.rs')
-rw-r--r-- | components/script/dom/htmlinputelement.rs | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/components/script/dom/htmlinputelement.rs b/components/script/dom/htmlinputelement.rs index eb784c91b6f..1525d8f88e8 100644 --- a/components/script/dom/htmlinputelement.rs +++ b/components/script/dom/htmlinputelement.rs @@ -105,7 +105,9 @@ impl InputActivationState { impl HTMLInputElementDerived for EventTarget { fn is_htmlinputelement(&self) -> bool { - *self.type_id() == EventTargetTypeId::Node(NodeTypeId::Element(ElementTypeId::HTMLElement(HTMLElementTypeId::HTMLInputElement))) + *self.type_id() == + EventTargetTypeId::Node( + NodeTypeId::Element(ElementTypeId::HTMLElement(HTMLElementTypeId::HTMLInputElement))) } } @@ -129,7 +131,9 @@ impl HTMLInputElement { } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLInputElement> { + pub fn new(localName: DOMString, + prefix: Option<DOMString>, + document: JSRef<Document>) -> Temporary<HTMLInputElement> { let element = HTMLInputElement::new_inherited(localName, prefix, document); Node::reflect_node(box element, document, HTMLInputElementBinding::Wrap) } @@ -297,7 +301,8 @@ impl<'a> HTMLInputElementMethods for JSRef<'a, HTMLInputElement> { make_setter!(SetFormAction, "formaction"); // https://html.spec.whatwg.org/multipage/#dom-input-formenctype - make_enumerated_getter!(FormEnctype, "application/x-www-form-urlencoded", ("text/plain") | ("multipart/form-data")); + make_enumerated_getter!( + FormEnctype, "application/x-www-form-urlencoded", ("text/plain") | ("multipart/form-data")); // https://html.spec.whatwg.org/multipage/#dom-input-formenctype make_setter!(SetFormEnctype, "formenctype"); @@ -678,9 +683,11 @@ impl<'a> Activatable for JSRef<'a, HTMLInputElement> { // https://html.spec.whatwg.org/multipage/#reset-button-state-(type=reset):activation-behavior // InputType::InputSubmit => (), // No behavior defined InputType::InputCheckbox => { - // https://html.spec.whatwg.org/multipage/#checkbox-state-(type=checkbox):pre-click-activation-steps - // cache current values of `checked` and `indeterminate` - // we may need to restore them later + /* + https://html.spec.whatwg.org/multipage/#checkbox-state-(type=checkbox):pre-click-activation-steps + cache current values of `checked` and `indeterminate` + we may need to restore them later + */ cache.indeterminate = self.Indeterminate(); cache.checked = self.Checked(); cache.checked_changed = self.checked_changed.get(); |