LibWeb: Keep track of the order in which option elements are selected

This allows us to locate the most-recently-selected when running the
selectedness update algorithm.
This commit is contained in:
Andreas Kling 2024-11-14 00:05:38 +01:00 committed by Andreas Kling
parent 581597cb34
commit dc9179bb1b
Notes: github-actions[bot] 2024-11-14 22:07:21 +00:00
10 changed files with 107 additions and 27 deletions

View file

@ -94,7 +94,7 @@ public:
void did_select_item(Optional<u32> const& id);
void update_selectedness(JS::GCPtr<HTMLOptionElement> last_selected_option = nullptr);
void update_selectedness();
private:
HTMLSelectElement(DOM::Document&, DOM::QualifiedName);
@ -107,6 +107,8 @@ private:
virtual void computed_css_values_changed() override;
virtual void children_changed() override;
void show_the_picker_if_applicable();
void create_shadow_tree_if_needed();