From 1223c88e6827c938ef780b90e9ecac61f660840b Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 12 Mar 2022 23:58:19 +0100 Subject: [PATCH] LibWeb: Mark input elements for style update in set_checked() When the checkedness changes, :checked selectors may yield different results, so we have to update style. --- Userland/Libraries/LibWeb/HTML/HTMLInputElement.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Userland/Libraries/LibWeb/HTML/HTMLInputElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLInputElement.cpp index f71f8b1259..cf7bd2c407 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLInputElement.cpp +++ b/Userland/Libraries/LibWeb/HTML/HTMLInputElement.cpp @@ -81,8 +81,7 @@ void HTMLInputElement::set_checked(bool checked, ChangeSource change_source, Sho m_dirty_checkedness = true; m_checked = checked; - if (layout_node()) - layout_node()->set_needs_display(); + set_needs_style_update(true); if (should_run_activation_behavior == ShouldRunActivationBehavior::Yes) run_activation_behavior();