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:
Luke Wilde 2021-10-14 16:18:49 +01:00 committed by Linus Groh
parent f71f404e0c
commit 3bb5c6207f
Notes: sideshowbarker 2024-07-18 03:20:18 +09:00
18 changed files with 31 additions and 38 deletions

View file

@ -15,7 +15,7 @@
namespace Web::HTML {
HTMLObjectElement::HTMLObjectElement(DOM::Document& document, QualifiedName qualified_name)
: HTMLElement(document, move(qualified_name))
: FormAssociatedElement(document, move(qualified_name))
, m_image_loader(*this)
{
m_image_loader.on_load = [this] {