mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-29 21:00:06 +00:00
LibWeb: Move pessimistic :has() invalidation hack to invalidate_style()
We basically need to do this for every invocation of invalidate_style() right now, so let's just do it inside invalidate_style() itself. Fixes one missing invalidation issue caught by a WPT test. :^)
This commit is contained in:
committed by
Andreas Kling
parent
22a66bb1c2
commit
6dad8ea584
@@ -165,14 +165,7 @@ void HTMLInputElement::set_checked(bool checked, ChangeSource change_source)
|
||||
|
||||
m_checked = checked;
|
||||
|
||||
// This element's :checked pseudo-class could be used in a sibling's sibling-selector,
|
||||
// so we need to invalidate the style of all siblings.
|
||||
if (parent()) {
|
||||
parent()->for_each_child([&](auto& child) {
|
||||
child.invalidate_style(DOM::StyleInvalidationReason::HTMLInputElementSetChecked);
|
||||
return IterationDecision::Continue;
|
||||
});
|
||||
}
|
||||
invalidate_style(DOM::StyleInvalidationReason::HTMLInputElementSetChecked);
|
||||
}
|
||||
|
||||
void HTMLInputElement::set_checked_binding(bool checked)
|
||||
|
||||
Reference in New Issue
Block a user