mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-27 19:59:17 +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:
@@ -11,9 +11,7 @@
|
||||
|
||||
namespace Web::HTML {
|
||||
|
||||
class HTMLInputElement final
|
||||
: public HTMLElement
|
||||
, public FormAssociatedElement {
|
||||
class HTMLInputElement final : public FormAssociatedElement {
|
||||
public:
|
||||
using WrapperType = Bindings::HTMLInputElementWrapper;
|
||||
|
||||
@@ -43,9 +41,6 @@ private:
|
||||
virtual void inserted() override;
|
||||
virtual void removed_from(Node*) override;
|
||||
|
||||
// ^HTML::FormAssociatedElement
|
||||
virtual HTMLElement& form_associated_element_to_html_element() override { return *this; }
|
||||
|
||||
// ^DOM::EventTarget
|
||||
virtual void did_receive_focus() override;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user