LibWeb: Queue form{Associated,Disabled}Callback where appropriate

This commit is contained in:
Luke Wilde 2026-02-15 19:21:54 +00:00 committed by Sam Atkins
parent 0381c40cb4
commit 4cea5d43e6
Notes: github-actions[bot] 2026-03-25 13:21:11 +00:00
6 changed files with 103 additions and 18 deletions

View file

@ -59,6 +59,19 @@ bool HTMLFieldSetElement::is_disabled() const
return false;
}
void HTMLFieldSetElement::attribute_changed(FlyString const& name, Optional<String> const& old_value, Optional<String> const& value, Optional<FlyString> const& namespace_)
{
Base::attribute_changed(name, old_value, value, namespace_);
if (name == HTML::AttributeNames::disabled) {
for_each_in_subtree_of_type<HTMLElement>([](auto& element) {
if (element.is_form_associated_custom_element())
element.update_face_disabled_state();
return TraversalDecision::Continue;
});
}
}
// https://html.spec.whatwg.org/multipage/form-elements.html#dom-fieldset-elements
GC::Ptr<DOM::HTMLCollection> const& HTMLFieldSetElement::elements()
{