mirror of
https://github.com/servo/servo.git
synced 2025-08-12 08:55:32 +01:00
Differentiate between missing/invalid value in make_enumerated_getter!
(#34412)
* Create spec-compliant version of create_enumerated_getter Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Use new make_enumerated_getter! macro everywhere Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Remove old make_enumerated_getter macro Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Return lowercased value from make_enumerated_getter macro Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Update WPT expectations Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
parent
612492b372
commit
9168375b33
8 changed files with 137 additions and 36 deletions
|
@ -1399,21 +1399,28 @@ impl HTMLInputElementMethods<crate::DomTypeHolder> for HTMLInputElement {
|
|||
// https://html.spec.whatwg.org/multipage/#dom-input-formaction
|
||||
make_setter!(SetFormAction, "formaction");
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-input-formenctype
|
||||
// https://html.spec.whatwg.org/multipage/#dom-fs-formenctype
|
||||
make_enumerated_getter!(
|
||||
FormEnctype,
|
||||
"formenctype",
|
||||
"application/x-www-form-urlencoded",
|
||||
"text/plain" | "multipart/form-data"
|
||||
"application/x-www-form-urlencoded" | "text/plain" | "multipart/form-data",
|
||||
missing => "",
|
||||
invalid => "application/x-www-form-urlencoded"
|
||||
);
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-input-formenctype
|
||||
make_setter!(SetFormEnctype, "formenctype");
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-input-formmethod
|
||||
make_enumerated_getter!(FormMethod, "formmethod", "get", "post" | "dialog");
|
||||
// https://html.spec.whatwg.org/multipage/#dom-fs-formmethod
|
||||
make_enumerated_getter!(
|
||||
FormMethod,
|
||||
"formmethod",
|
||||
"get" | "post" | "dialog",
|
||||
missing => "get",
|
||||
invalid => "get"
|
||||
);
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-input-formmethod
|
||||
// https://html.spec.whatwg.org/multipage/#dom-fs-formmethod
|
||||
make_setter!(SetFormMethod, "formmethod");
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-input-formtarget
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue