LibWeb: Support CSS :only-of-type selector

This matches any element that doesn't have a sibling with the same tag
name as itself.
This commit is contained in:
Andreas Kling
2022-02-17 22:43:22 +01:00
parent b9b24cb1c1
commit 7c33a084fb
5 changed files with 31 additions and 10 deletions

View File

@@ -382,6 +382,9 @@ void dump_selector(StringBuilder& builder, CSS::Selector const& selector)
case CSS::Selector::SimpleSelector::PseudoClass::Type::LastOfType:
pseudo_class_description = "LastOfType";
break;
case CSS::Selector::SimpleSelector::PseudoClass::Type::OnlyOfType:
pseudo_class_description = "OnlyOfType";
break;
case CSS::Selector::SimpleSelector::PseudoClass::Type::NthChild:
pseudo_class_description = "NthChild";
break;