LibWeb: Fix collection of pseudo class names used in :has()

Before this change we were saving all pseudo class names as used in
:has() regardless of whether they are nested inside :has() or not.
This commit is contained in:
Aliaksandr Kalenik 2025-01-25 19:53:57 +01:00 committed by Jelle Raaijmakers
commit aaff6f98b1
Notes: github-actions[bot] 2025-01-25 23:53:42 +00:00

View file

@ -71,7 +71,8 @@ static void collect_properties_used_in_has(Selector::SimpleSelector const& selec
case PseudoClass::Disabled:
case PseudoClass::PlaceholderShown:
case PseudoClass::Checked:
style_invalidation_data.pseudo_classes_used_in_has_selectors.set(pseudo_class.type);
if (in_has)
style_invalidation_data.pseudo_classes_used_in_has_selectors.set(pseudo_class.type);
break;
default:
break;