Auto merge of #25409 - pshaughn:nomenubutton, r=jdm

Remove "menu" from legal button types

Just cleanup from a spec change, passing a WPT test for it.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #25382

<!-- Either: -->
- [X] There are tests for these changes OR

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
This commit is contained in:
bors-servo 2020-01-03 17:11:32 -05:00 committed by GitHub
commit 33bea4a089
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 8 deletions

View file

@ -34,7 +34,6 @@ enum ButtonType {
Submit,
Reset,
Button,
Menu,
}
#[dom_struct]
@ -97,7 +96,7 @@ impl HTMLButtonElementMethods for HTMLButtonElement {
}
// https://html.spec.whatwg.org/multipage/#dom-button-type
make_enumerated_getter!(Type, "type", "submit", "reset" | "button" | "menu");
make_enumerated_getter!(Type, "type", "submit", "reset" | "button");
// https://html.spec.whatwg.org/multipage/#dom-button-type
make_setter!(SetType, "type");
@ -216,7 +215,6 @@ impl VirtualMethods for HTMLButtonElement {
let value = match &**attr.value() {
"reset" => ButtonType::Reset,
"button" => ButtonType::Button,
"menu" => ButtonType::Menu,
_ => ButtonType::Submit,
};
self.button_type.set(value);

View file

@ -1,5 +0,0 @@
[button-menu-historical.html]
type: testharness
[button.type reflects properly]
expected: FAIL