mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
LibWeb: Unify will_validate for form associated elements
We had the same implementation in quiet a few places. With this change we unify them in a single place
This commit is contained in:
Notes:
github-actions[bot]
2025-08-29 18:28:58 +00:00
Author: https://github.com/tete17 Commit: https://github.com/LadybirdBrowser/ladybird/commit/8ab568bc767 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6024 Reviewed-by: https://github.com/tcl3 ✅
@@ -273,13 +273,6 @@ void HTMLButtonElement::activation_behavior(DOM::Event const& event)
|
||||
PopoverInvokerElement::popover_target_activation_behaviour(*this, as<DOM::Node>(*event.target()));
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#dom-cva-willvalidate
|
||||
bool HTMLButtonElement::will_validate()
|
||||
{
|
||||
// The willValidate attribute's getter must return true, if this element is a candidate for constraint validation
|
||||
return is_candidate_for_constraint_validation();
|
||||
}
|
||||
|
||||
bool HTMLButtonElement::is_focusable() const
|
||||
{
|
||||
return enabled();
|
||||
|
||||
Reference in New Issue
Block a user