nsCSSAnonBoxes.h 1012 B

1234567891011121314151617181920212223242526272829303132333435
  1. /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2. /* This Source Code Form is subject to the terms of the Mozilla Public
  3. * License, v. 2.0. If a copy of the MPL was not distributed with this
  4. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  5. /* atom list for CSS anonymous boxes */
  6. #ifndef nsCSSAnonBoxes_h___
  7. #define nsCSSAnonBoxes_h___
  8. #include "nsIAtom.h"
  9. // Empty class derived from nsIAtom so that function signatures can
  10. // require an atom from this atom list.
  11. class nsICSSAnonBoxPseudo : public nsIAtom {};
  12. class nsCSSAnonBoxes {
  13. public:
  14. static void AddRefAtoms();
  15. static bool IsAnonBox(nsIAtom *aAtom);
  16. #ifdef MOZ_XUL
  17. static bool IsTreePseudoElement(nsIAtom* aPseudo);
  18. #endif
  19. static bool IsNonElement(nsIAtom* aPseudo)
  20. { return aPseudo == mozText || aPseudo == mozOtherNonElement; }
  21. #define CSS_ANON_BOX(_name, _value) static nsICSSAnonBoxPseudo* _name;
  22. #include "nsCSSAnonBoxList.h"
  23. #undef CSS_ANON_BOX
  24. };
  25. #endif /* nsCSSAnonBoxes_h___ */