diff options
Diffstat (limited to 'layout')
-rw-r--r-- | layout/style/nsCSSPseudoClasses.cpp | 24 | ||||
-rw-r--r-- | layout/style/nsCSSPseudoClasses.h | 18 |
2 files changed, 27 insertions, 15 deletions
diff --git a/layout/style/nsCSSPseudoClasses.cpp b/layout/style/nsCSSPseudoClasses.cpp index 928326e399..23517ef52c 100644 --- a/layout/style/nsCSSPseudoClasses.cpp +++ b/layout/style/nsCSSPseudoClasses.cpp @@ -109,6 +109,30 @@ nsCSSPseudoClasses::HasSingleSelectorArg(Type aType) aType == Type::hostContext; } +bool +nsCSSPseudoClasses::HasForgivingSelectorListArg(Type aType) +{ + return aType == Type::is || + aType == Type::matches || + aType == Type::any || + aType == Type::where; +} + +bool +nsCSSPseudoClasses::HasSelectorListArg(Type aType) +{ + return HasForgivingSelectorListArg(aType) || + aType == Type::mozAny || + aType == Type::host || + aType == Type::hostContext; +} + +bool +nsCSSPseudoClasses::HasOptionalSelectorListArg(Type aType) +{ + return aType == Type::host; +} + void nsCSSPseudoClasses::PseudoTypeToString(Type aType, nsAString& aString) { diff --git a/layout/style/nsCSSPseudoClasses.h b/layout/style/nsCSSPseudoClasses.h index 76fcef3f78..99c05b019f 100644 --- a/layout/style/nsCSSPseudoClasses.h +++ b/layout/style/nsCSSPseudoClasses.h @@ -59,21 +59,9 @@ public: static bool HasStringArg(Type aType); static bool HasNthPairArg(Type aType); static bool HasSingleSelectorArg(Type aType); - static bool HasForgivingSelectorListArg(Type aType) { - return aType == Type::is || - aType == Type::matches || - aType == Type::any || - aType == Type::where; - } - static bool HasSelectorListArg(Type aType) { - return HasForgivingSelectorListArg(aType) || - aType == Type::mozAny || - aType == Type::host || - aType == Type::hostContext; - } - static bool HasOptionalSelectorListArg(Type aType) { - return aType == Type::host; - } + static bool HasForgivingSelectorListArg(Type aType); + static bool HasSelectorListArg(Type aType); + static bool HasOptionalSelectorListArg(Type aType); static bool IsUserActionPseudoClass(Type aType); // Should only be used on types other than Count and NotPseudoClass |