mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 12:20:00 +01:00
LibWeb: Correct typos for user validity of form elements on submission
The spec and comments say "set field's user validity to true", but we now actually set it to true and not false. This passes one subtest in WPT's css/selectors/user-valid.html.
This commit is contained in:
parent
783ae44462
commit
d49fb169bc
|
|
@ -131,11 +131,11 @@ WebIDL::ExceptionOr<void> HTMLFormElement::submit_form(GC::Ref<HTMLElement> subm
|
|||
// NOTE: Only input, select and textarea elements have a user validity flag.
|
||||
// See https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#user-validity
|
||||
if (is<HTMLInputElement>(*element)) {
|
||||
(&as<HTMLInputElement>(*element))->set_user_validity(false);
|
||||
(&as<HTMLInputElement>(*element))->set_user_validity(true);
|
||||
} else if (is<HTMLSelectElement>(*element)) {
|
||||
(&as<HTMLSelectElement>(*element))->set_user_validity(false);
|
||||
(&as<HTMLSelectElement>(*element))->set_user_validity(true);
|
||||
} else if (is<HTMLTextAreaElement>(*element)) {
|
||||
(&as<HTMLTextAreaElement>(*element))->set_user_validity(false);
|
||||
(&as<HTMLTextAreaElement>(*element))->set_user_validity(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user