mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-05 07:39:16 +00:00
LibWeb/CSS: Make :heading() pseudo-class take integers not AN+B
Corresponds to 8eb3787e34
This commit is contained in:
parent
9ffc15ba3f
commit
d461e96f40
Notes:
github-actions[bot]
2025-08-28 10:41:31 +00:00
Author: https://github.com/AtkinsSJ
Commit: d461e96f40
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6009
Reviewed-by: https://github.com/gmta ✅
10 changed files with 79 additions and 161 deletions
|
@ -435,7 +435,7 @@ String Selector::SimpleSelector::serialize() const
|
|||
// For pseudo-classes with both a function and identifier form, see if they have arguments.
|
||||
switch (pseudo_class.type) {
|
||||
case PseudoClass::Heading:
|
||||
return !pseudo_class.an_plus_b_patterns.is_empty();
|
||||
return !pseudo_class.levels.is_empty();
|
||||
case PseudoClass::Host:
|
||||
return !pseudo_class.argument_selector_list.is_empty();
|
||||
default:
|
||||
|
@ -484,6 +484,10 @@ String Selector::SimpleSelector::serialize() const
|
|||
// The serialization of a comma-separated list of each argument’s serialization as a string, preserving relative order.
|
||||
s.join(", "sv, pseudo_class.languages);
|
||||
break;
|
||||
case PseudoClassMetadata::ParameterType::LevelList:
|
||||
// AD-HOC: not in the spec.
|
||||
s.join(", "sv, pseudo_class.levels);
|
||||
break;
|
||||
}
|
||||
s.append(')');
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue