mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-05 07:39:16 +00:00
LibWeb/CSS: Remove unused <an+b>#
code for pseudo-classes
This revertse7890429aa
and partly revertsa59c15481f
. 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:
parent
d461e96f40
commit
f93819eda2
Notes:
github-actions[bot]
2025-08-28 10:41:23 +00:00
Author: https://github.com/AtkinsSJ
Commit: f93819eda2
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6009
Reviewed-by: https://github.com/gmta ✅
6 changed files with 8 additions and 62 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue