2017-10-27 20:33:53 +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: */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* 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/. */
|
2006-03-30 10:20:34 +04:00
|
|
|
|
|
|
|
/* enum types for CSS properties and their values */
|
2017-07-06 15:00:35 +03:00
|
|
|
|
2016-08-17 04:37:48 +03:00
|
|
|
#ifndef nsCSSPropertyID_h___
|
|
|
|
#define nsCSSPropertyID_h___
|
2003-06-08 02:14:42 +04:00
|
|
|
|
2015-08-27 04:19:34 +03:00
|
|
|
#include <nsHashKeys.h>
|
|
|
|
|
2003-06-08 02:14:42 +04:00
|
|
|
/*
|
|
|
|
Declare the enum list using the magic of preprocessing
|
|
|
|
enum values are "eCSSProperty_foo" (where foo is the property)
|
|
|
|
|
2018-04-17 09:57:04 +03:00
|
|
|
To change the list of properties, see ServoCSSPropList.h
|
2003-06-08 02:14:42 +04:00
|
|
|
|
|
|
|
*/
|
2016-08-17 04:37:48 +03:00
|
|
|
enum nsCSSPropertyID {
|
2003-06-08 02:14:42 +04:00
|
|
|
eCSSProperty_UNKNOWN = -1,
|
|
|
|
|
2018-04-18 12:39:51 +03:00
|
|
|
$property_ids
|
2009-01-23 04:28:13 +03:00
|
|
|
|
2013-03-13 20:58:39 +04:00
|
|
|
// Some of the values below could probably overlap with each other
|
|
|
|
// if we had a need for them to do so.
|
2009-08-21 01:52:47 +04:00
|
|
|
|
|
|
|
// Extra values for use in the values of the 'transition-property'
|
|
|
|
// property.
|
|
|
|
eCSSPropertyExtra_no_properties,
|
|
|
|
eCSSPropertyExtra_all_properties,
|
|
|
|
|
2014-04-02 07:32:16 +04:00
|
|
|
// Extra value to represent custom properties (--*).
|
2016-10-28 17:24:00 +03:00
|
|
|
eCSSPropertyExtra_variable,
|
2003-06-08 02:14:42 +04:00
|
|
|
};
|
|
|
|
|
2019-04-15 02:48:05 +03:00
|
|
|
// MOZ_DBG support is defined in nsCSSProps.h since it depends on
|
|
|
|
// nsCSSProps::GetStringValue
|
|
|
|
|
2018-04-18 12:39:51 +03:00
|
|
|
const nsCSSPropertyID
|
|
|
|
eCSSProperty_COUNT_no_shorthands = $longhand_count;
|
|
|
|
const nsCSSPropertyID
|
|
|
|
eCSSProperty_COUNT = $shorthand_count;
|
|
|
|
const nsCSSPropertyID
|
|
|
|
eCSSProperty_COUNT_with_aliases = eCSSPropertyExtra_no_properties;
|
|
|
|
|
2015-08-27 04:19:34 +03:00
|
|
|
namespace mozilla {
|
|
|
|
|
|
|
|
template<>
|
|
|
|
inline PLDHashNumber
|
2016-08-17 04:37:48 +03:00
|
|
|
Hash<nsCSSPropertyID>(const nsCSSPropertyID& aValue)
|
2015-08-27 04:19:34 +03:00
|
|
|
{
|
|
|
|
return uint32_t(aValue);
|
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace mozilla
|
|
|
|
|
2008-08-08 03:15:40 +04:00
|
|
|
// The "descriptors" that can appear in a @font-face rule.
|
|
|
|
// They have the syntax of properties but different value rules.
|
|
|
|
enum nsCSSFontDesc {
|
|
|
|
eCSSFontDesc_UNKNOWN = -1,
|
2011-12-20 20:49:16 +04:00
|
|
|
#define CSS_FONT_DESC(name_, method_) eCSSFontDesc_##method_,
|
|
|
|
#include "nsCSSFontDescList.h"
|
|
|
|
#undef CSS_FONT_DESC
|
2008-08-08 03:15:40 +04:00
|
|
|
eCSSFontDesc_COUNT
|
|
|
|
};
|
|
|
|
|
2014-06-12 05:10:00 +04:00
|
|
|
// The "descriptors" that can appear in a @counter-style rule.
|
|
|
|
// They have the syntax of properties but different value rules.
|
|
|
|
enum nsCSSCounterDesc {
|
|
|
|
eCSSCounterDesc_UNKNOWN = -1,
|
|
|
|
#define CSS_COUNTER_DESC(name_, method_) eCSSCounterDesc_##method_,
|
|
|
|
#include "nsCSSCounterDescList.h"
|
|
|
|
#undef CSS_COUNTER_DESC
|
|
|
|
eCSSCounterDesc_COUNT
|
|
|
|
};
|
|
|
|
|
2019-09-19 03:20:04 +03:00
|
|
|
namespace mozilla {
|
|
|
|
|
2019-12-19 23:43:06 +03:00
|
|
|
// FIXME: The underlying type of this enum should be uint8_t, but we can't do
|
|
|
|
// that because of https://bugs.llvm.org/show_bug.cgi?id=44228.
|
|
|
|
enum class CountedUnknownProperty : uint32_t {
|
2019-09-19 03:20:04 +03:00
|
|
|
#define COUNTED_UNKNOWN_PROPERTY(name_, method_) method_,
|
|
|
|
#include "mozilla/CountedUnknownProperties.h"
|
|
|
|
#undef COUNTED_UNKNOWN_PROPERTY
|
|
|
|
Count,
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace mozilla
|
|
|
|
|
2016-08-17 04:37:48 +03:00
|
|
|
#endif /* nsCSSPropertyID_h___ */
|