Backed out changeset 1b14354719c0 (bug 1895254) for causing bustages on NavigationTra...
[gecko.git] / layout / style / CSSPropFlags.h
blobda096ea82c9a94dda8f423dbd986c77739173d72
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 #ifndef mozilla_CSSPropFlags_h
8 #define mozilla_CSSPropFlags_h
10 #include "mozilla/TypedEnumBits.h"
12 namespace mozilla {
14 enum class CSSPropFlags : uint16_t {
15 // This property is not parsed. It is only there for internal use like
16 // attribute mapping.
17 Inaccessible = 1 << 0,
19 // The following two flags along with the pref defines where the this
20 // property can be used:
21 // * If none of the two flags is presented, the pref completely controls
22 // the availability of this property. And in that case, if it has no
23 // pref, this property is usable everywhere.
24 // * If any of the flags is set, this property is always enabled in the
25 // specific contexts regardless of the value of the pref. If there is
26 // no pref for this property at all in this case, it is an internal-
27 // only property, which cannot be used anywhere else, and should be
28 // wrapped in "#ifndef CSS_PROP_LIST_EXCLUDE_INTERNAL".
29 // Note that, these flags have no effect on the use of aliases of this
30 // property.
31 // Furthermore, for the purposes of animation (including triggering
32 // transitions) these flags are ignored. That is, if the property is disabled
33 // by a pref, we will *not* run animations or transitions on it even in
34 // UA sheets or chrome.
35 EnabledInUASheets = 1 << 1,
36 EnabledInChrome = 1 << 2,
37 EnabledInUASheetsAndChrome = EnabledInUASheets | EnabledInChrome,
38 EnabledMask = EnabledInUASheetsAndChrome,
40 // This property can be animated on the compositor.
41 CanAnimateOnCompositor = 1 << 3,
43 // This property is an internal property that is not represented in
44 // the DOM. Properties with this flag are defined in an #ifndef
45 // CSS_PROP_LIST_EXCLUDE_INTERNAL section.
46 Internal = 1 << 4,
48 // Whether this property should be serialized by Servo in getComputedStyle.
49 SerializedByServo = 1 << 5,
51 // Whether this is a logical property.
52 IsLogical = 1 << 6,
54 // Whether this property, when changed, may affect layout, overflow, or paint.
55 AffectsLayout = 1 << 7,
56 AffectsOverflow = 1 << 8,
57 AffectsPaint = 1 << 9,
60 MOZ_MAKE_ENUM_CLASS_BITWISE_OPERATORS(CSSPropFlags)
62 } // namespace mozilla
64 #endif // mozilla_CSSPropFlags_h