diff --git a/Userland/Libraries/LibWeb/HTML/HTMLSelectElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLSelectElement.cpp index 86a036be79c..396960095e1 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLSelectElement.cpp +++ b/Userland/Libraries/LibWeb/HTML/HTMLSelectElement.cpp @@ -175,4 +175,13 @@ Optional HTMLSelectElement::default_role() const return ARIA::Role::combobox; } +void HTMLSelectElement::set_is_open(bool open) +{ + if (open == m_is_open) + return; + + m_is_open = open; + invalidate_style(); +} + } diff --git a/Userland/Libraries/LibWeb/HTML/HTMLSelectElement.h b/Userland/Libraries/LibWeb/HTML/HTMLSelectElement.h index 02f5a9d8544..e670bfe241a 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLSelectElement.h +++ b/Userland/Libraries/LibWeb/HTML/HTMLSelectElement.h @@ -33,6 +33,9 @@ public: int selected_index() const; void set_selected_index(int); + bool is_open() const { return m_is_open; } + void set_is_open(bool); + Vector> list_of_options() const; // ^EventTarget @@ -72,6 +75,7 @@ private: virtual i32 default_tab_index_value() const override; JS::GCPtr m_options; + bool m_is_open { false }; }; }