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.
This commit is contained in:
Andreas Kling 2022-03-12 23:58:19 +01:00
parent 630f2e0ee9
commit 1223c88e68
Notes: sideshowbarker 2024-07-17 17:31:02 +09:00

View file

@ -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();