Issue #1593 - Follow-up: Accept only a single selector in the argument of :host/:host-context

Current spec says these two pseudo-classes accept only a single compound selector:
:host( <compound-selector> )
:host-context( <compound-selector> )
This commit is contained in:
FranklinDM 2023-02-21 20:00:53 +08:00 committed by roytam1
commit 9037d5662d
3 changed files with 13 additions and 0 deletions

View file

@ -102,6 +102,13 @@ nsCSSPseudoClasses::HasNthPairArg(Type aType)
aType == Type::nthLastOfType;
}
bool
nsCSSPseudoClasses::HasSingleSelectorArg(Type aType)
{
return aType == Type::host ||
aType == Type::hostContext;
}
void
nsCSSPseudoClasses::PseudoTypeToString(Type aType, nsAString& aString)
{