LibWeb/HTML: Fix behavior when removing multiple from select element

This change ensures correct behavior when the `multiple` attribute is
removed from a `select` element, reducing the number of selected
`option` elements to one.

Fixes a failing WPT test:
https://wpt.live/html/semantics/forms/the-select-element/select-multiple.html
This commit is contained in:
Khaled Lakehal 2025-05-26 09:34:12 +02:00 committed by Shannon Booth
parent 937994cfaa
commit 9a071c9e89
Notes: github-actions[bot] 2025-05-27 06:59:29 +00:00
3 changed files with 13 additions and 3 deletions

View file

@ -98,6 +98,7 @@ public:
virtual void activation_behavior(DOM::Event const&) override;
virtual void form_associated_element_was_inserted() override;
virtual void form_associated_element_attribute_changed(FlyString const&, Optional<String> const&, Optional<FlyString> const&) override;
void did_select_item(Optional<u32> const& id);