michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: /* atom list for CSS pseudo-classes */ michael@0: michael@0: #ifndef nsCSSPseudoClasses_h___ michael@0: #define nsCSSPseudoClasses_h___ michael@0: michael@0: #include "nsStringFwd.h" michael@0: michael@0: class nsIAtom; michael@0: michael@0: class nsCSSPseudoClasses { michael@0: public: michael@0: michael@0: static void AddRefAtoms(); michael@0: michael@0: enum Type { michael@0: #define CSS_PSEUDO_CLASS(_name, _value, _pref) \ michael@0: ePseudoClass_##_name, michael@0: #include "nsCSSPseudoClassList.h" michael@0: #undef CSS_PSEUDO_CLASS michael@0: ePseudoClass_Count, michael@0: ePseudoClass_NotPseudoClass /* This value MUST be last! SelectorMatches michael@0: depends on it. */ michael@0: }; michael@0: michael@0: static Type GetPseudoType(nsIAtom* aAtom); michael@0: static bool HasStringArg(Type aType); michael@0: static bool HasNthPairArg(Type aType); michael@0: static bool HasSelectorListArg(Type aType) { michael@0: return aType == ePseudoClass_any; michael@0: } michael@0: static bool IsUserActionPseudoClass(Type aType); michael@0: michael@0: // Should only be used on types other than Count and NotPseudoClass michael@0: static void PseudoTypeToString(Type aType, nsAString& aString); michael@0: }; michael@0: michael@0: #endif /* nsCSSPseudoClasses_h___ */