summaryrefslogtreecommitdiff
path: root/layout
diff options
context:
space:
mode:
authorFranklinDM <mrmineshafter17@gmail.com>2023-02-21 20:05:51 +0800
committerFranklinDM <mrmineshafter17@gmail.com>2023-02-22 13:51:53 +0800
commitbae06ce17170fac136b05f567bae6a44dcfa6e4f (patch)
tree507a3c486661a15987bb71d3fd2eac50b9f04aeb /layout
parentf2ef28d09c65269029ee1ac5c65524a89423008a (diff)
downloaduxp-bae06ce17170fac136b05f567bae6a44dcfa6e4f.tar.gz
No issue - Move Has* function definition out of the header file for consistency
Diffstat (limited to 'layout')
-rw-r--r--layout/style/nsCSSPseudoClasses.cpp24
-rw-r--r--layout/style/nsCSSPseudoClasses.h18
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