mirror of
https://github.com/servo/servo.git
synced 2025-07-31 19:20:22 +01:00
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:
commit
33bea4a089
2 changed files with 1 additions and 8 deletions
|
@ -34,7 +34,6 @@ enum ButtonType {
|
||||||
Submit,
|
Submit,
|
||||||
Reset,
|
Reset,
|
||||||
Button,
|
Button,
|
||||||
Menu,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[dom_struct]
|
#[dom_struct]
|
||||||
|
@ -97,7 +96,7 @@ impl HTMLButtonElementMethods for HTMLButtonElement {
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#dom-button-type
|
// 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
|
// https://html.spec.whatwg.org/multipage/#dom-button-type
|
||||||
make_setter!(SetType, "type");
|
make_setter!(SetType, "type");
|
||||||
|
@ -216,7 +215,6 @@ impl VirtualMethods for HTMLButtonElement {
|
||||||
let value = match &**attr.value() {
|
let value = match &**attr.value() {
|
||||||
"reset" => ButtonType::Reset,
|
"reset" => ButtonType::Reset,
|
||||||
"button" => ButtonType::Button,
|
"button" => ButtonType::Button,
|
||||||
"menu" => ButtonType::Menu,
|
|
||||||
_ => ButtonType::Submit,
|
_ => ButtonType::Submit,
|
||||||
};
|
};
|
||||||
self.button_type.set(value);
|
self.button_type.set(value);
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
[button-menu-historical.html]
|
|
||||||
type: testharness
|
|
||||||
[button.type reflects properly]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue