Skip to content

Commit

Permalink
Remove Button prefix from names of variants of ButtonType enum
Browse files Browse the repository at this point in the history
Fixes #8106.
  • Loading branch information
nerith committed Oct 21, 2015
1 parent 941c06e commit a0e2dfc
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions components/script/dom/htmlbuttonelement.rs
Expand Up @@ -28,10 +28,10 @@ use util::str::DOMString;
#[allow(dead_code)]
#[derive(HeapSizeOf)]
enum ButtonType {
ButtonSubmit,
ButtonReset,
ButtonButton,
ButtonMenu
Submit,
Reset,
Button,
Menu
}

#[dom_struct]
Expand All @@ -49,7 +49,7 @@ impl HTMLButtonElement {
HTMLElement::new_inherited_with_state(IN_ENABLED_STATE,
localName, prefix, document),
//TODO: implement button_type in attribute_mutated
button_type: Cell::new(ButtonType::ButtonSubmit)
button_type: Cell::new(ButtonType::Submit)
}
}

Expand Down Expand Up @@ -212,7 +212,7 @@ impl<'a> Activatable for &'a HTMLButtonElement {
let ty = self.button_type.get();
match ty {
//https://html.spec.whatwg.org/multipage/#attr-button-type-submit-state
ButtonType::ButtonSubmit => {
ButtonType::Submit => {
self.form_owner().map(|o| {
o.r().submit(SubmittedFrom::NotFromFormSubmitMethod,
FormSubmitter::ButtonElement(self.clone()))
Expand Down

0 comments on commit a0e2dfc

Please sign in to comment.