From 1db568d06f0ff1e9fed2f24cc28467dfdd87daa4 Mon Sep 17 00:00:00 2001 From: Shannon Booth Date: Sun, 26 Jan 2025 18:35:24 +1300 Subject: [PATCH] LibWeb/HTML: Remove microtask invocation of update selectedness This is fundametally broken. A microtask only finishes after all javascript has finished running. The selectedness of a select element is observable by javascript, so any changes which are made as a result of children changing associated with a select element should be made through the children update steps and friends. --- Libraries/LibWeb/HTML/HTMLSelectElement.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Libraries/LibWeb/HTML/HTMLSelectElement.cpp b/Libraries/LibWeb/HTML/HTMLSelectElement.cpp index a99d4da9fb1..41f17c1d0d0 100644 --- a/Libraries/LibWeb/HTML/HTMLSelectElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLSelectElement.cpp @@ -505,11 +505,6 @@ void HTMLSelectElement::did_select_item(Optional const& id) void HTMLSelectElement::form_associated_element_was_inserted() { create_shadow_tree_if_needed(); - - // Wait until children are ready - queue_an_element_task(HTML::Task::Source::Microtask, [this] { - update_selectedness(); - }); } void HTMLSelectElement::form_associated_element_was_removed(DOM::Node*)