LibWeb: Unify report_validity for form associated elements

This function was implemented in a few classes but is a common element
in all form associated elements and the functionality should be there.

With these minimal changes we get to implement 4 idl functions for free.
This commit is contained in:
Tete17 2025-08-29 17:52:55 +02:00 committed by Tim Ledbetter
commit 44053ed3c2
Notes: github-actions[bot] 2025-08-29 18:29:11 +00:00
12 changed files with 14 additions and 25 deletions

View file

@ -2926,12 +2926,6 @@ WebIDL::ExceptionOr<bool> HTMLInputElement::check_validity()
return check_validity_steps();
}
// https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#dom-cva-reportvalidity
WebIDL::ExceptionOr<bool> HTMLInputElement::report_validity()
{
return report_validity_steps();
}
Optional<ARIA::Role> HTMLInputElement::default_role() const
{
// http://wpt.live/html-aam/roles-dynamic-switch.tentative.window.html "Disconnected <input type=checkbox switch>"