aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--components/script/dom/htmlbuttonelement.rs1
-rw-r--r--components/script/dom/htmlinputelement.rs3
2 files changed, 4 insertions, 0 deletions
diff --git a/components/script/dom/htmlbuttonelement.rs b/components/script/dom/htmlbuttonelement.rs
index 52ee5bf56d8..b0dd5d7c244 100644
--- a/components/script/dom/htmlbuttonelement.rs
+++ b/components/script/dom/htmlbuttonelement.rs
@@ -53,6 +53,7 @@ impl HTMLButtonElement {
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLButtonElement {
HTMLButtonElement {
htmlelement: HTMLElement::new_inherited(HTMLElementTypeId::HTMLButtonElement, localName, prefix, document),
+ //TODO: implement button_type in after_set_attr
button_type: Cell::new(ButtonType::ButtonSubmit)
}
}
diff --git a/components/script/dom/htmlinputelement.rs b/components/script/dom/htmlinputelement.rs
index 0af4eb62790..a6622cd87f1 100644
--- a/components/script/dom/htmlinputelement.rs
+++ b/components/script/dom/htmlinputelement.rs
@@ -394,6 +394,7 @@ impl<'a> HTMLInputElementHelpers for JSRef<'a, HTMLInputElement> {
fn get_indeterminate_state(self) -> bool {
self.indeterminate.get()
}
+
// https://html.spec.whatwg.org/multipage/forms.html#concept-fe-mutable
fn mutable(self) -> bool {
// https://html.spec.whatwg.org/multipage/forms.html#the-input-element:concept-fe-mutable
@@ -401,6 +402,8 @@ impl<'a> HTMLInputElementHelpers for JSRef<'a, HTMLInputElement> {
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
fn reset(self) {
match self.input_type.get() {
InputType::InputRadio | InputType::InputCheckbox => {