LibWeb/CSS: Remove unused <an+b># code for pseudo-classes

This reverts e7890429aa and partly reverts
a59c15481f.

The one pseudo-class that accepted multiple of these was :heading(), and
since that got changed to take integers instead, there's no need to keep
this extra complexity (and memory usage) around.
This commit is contained in:
Sam Atkins 2025-08-28 10:44:17 +01:00 committed by Jelle Raaijmakers
commit f93819eda2
Notes: github-actions[bot] 2025-08-28 10:41:23 +00:00
6 changed files with 8 additions and 62 deletions

View file

@ -670,8 +670,6 @@ static inline bool matches_pseudo_class(CSS::Selector::SimpleSelector::PseudoCla
case CSS::PseudoClass::NthLastChild:
case CSS::PseudoClass::NthOfType:
case CSS::PseudoClass::NthLastOfType: {
auto& an_plus_b = pseudo_class.an_plus_b_patterns.first();
auto const* parent = element.parent();
if (!parent)
return false;
@ -726,7 +724,7 @@ static inline bool matches_pseudo_class(CSS::Selector::SimpleSelector::PseudoCla
default:
VERIFY_NOT_REACHED();
}
return an_plus_b.matches(index);
return pseudo_class.an_plus_b_pattern.matches(index);
}
case CSS::PseudoClass::Playing: {
if (!is<HTML::HTMLMediaElement>(element))