SheetParsingMode.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /* -*- Mode: C++; tab-width: 8; 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. #ifndef mozilla_css_SheetParsingMode_h
  6. #define mozilla_css_SheetParsingMode_h
  7. namespace mozilla {
  8. namespace css {
  9. /**
  10. * Enum defining the mode in which a sheet is to be parsed. This is
  11. * usually, but not always, the same as the cascade level at which the
  12. * sheet will apply (see nsStyleSet.h). Most of the Loader APIs only
  13. * support loading of author sheets.
  14. *
  15. * Author sheets are the normal case: styles embedded in or linked
  16. * from HTML pages. They are also the most restricted.
  17. *
  18. * User sheets can do anything author sheets can do, and also get
  19. * access to a few CSS extensions that are not yet suitable for
  20. * exposure on the public Web, but are very useful for expressing
  21. * user style overrides, such as @-moz-document rules.
  22. *
  23. * Agent sheets have access to all author- and user-sheet features
  24. * plus more extensions that are necessary for internal use but,
  25. * again, not yet suitable for exposure on the public Web. Some of
  26. * these are outright unsafe to expose; in particular, incorrect
  27. * styling of anonymous box pseudo-elements can violate layout
  28. * invariants.
  29. */
  30. enum SheetParsingMode {
  31. eAuthorSheetFeatures = 0,
  32. eUserSheetFeatures,
  33. eAgentSheetFeatures
  34. };
  35. } // namespace css
  36. } // namespace mozilla
  37. #endif // mozilla_css_SheetParsingMode_h