aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom
diff options
context:
space:
mode:
authoryodalee <lc85301@gmail.com>2015-02-03 20:48:11 +0800
committeryodalee <lc85301@gmail.com>2015-02-03 20:53:06 +0800
commit5f82780d3a517d2e6a2b2f25d2ec43a668516bcb (patch)
tree87ed03e3958566788f81a59f111b92c6f6423eae /components/script/dom
parent0f2b1c4856036b477480a282d1246bbeefd70cdb (diff)
downloadservo-5f82780d3a517d2e6a2b2f25d2ec43a668516bcb.tar.gz
servo-5f82780d3a517d2e6a2b2f25d2ec43a668516bcb.zip
coding style in htmlinputelement, TODO in button
add comment, empty line in inputelement add button type TODO in buttonelement
Diffstat (limited to 'components/script/dom')
-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 => {