layout/style/nsCSSProperty.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/style/nsCSSProperty.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,75 @@
     1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +
     1.9 +/* enum types for CSS properties and their values */
    1.10 + 
    1.11 +#ifndef nsCSSProperty_h___
    1.12 +#define nsCSSProperty_h___
    1.13 +
    1.14 +/*
    1.15 +   Declare the enum list using the magic of preprocessing
    1.16 +   enum values are "eCSSProperty_foo" (where foo is the property)
    1.17 +
    1.18 +   To change the list of properties, see nsCSSPropList.h
    1.19 +
    1.20 + */
    1.21 +enum nsCSSProperty {
    1.22 +  eCSSProperty_UNKNOWN = -1,
    1.23 +
    1.24 +  #define CSS_PROP(name_, id_, method_, flags_, pref_, parsevariant_, \
    1.25 +                   kwtable_, stylestruct_, stylestructoffset_, animtype_) \
    1.26 +    eCSSProperty_##id_,
    1.27 +  #include "nsCSSPropList.h"
    1.28 +  #undef CSS_PROP
    1.29 +
    1.30 +  eCSSProperty_COUNT_no_shorthands,
    1.31 +  // Make the count continue where it left off:
    1.32 +  eCSSProperty_COUNT_DUMMY = eCSSProperty_COUNT_no_shorthands - 1,
    1.33 +
    1.34 +  #define CSS_PROP_SHORTHAND(name_, id_, method_, flags_, pref_) \
    1.35 +    eCSSProperty_##id_,
    1.36 +  #include "nsCSSPropList.h"
    1.37 +  #undef CSS_PROP_SHORTHAND
    1.38 +
    1.39 +  eCSSProperty_COUNT,
    1.40 +  // Make the count continue where it left off:
    1.41 +  eCSSProperty_COUNT_DUMMY2 = eCSSProperty_COUNT - 1,
    1.42 +
    1.43 +  #define CSS_PROP_ALIAS(aliasname_, id_, method_, pref_) \
    1.44 +    eCSSPropertyAlias_##method_,
    1.45 +  #include "nsCSSPropAliasList.h"
    1.46 +  #undef CSS_PROP_ALIAS
    1.47 +
    1.48 +  eCSSProperty_COUNT_with_aliases,
    1.49 +  // Make the count continue where it left off:
    1.50 +  eCSSProperty_COUNT_DUMMY3 = eCSSProperty_COUNT_with_aliases - 1,
    1.51 +
    1.52 +  // Some of the values below could probably overlap with each other
    1.53 +  // if we had a need for them to do so.
    1.54 +
    1.55 +  // Extra values for use in the values of the 'transition-property'
    1.56 +  // property.
    1.57 +  eCSSPropertyExtra_no_properties,
    1.58 +  eCSSPropertyExtra_all_properties,
    1.59 +
    1.60 +  // Extra dummy values for nsCSSParser internal use.
    1.61 +  eCSSPropertyExtra_x_none_value,
    1.62 +  eCSSPropertyExtra_x_auto_value,
    1.63 +
    1.64 +  // Extra value to represent custom properties (--*).
    1.65 +  eCSSPropertyExtra_variable
    1.66 +};
    1.67 +
    1.68 +// The "descriptors" that can appear in a @font-face rule.
    1.69 +// They have the syntax of properties but different value rules.
    1.70 +enum nsCSSFontDesc {
    1.71 +  eCSSFontDesc_UNKNOWN = -1,
    1.72 +#define CSS_FONT_DESC(name_, method_) eCSSFontDesc_##method_,
    1.73 +#include "nsCSSFontDescList.h"
    1.74 +#undef CSS_FONT_DESC
    1.75 +  eCSSFontDesc_COUNT
    1.76 +};
    1.77 +
    1.78 +#endif /* nsCSSProperty_h___ */

mercurial