mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
LibWeb: Narrow :has descendant invalidation fanout
When a :has() mutation is known to come from a specific subtree, use that subtree as the mutation root while walking observed ancestors. Before dirtying an anchor and its non-subject descendants, check whether any cached :has() rule for that anchor can observe the changed subtree. This keeps unrelated descendant mutations from invalidating every rule that merely contains :has().
This commit is contained in:
committed by
Andreas Kling
parent
356a369aa6
commit
ce5d0bdfc7
Notes:
github-actions[bot]
2026-04-28 13:35:54 +00:00
Author: https://github.com/awesomekling Commit: https://github.com/LadybirdBrowser/ladybird/commit/ce5d0bdfc7a Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/9141
@@ -419,6 +419,7 @@ void build_invalidation_sets_for_simple_selector(Selector::SimpleSelector const&
|
||||
case PseudoClass::Enabled:
|
||||
case PseudoClass::Defined:
|
||||
case PseudoClass::Disabled:
|
||||
case PseudoClass::Empty:
|
||||
case PseudoClass::PlaceholderShown:
|
||||
case PseudoClass::Checked:
|
||||
case PseudoClass::Has: {
|
||||
|
||||
Reference in New Issue
Block a user