CSSEnabledState.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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. /*
  6. * enum for whether a CSS feature (property, pseudo-class, etc.) is
  7. * enabled in a specific context
  8. */
  9. #ifndef mozilla_CSSEnabledState_h
  10. #define mozilla_CSSEnabledState_h
  11. #include "mozilla/TypedEnumBits.h"
  12. namespace mozilla {
  13. enum class CSSEnabledState
  14. {
  15. // The default CSSEnabledState: only enable what's enabled for all
  16. // content, given the current values of preferences.
  17. eForAllContent = 0,
  18. // Enable features available in UA sheets.
  19. eInUASheets = 0x01,
  20. // Enable features available in chrome code.
  21. eInChrome = 0x02,
  22. // Special value to unconditionally enable everything. This implies
  23. // all the bits above, but is strictly more than just their OR-ed
  24. // union. This just skips any test so a feature will be enabled even
  25. // if it would have been disabled with all the bits above set.
  26. eIgnoreEnabledState = 0xff
  27. };
  28. MOZ_MAKE_ENUM_CLASS_BITWISE_OPERATORS(CSSEnabledState)
  29. } // namespace mozilla
  30. #endif // mozilla_CSSEnabledState_h