1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 11:44:58 +00:00

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

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