mirror of
https://github.com/servo/servo.git
synced 2025-08-02 12:10:29 +01:00
coding style in htmlinputelement, TODO in button
add comment, empty line in inputelement add button type TODO in buttonelement
This commit is contained in:
parent
0f2b1c4856
commit
5f82780d3a
2 changed files with 4 additions and 0 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue