2018-04-26 08:00:50 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
#ifndef mozilla_CSSPropFlags_h
|
|
|
|
#define mozilla_CSSPropFlags_h
|
|
|
|
|
|
|
|
#include "mozilla/TypedEnumBits.h"
|
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
|
|
|
|
enum class CSSPropFlags : uint8_t {
|
|
|
|
// This property is not parsed. It is only there for internal use like
|
|
|
|
// attribute mapping.
|
|
|
|
Inaccessible = 1 << 0,
|
|
|
|
|
|
|
|
// The following two flags along with the pref defines where the this
|
|
|
|
// property can be used:
|
|
|
|
// * If none of the two flags is presented, the pref completely controls
|
|
|
|
// the availability of this property. And in that case, if it has no
|
|
|
|
// pref, this property is usable everywhere.
|
|
|
|
// * If any of the flags is set, this property is always enabled in the
|
|
|
|
// specific contexts regardless of the value of the pref. If there is
|
|
|
|
// no pref for this property at all in this case, it is an internal-
|
|
|
|
// only property, which cannot be used anywhere else, and should be
|
|
|
|
// wrapped in "#ifndef CSS_PROP_LIST_EXCLUDE_INTERNAL".
|
|
|
|
// Note that, these flags have no effect on the use of aliases of this
|
|
|
|
// property.
|
|
|
|
// Furthermore, for the purposes of animation (including triggering
|
|
|
|
// transitions) these flags are ignored. That is, if the property is disabled
|
|
|
|
// by a pref, we will *not* run animations or transitions on it even in
|
|
|
|
// UA sheets or chrome.
|
2019-08-01 14:22:53 +03:00
|
|
|
EnabledInUASheets = 1 << 1,
|
|
|
|
EnabledInChrome = 1 << 2,
|
2018-04-26 08:00:50 +03:00
|
|
|
EnabledInUASheetsAndChrome = EnabledInUASheets | EnabledInChrome,
|
|
|
|
EnabledMask = EnabledInUASheetsAndChrome,
|
|
|
|
|
|
|
|
// This property can be animated on the compositor.
|
2019-08-01 14:22:53 +03:00
|
|
|
CanAnimateOnCompositor = 1 << 3,
|
2018-04-26 08:00:50 +03:00
|
|
|
|
|
|
|
// This property is an internal property that is not represented in
|
|
|
|
// the DOM. Properties with this flag are defined in an #ifndef
|
|
|
|
// CSS_PROP_LIST_EXCLUDE_INTERNAL section.
|
2019-08-01 14:22:53 +03:00
|
|
|
Internal = 1 << 4,
|
2018-06-07 22:07:28 +03:00
|
|
|
|
|
|
|
// Whether this property should be serialized by Servo in getComputedStyle.
|
2019-08-01 14:22:53 +03:00
|
|
|
SerializedByServo = 1 << 5,
|
2018-06-30 16:45:43 +03:00
|
|
|
|
|
|
|
// Whether this is a logical property.
|
2019-08-01 14:22:53 +03:00
|
|
|
IsLogical = 1 << 6,
|
2021-11-02 17:22:51 +03:00
|
|
|
|
|
|
|
// Whether this shorthand property is unconditionally exposed in
|
|
|
|
// getComputedStyle.
|
|
|
|
ShorthandUnconditionallyExposedOnGetCS = 1 << 7,
|
2018-04-26 08:00:50 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
MOZ_MAKE_ENUM_CLASS_BITWISE_OPERATORS(CSSPropFlags)
|
|
|
|
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif // mozilla_CSSPropFlags_h
|