diff options
author | yodalee <lc85301@gmail.com> | 2015-02-03 20:48:11 +0800 |
---|---|---|
committer | yodalee <lc85301@gmail.com> | 2015-02-03 20:53:06 +0800 |
commit | 5f82780d3a517d2e6a2b2f25d2ec43a668516bcb (patch) | |
tree | 87ed03e3958566788f81a59f111b92c6f6423eae | |
parent | 0f2b1c4856036b477480a282d1246bbeefd70cdb (diff) | |
download | servo-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
-rw-r--r-- | components/script/dom/htmlbuttonelement.rs | 1 | ||||
-rw-r--r-- | components/script/dom/htmlinputelement.rs | 3 |
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 => { |