1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-08 05:27:14 +09: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:
Andreas Kling 2024-10-27 13:56:28 +01:00 committed by Andreas Kling
parent 22a66bb1c2
commit 6dad8ea584
Notes: github-actions[bot] 2024-10-27 17:41:21 +00:00
4 changed files with 14 additions and 29 deletions

View file

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