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:
parent
22a66bb1c2
commit
6dad8ea584
Notes:
github-actions[bot]
2024-10-27 17:41:21 +00:00
Author: https://github.com/awesomekling
Commit: 6dad8ea584
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2002
4 changed files with 14 additions and 29 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue