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 ✅
@@ -81,17 +81,6 @@ void HTMLObjectElement::visit_edges(Cell::Visitor& visitor)
|
||||
visitor.visit(m_document_observer);
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#dom-cva-willvalidate
|
||||
bool HTMLObjectElement::will_validate()
|
||||
{
|
||||
// The willValidate attribute's getter must return true, if this element is a candidate for constraint validation,
|
||||
// and false otherwise (i.e., false if any conditions are barring it from constraint validation).
|
||||
// A submittable element is a candidate for constraint validation
|
||||
// https://html.spec.whatwg.org/multipage/forms.html#category-submit
|
||||
// Submittable elements: button, input, select, textarea, form-associated custom elements [but not object]
|
||||
return false;
|
||||
}
|
||||
|
||||
void HTMLObjectElement::form_associated_element_attribute_changed(FlyString const& name, Optional<String> const&, Optional<String> const&, Optional<FlyString> const&)
|
||||
{
|
||||
// https://html.spec.whatwg.org/multipage/iframe-embed-object.html#the-object-element
|
||||
|
||||
Reference in New Issue
Block a user