Remove the datastruct_ and member_ fields of the CSS_PROP macro. (Bug 645620, patch 5) r=bzbarsky

This commit is contained in:
L. David Baron 2011-03-28 16:07:27 -07:00
Родитель a6b72237ee
Коммит d74b2e259e
9 изменённых файлов: 98 добавлений и 579 удалений

Просмотреть файл

@ -40,23 +40,22 @@
#include "nsICSSDeclaration.h"
#define CSS_PROP_DOMPROP_PREFIXED(prop_) Moz ## prop_
#define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, \
parsevariant_, kwtable_, stylestruct_, stylestructoffset_, \
animtype_) \
#define CSS_PROP(name_, id_, method_, flags_, parsevariant_, kwtable_, \
stylestruct_, stylestructoffset_, animtype_) \
static const nsCSSProperty QS_CSS_PROP_##method_ = eCSSProperty_##id_;
#define CSS_PROP_LIST_EXCLUDE_INTERNAL
#define CSS_PROP_SHORTHAND(name_, id_, method_, flags_) \
CSS_PROP(name_, id_, method_, flags_, X, X, X, X, X, X, X)
CSS_PROP(name_, id_, method_, flags_, X, X, X, X, X)
#include "nsCSSPropList.h"
// Aliases
CSS_PROP(X, opacity, MozOpacity, X, X, X, X, X, X, X, X)
CSS_PROP(X, outline, MozOutline, X, X, X, X, X, X, X, X)
CSS_PROP(X, outline_color, MozOutlineColor, X, X, X, X, X, X, X, X)
CSS_PROP(X, outline_style, MozOutlineStyle, X, X, X, X, X, X, X, X)
CSS_PROP(X, outline_width, MozOutlineWidth, X, X, X, X, X, X, X, X)
CSS_PROP(X, outline_offset, MozOutlineOffset, X, X, X, X, X, X, X, X)
CSS_PROP(X, opacity, MozOpacity, X, X, X, X, X, X)
CSS_PROP(X, outline, MozOutline, X, X, X, X, X, X)
CSS_PROP(X, outline_color, MozOutlineColor, X, X, X, X, X, X)
CSS_PROP(X, outline_style, MozOutlineStyle, X, X, X, X, X, X)
CSS_PROP(X, outline_width, MozOutlineWidth, X, X, X, X, X, X)
CSS_PROP(X, outline_offset, MozOutlineOffset, X, X, X, X, X, X)
#undef CSS_PROP_SHORTHAND
#undef CSS_PROP_LIST_EXCLUDE_INTERNAL

Просмотреть файл

@ -165,9 +165,8 @@ namespace css = mozilla::css;
// This lives here because it depends on the above macros.
const PRUint32
nsCSSProps::kParserVariantTable[eCSSProperty_COUNT_no_shorthands] = {
#define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, \
parsevariant_, kwtable_, stylestruct_, stylestructoffset_, \
animtype_) \
#define CSS_PROP(name_, id_, method_, flags_, parsevariant_, kwtable_, \
stylestruct_, stylestructoffset_, animtype_) \
parsevariant_,
#include "nsCSSPropList.h"
#undef CSS_PROP

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -51,9 +51,8 @@
enum nsCSSProperty {
eCSSProperty_UNKNOWN = -1,
#define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, \
parsevariant_, kwtable_, stylestruct_, \
stylestructoffset_, animtype_) \
#define CSS_PROP(name_, id_, method_, flags_, parsevariant_, kwtable_, \
stylestruct_, stylestructoffset_, animtype_) \
eCSSProperty_##id_,
#include "nsCSSPropList.h"
#undef CSS_PROP

Просмотреть файл

@ -60,9 +60,8 @@ extern const char* const kCSSRawProperties[];
// define an array of all CSS properties
const char* const kCSSRawProperties[] = {
#define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, \
parsevariant_, kwtable_, stylestruct_, stylestructoffset_, \
animtype_) \
#define CSS_PROP(name_, id_, method_, flags_, parsevariant_, kwtable_, \
stylestruct_, stylestructoffset_, animtype_) \
#name_,
#include "nsCSSPropList.h"
#undef CSS_PROP
@ -1516,9 +1515,8 @@ nsCSSProps::ValueToKeyword(PRInt32 aValue, const PRInt32 aTable[])
/* static */ const PRInt32* const
nsCSSProps::kKeywordTableTable[eCSSProperty_COUNT_no_shorthands] = {
#define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, \
parsevariant_, kwtable_, stylestruct_, stylestructoffset_, \
animtype_) \
#define CSS_PROP(name_, id_, method_, flags_, parsevariant_, kwtable_, \
stylestruct_, stylestructoffset_, animtype_) \
kwtable_,
#include "nsCSSPropList.h"
#undef CSS_PROP
@ -1562,9 +1560,8 @@ const nsStyleStructID nsCSSProps::kSIDTable[eCSSProperty_COUNT_no_shorthands] =
// Note that this uses the special BackendOnly style struct ID
// (which does need to be valid for storing in the
// nsCSSCompressedDataBlock::mStyleBits bitfield).
#define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, \
parsevariant_, kwtable_, stylestruct_, stylestructoffset_,\
animtype_) \
#define CSS_PROP(name_, id_, method_, flags_, parsevariant_, kwtable_, \
stylestruct_, stylestructoffset_, animtype_) \
eStyleStruct_##stylestruct_,
#include "nsCSSPropList.h"
@ -1574,9 +1571,8 @@ const nsStyleStructID nsCSSProps::kSIDTable[eCSSProperty_COUNT_no_shorthands] =
const nsStyleAnimType
nsCSSProps::kAnimTypeTable[eCSSProperty_COUNT_no_shorthands] = {
#define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, \
parsevariant_, kwtable_, stylestruct_, stylestructoffset_, \
animtype_) \
#define CSS_PROP(name_, id_, method_, flags_, parsevariant_, kwtable_, \
stylestruct_, stylestructoffset_, animtype_) \
animtype_,
#include "nsCSSPropList.h"
#undef CSS_PROP
@ -1584,18 +1580,16 @@ nsCSSProps::kAnimTypeTable[eCSSProperty_COUNT_no_shorthands] = {
const ptrdiff_t
nsCSSProps::kStyleStructOffsetTable[eCSSProperty_COUNT_no_shorthands] = {
#define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, \
parsevariant_, kwtable_, stylestruct_, stylestructoffset_, \
animtype_) \
#define CSS_PROP(name_, id_, method_, flags_, parsevariant_, kwtable_, \
stylestruct_, stylestructoffset_, animtype_) \
stylestructoffset_,
#include "nsCSSPropList.h"
#undef CSS_PROP
};
const PRUint32 nsCSSProps::kFlagsTable[eCSSProperty_COUNT] = {
#define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, \
parsevariant_, kwtable_, stylestruct_, stylestructoffset_, \
animtype_) \
#define CSS_PROP(name_, id_, method_, flags_, parsevariant_, kwtable_, \
stylestruct_, stylestructoffset_, animtype_) \
flags_,
#include "nsCSSPropList.h"
#undef CSS_PROP
@ -2074,9 +2068,8 @@ nsCSSProps::kSubpropertyTable[eCSSProperty_COUNT - eCSSProperty_COUNT_no_shortha
};
#define ENUM_DATA_FOR_PROPERTY(name_, id_, method_, flags_, datastruct_, \
member_, parsevariant_, kwtable_, \
stylestructoffset_, animtype_) \
#define ENUM_DATA_FOR_PROPERTY(name_, id_, method_, flags_, parsevariant_, \
kwtable_, stylestructoffset_, animtype_) \
ePropertyIndex_for_##id_,
// The order of these enums must match the g*Flags arrays in nsRuleNode.cpp.
@ -2255,12 +2248,11 @@ nsCSSProps::gPropertyCountInStruct[nsStyleStructID_Length] = {
/* static */ const size_t
nsCSSProps::gPropertyIndexInStruct[eCSSProperty_COUNT_no_shorthands] = {
#define CSS_PROP_BACKENDONLY(name_, id_, method_, flags_, datastruct_, \
member_, parsevariant_, kwtable_) \
#define CSS_PROP_BACKENDONLY(name_, id_, method_, flags_, parsevariant_, \
kwtable_) \
size_t(-1),
#define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, \
parsevariant_, kwtable_, stylestruct_, \
stylestructoffset_, animtype_) \
#define CSS_PROP(name_, id_, method_, flags_, parsevariant_, kwtable_, \
stylestruct_, stylestructoffset_, animtype_) \
ePropertyIndex_for_##id_,
#include "nsCSSPropList.h"
#undef CSS_PROP

Просмотреть файл

@ -338,9 +338,8 @@ nsDOMCSSDeclaration::RemoveProperty(const nsCSSProperty aPropID)
// nsIDOMCSS2Properties
#define CSS_PROP_DOMPROP_PREFIXED(prop_) Moz ## prop_
#define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, \
parsevariant_, kwtable_, stylestruct_, stylestructoffset_, \
animtype_) \
#define CSS_PROP(name_, id_, method_, flags_, parsevariant_, kwtable_, \
stylestruct_, stylestructoffset_, animtype_) \
NS_IMETHODIMP \
nsDOMCSSDeclaration::Get##method_(nsAString& aValue) \
{ \
@ -355,16 +354,16 @@ nsDOMCSSDeclaration::RemoveProperty(const nsCSSProperty aPropID)
#define CSS_PROP_LIST_EXCLUDE_INTERNAL
#define CSS_PROP_SHORTHAND(name_, id_, method_, flags_) \
CSS_PROP(name_, id_, method_, flags_, X, X, X, X, X, X, X)
CSS_PROP(name_, id_, method_, flags_, X, X, X, X, X)
#include "nsCSSPropList.h"
// Aliases
CSS_PROP(X, opacity, MozOpacity, X, X, X, X, X, X, X, X)
CSS_PROP(X, outline, MozOutline, X, X, X, X, X, X, X, X)
CSS_PROP(X, outline_color, MozOutlineColor, X, X, X, X, X, X, X, X)
CSS_PROP(X, outline_style, MozOutlineStyle, X, X, X, X, X, X, X, X)
CSS_PROP(X, outline_width, MozOutlineWidth, X, X, X, X, X, X, X, X)
CSS_PROP(X, outline_offset, MozOutlineOffset, X, X, X, X, X, X, X, X)
CSS_PROP(X, opacity, MozOpacity, X, X, X, X, X, X)
CSS_PROP(X, outline, MozOutline, X, X, X, X, X, X)
CSS_PROP(X, outline_color, MozOutlineColor, X, X, X, X, X, X)
CSS_PROP(X, outline_style, MozOutlineStyle, X, X, X, X, X, X)
CSS_PROP(X, outline_width, MozOutlineWidth, X, X, X, X, X, X)
CSS_PROP(X, outline_offset, MozOutlineOffset, X, X, X, X, X, X)
#undef CSS_PROP_SHORTHAND
#undef CSS_PROP_LIST_EXCLUDE_INTERNAL

Просмотреть файл

@ -126,9 +126,8 @@ struct nsRuleData
* mSIDs.
*/
#define CSS_PROP_DOMPROP_PREFIXED(prop_) prop_
#define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, \
parsevariant_, kwtable_, stylestruct_, stylestructoffset_,\
animtype_) \
#define CSS_PROP(name_, id_, method_, flags_, parsevariant_, kwtable_, \
stylestruct_, stylestructoffset_, animtype_) \
nsCSSValue* ValueFor##method_() { \
NS_ABORT_IF_FALSE(mSIDs & NS_STYLE_INHERIT_BIT(stylestruct_), \
"Calling nsRuleData::ValueFor" #method_ " without " \
@ -144,8 +143,8 @@ struct nsRuleData
const nsCSSValue* ValueFor##method_() const { \
return const_cast<nsRuleData*>(this)->ValueFor##method_(); \
}
#define CSS_PROP_BACKENDONLY(name_, id_, method_, flags_, datastruct_, \
member_, parsevariant_, kwtable_) \
#define CSS_PROP_BACKENDONLY(name_, id_, method_, flags_, parsevariant_, \
kwtable_) \
/* empty; backend-only structs are not in nsRuleData */
#include "nsCSSPropList.h"
#undef CSS_PROP

Просмотреть файл

@ -1414,9 +1414,8 @@ CheckTextCallback(const nsRuleData* aRuleData,
return aResult;
}
#define FLAG_DATA_FOR_PROPERTY(name_, id_, method_, flags_, datastruct_, \
member_, parsevariant_, kwtable_, \
stylestructoffset_, animtype_) \
#define FLAG_DATA_FOR_PROPERTY(name_, id_, method_, flags_, parsevariant_, \
kwtable_, stylestructoffset_, animtype_) \
flags_,
// The order here must match the enums in *CheckCounter in nsCSSProps.cpp.

Просмотреть файл

@ -49,9 +49,8 @@ struct PropertyInfo {
const PropertyInfo gLonghandProperties[] = {
#define CSS_PROP_DOMPROP_PREFIXED(prop_) Moz ## prop_
#define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, \
parsevariant_, kwtable_, stylestruct_, stylestructoffset_, \
animtype_) \
#define CSS_PROP(name_, id_, method_, flags_, parsevariant_, kwtable_, \
stylestruct_, stylestructoffset_, animtype_) \
{ #name_, #method_ },
#include "nsCSSPropList.h"
@ -69,9 +68,8 @@ const PropertyInfo gLonghandProperties[] = {
const char* gLonghandPropertiesWithDOMProp[] = {
#define CSS_PROP_LIST_EXCLUDE_INTERNAL
#define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, \
parsevariant_, kwtable_, stylestruct_, stylestructoffset_, \
animtype_) \
#define CSS_PROP(name_, id_, method_, flags_, parsevariant_, kwtable_, \
stylestruct_, stylestructoffset_, animtype_) \
#name_,
#include "nsCSSPropList.h"