mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 10:48:41 +00:00
LibWeb: Allow non-HTMLInputElements to have did_edit_text_node() called
HTMLTextAreaElement also needs to be told when its contained text node has been edited, so let's make this functionality work for anyone who extends the new EditableTextNodeOwner interface class.
This commit is contained in:
committed by
Andreas Kling
parent
ce556c9566
commit
4897643ffb
@@ -7,6 +7,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LibWeb/DOM/Text.h>
|
||||
#include <LibWeb/FileAPI/FileList.h>
|
||||
#include <LibWeb/HTML/FormAssociatedElement.h>
|
||||
#include <LibWeb/HTML/HTMLElement.h>
|
||||
@@ -41,7 +42,8 @@ namespace Web::HTML {
|
||||
|
||||
class HTMLInputElement final
|
||||
: public HTMLElement
|
||||
, public FormAssociatedElement {
|
||||
, public FormAssociatedElement
|
||||
, public DOM::EditableTextNodeOwner {
|
||||
WEB_PLATFORM_OBJECT(HTMLInputElement, HTMLElement);
|
||||
FORM_ASSOCIATED_ELEMENT(HTMLElement, HTMLInputElement)
|
||||
|
||||
@@ -83,8 +85,6 @@ public:
|
||||
|
||||
bool is_mutable() const { return m_is_mutable; }
|
||||
|
||||
void did_edit_text_node(Badge<BrowsingContext>);
|
||||
|
||||
JS::GCPtr<FileAPI::FileList> files();
|
||||
void set_files(JS::GCPtr<FileAPI::FileList>);
|
||||
|
||||
@@ -101,6 +101,9 @@ public:
|
||||
|
||||
WebIDL::ExceptionOr<void> show_picker();
|
||||
|
||||
// ^DOM::EditableTextNodeOwner
|
||||
virtual void did_edit_text_node(Badge<BrowsingContext>) override;
|
||||
|
||||
// ^EventTarget
|
||||
// https://html.spec.whatwg.org/multipage/interaction.html#the-tabindex-attribute:the-input-element
|
||||
virtual bool is_focusable() const override { return m_type != TypeAttributeState::Hidden; }
|
||||
|
||||
Reference in New Issue
Block a user