layout/style/nsStyleStructFwd.h

Wed, 31 Dec 2014 13:27:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 13:27:57 +0100
branch
TOR_BUG_3246
changeset 6
8bccb770b82d
permissions
-rw-r--r--

Ignore runtime configuration files generated during quality assurance.

michael@0 1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
michael@0 2 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 3 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 5
michael@0 6 /*
michael@0 7 * Forward declarations to avoid including all of nsStyleStruct.h.
michael@0 8 */
michael@0 9
michael@0 10 #ifndef nsStyleStructFwd_h_
michael@0 11 #define nsStyleStructFwd_h_
michael@0 12
michael@0 13 enum nsStyleStructID {
michael@0 14
michael@0 15 /*
michael@0 16 * Define the constants eStyleStruct_Font, etc.
michael@0 17 *
michael@0 18 * The C++ standard, section 7.2, guarantees that enums begin with 0 and
michael@0 19 * increase by 1.
michael@0 20 *
michael@0 21 * We separate the IDs of Reset and Inherited structs so that we can use
michael@0 22 * the IDs as indices (offset by nsStyleStructID_*_Start) into arrays of
michael@0 23 * one type or the other.
michael@0 24 */
michael@0 25
michael@0 26 nsStyleStructID_Inherited_Start = 0,
michael@0 27 // a dummy value so the value after it is the same as ..._Inherited_Start
michael@0 28 nsStyleStructID_DUMMY1 = nsStyleStructID_Inherited_Start - 1,
michael@0 29
michael@0 30 #define STYLE_STRUCT_INHERITED(name, checkdata_cb) \
michael@0 31 eStyleStruct_##name,
michael@0 32 #define STYLE_STRUCT_RESET(name, checkdata_cb)
michael@0 33 #include "nsStyleStructList.h"
michael@0 34 #undef STYLE_STRUCT_INHERITED
michael@0 35 #undef STYLE_STRUCT_RESET
michael@0 36
michael@0 37 nsStyleStructID_Reset_Start,
michael@0 38 // a dummy value so the value after it is the same as ..._Reset_Start
michael@0 39 nsStyleStructID_DUMMY2 = nsStyleStructID_Reset_Start - 1,
michael@0 40
michael@0 41 #define STYLE_STRUCT_RESET(name, checkdata_cb) \
michael@0 42 eStyleStruct_##name,
michael@0 43 #define STYLE_STRUCT_INHERITED(name, checkdata_cb)
michael@0 44 #include "nsStyleStructList.h"
michael@0 45 #undef STYLE_STRUCT_INHERITED
michael@0 46 #undef STYLE_STRUCT_RESET
michael@0 47
michael@0 48 // one past the end; length of 0-based list
michael@0 49 nsStyleStructID_Length,
michael@0 50
michael@0 51 nsStyleStructID_Inherited_Count =
michael@0 52 nsStyleStructID_Reset_Start - nsStyleStructID_Inherited_Start,
michael@0 53 nsStyleStructID_Reset_Count =
michael@0 54 nsStyleStructID_Length - nsStyleStructID_Reset_Start,
michael@0 55
michael@0 56 // An ID used for properties that are not in style structs. This is
michael@0 57 // used only in some users of nsStyleStructID, such as
michael@0 58 // nsCSSProps::kSIDTable, including some that store SIDs in a bitfield,
michael@0 59 // such as nsCSSCompressedDataBlock::mStyleBits.
michael@0 60 eStyleStruct_BackendOnly = nsStyleStructID_Length
michael@0 61
michael@0 62 };
michael@0 63
michael@0 64 // A bit corresponding to each struct ID
michael@0 65 #define NS_STYLE_INHERIT_BIT(sid_) (1 << uint64_t(eStyleStruct_##sid_))
michael@0 66
michael@0 67 #endif /* nsStyleStructFwd_h_ */

mercurial