From 719a2e448f2d7d68ce8ebe8fbbade1bae1a67ccc Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 8 Feb 2025 12:57:47 +0100 Subject: [PATCH] LibWeb: Use invalidation sets for :checked style invalidation --- Libraries/LibWeb/HTML/HTMLInputElement.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Libraries/LibWeb/HTML/HTMLInputElement.cpp b/Libraries/LibWeb/HTML/HTMLInputElement.cpp index 9cd3712f74..78d7bfc4f9 100644 --- a/Libraries/LibWeb/HTML/HTMLInputElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLInputElement.cpp @@ -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(); }