mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Remove Button prefix from names of variants of ButtonType enum
Fixes #8106.
This commit is contained in:
parent
941c06eb99
commit
a0e2dfc913
1 changed files with 6 additions and 6 deletions
|
@ -28,10 +28,10 @@ use util::str::DOMString;
|
||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
||||||
#[derive(HeapSizeOf)]
|
#[derive(HeapSizeOf)]
|
||||||
enum ButtonType {
|
enum ButtonType {
|
||||||
ButtonSubmit,
|
Submit,
|
||||||
ButtonReset,
|
Reset,
|
||||||
ButtonButton,
|
Button,
|
||||||
ButtonMenu
|
Menu
|
||||||
}
|
}
|
||||||
|
|
||||||
#[dom_struct]
|
#[dom_struct]
|
||||||
|
@ -49,7 +49,7 @@ impl HTMLButtonElement {
|
||||||
HTMLElement::new_inherited_with_state(IN_ENABLED_STATE,
|
HTMLElement::new_inherited_with_state(IN_ENABLED_STATE,
|
||||||
localName, prefix, document),
|
localName, prefix, document),
|
||||||
//TODO: implement button_type in attribute_mutated
|
//TODO: implement button_type in attribute_mutated
|
||||||
button_type: Cell::new(ButtonType::ButtonSubmit)
|
button_type: Cell::new(ButtonType::Submit)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -212,7 +212,7 @@ impl<'a> Activatable for &'a HTMLButtonElement {
|
||||||
let ty = self.button_type.get();
|
let ty = self.button_type.get();
|
||||||
match ty {
|
match ty {
|
||||||
//https://html.spec.whatwg.org/multipage/#attr-button-type-submit-state
|
//https://html.spec.whatwg.org/multipage/#attr-button-type-submit-state
|
||||||
ButtonType::ButtonSubmit => {
|
ButtonType::Submit => {
|
||||||
self.form_owner().map(|o| {
|
self.form_owner().map(|o| {
|
||||||
o.r().submit(SubmittedFrom::NotFromFormSubmitMethod,
|
o.r().submit(SubmittedFrom::NotFromFormSubmitMethod,
|
||||||
FormSubmitter::ButtonElement(self.clone()))
|
FormSubmitter::ButtonElement(self.clone()))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue