LibWeb: Use invalidation sets for :checked style invalidation

This commit is contained in:
Andreas Kling 2025-02-08 12:57:47 +01:00 committed by Alexander Kalenik
parent 8b2de413ae
commit 719a2e448f
Notes: github-actions[bot] 2025-02-08 17:12:27 +00:00

View file

@ -169,7 +169,11 @@ void HTMLInputElement::set_checked(bool checked)
m_checked = checked;
invalidate_style(DOM::StyleInvalidationReason::HTMLInputElementSetChecked);
invalidate_style(
DOM::StyleInvalidationReason::HTMLInputElementSetChecked,
{ { .type = CSS::InvalidationSet::Property::Type::PseudoClass, .value = CSS::PseudoClass::Checked } },
{});
if (auto* paintable = this->paintable())
paintable->set_needs_display();
}