mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-02 22:30:31 +00:00
LibWeb: Fix select element state update in three ways
1. We were not propagating selectedness updates from option to select if the option was inside an optgroup. 2. When two or more options were selected, we were always favoring the last one in tree order, instead of the last one that got checked. 3. We were neglecting to return in the `display size is 1` case when all elements were disabled. This was covered by some of the :has() selector tests. :^)
This commit is contained in:
parent
6dad8ea584
commit
6c75a93ec0
Notes:
github-actions[bot]
2024-10-27 17:41:15 +00:00
Author: https://github.com/awesomekling
Commit: 6c75a93ec0
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2002
4 changed files with 19 additions and 16 deletions
|
@ -92,7 +92,7 @@ public:
|
|||
|
||||
void did_select_item(Optional<u32> const& id);
|
||||
|
||||
void update_selectedness();
|
||||
void update_selectedness(JS::GCPtr<HTMLOptionElement> last_selected_option = nullptr);
|
||||
|
||||
private:
|
||||
HTMLSelectElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue