Bug 1883861 - Part 1: Move visitMemoryBarrier into the common CodeGenerator file...
[gecko.git] / layout / style / nsCSSPropertyID.h.in
blob4c8f951fee6c6429b7209e777533f8e60d256565
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 /* enum types for CSS properties and their values */
9 #ifndef nsCSSPropertyID_h___
10 #define nsCSSPropertyID_h___
12 #include <nsHashKeys.h>
15 Declare the enum list using the magic of preprocessing
16 enum values are "eCSSProperty_foo" (where foo is the property)
18 To change the list of properties, see ServoCSSPropList.h
21 enum nsCSSPropertyID : int32_t {
22 eCSSProperty_UNKNOWN = -1,
24 $property_ids
26 // Some of the values below could probably overlap with each other
27 // if we had a need for them to do so.
29 // Extra value to represent custom properties (--*).
30 eCSSPropertyExtra_variable,
33 // MOZ_DBG support is defined in nsCSSProps.h since it depends on
34 // nsCSSProps::GetStringValue
36 const nsCSSPropertyID
37 eCSSProperty_COUNT_no_shorthands = $longhand_count;
38 const nsCSSPropertyID
39 eCSSProperty_COUNT = $shorthand_count;
40 const nsCSSPropertyID
41 eCSSProperty_COUNT_with_aliases = eCSSPropertyExtra_variable;
43 namespace mozilla {
45 template<>
46 inline PLDHashNumber
47 Hash<nsCSSPropertyID>(const nsCSSPropertyID& aValue)
49 return uint32_t(aValue);
52 } // namespace mozilla
54 // The "descriptors" that can appear in a @font-face rule.
55 // They have the syntax of properties but different value rules.
56 enum nsCSSFontDesc {
57 eCSSFontDesc_UNKNOWN = -1,
58 #define CSS_FONT_DESC(name_, method_) eCSSFontDesc_##method_,
59 #include "nsCSSFontDescList.h"
60 #undef CSS_FONT_DESC
61 eCSSFontDesc_COUNT
64 // The "descriptors" that can appear in a @counter-style rule.
65 // They have the syntax of properties but different value rules.
66 enum nsCSSCounterDesc {
67 eCSSCounterDesc_UNKNOWN = -1,
68 #define CSS_COUNTER_DESC(name_, method_) eCSSCounterDesc_##method_,
69 #include "nsCSSCounterDescList.h"
70 #undef CSS_COUNTER_DESC
71 eCSSCounterDesc_COUNT
74 namespace mozilla {
76 // FIXME: The underlying type of this enum should be uint8_t, but we can't do
77 // that because of https://bugs.llvm.org/show_bug.cgi?id=44228.
78 enum class CountedUnknownProperty : uint32_t {
79 #define COUNTED_UNKNOWN_PROPERTY(name_, method_) method_,
80 #include "mozilla/CountedUnknownProperties.h"
81 #undef COUNTED_UNKNOWN_PROPERTY
82 Count,
85 } // namespace mozilla
87 #endif /* nsCSSPropertyID_h___ */