mirror of
https://github.com/RGBCube/serenity
synced 2025-06-30 10:22:13 +00:00
LibWeb: Make FormAssociatedElement inherit from HTMLElement
The new event target implementation requires us to downcast an EventTarget to a FormAssociatedElement to check if the current Element EventTarget has a form owner to setup a with scope for the form owner. This also makes all form associated elements inherit from FormAssociatedElement where it was previously missing. https://html.spec.whatwg.org/#form-associated-element
This commit is contained in:
parent
f71f404e0c
commit
3bb5c6207f
18 changed files with 31 additions and 38 deletions
|
@ -12,10 +12,10 @@ namespace Web::HTML {
|
|||
void FormAssociatedElement::set_form(HTMLFormElement* form)
|
||||
{
|
||||
if (m_form)
|
||||
m_form->remove_associated_element({}, form_associated_element_to_html_element());
|
||||
m_form->remove_associated_element({}, *this);
|
||||
m_form = form;
|
||||
if (m_form)
|
||||
m_form->add_associated_element({}, form_associated_element_to_html_element());
|
||||
m_form->add_associated_element({}, *this);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue