From d8e13763a77edba33a8747eb0b2394b0b439edfb Mon Sep 17 00:00:00 2001 From: "L. David Baron" Date: Fri, 11 Sep 2009 06:46:36 -0400 Subject: [PATCH] Rewrap long argument lists to CSS_PROP macros. Whitespace changes only. (Bug 504652) --- layout/style/nsCSSDataBlock.cpp | 14 +++++++------ layout/style/nsCSSProperty.h | 4 +++- layout/style/nsCSSProps.cpp | 26 ++++++++++++++++++------- layout/style/nsDOMCSSDeclaration.cpp | 3 ++- layout/style/test/ListCSSProperties.cpp | 6 ++++-- 5 files changed, 36 insertions(+), 17 deletions(-) diff --git a/layout/style/nsCSSDataBlock.cpp b/layout/style/nsCSSDataBlock.cpp index ee90eae964f..fac5d7d918a 100644 --- a/layout/style/nsCSSDataBlock.cpp +++ b/layout/style/nsCSSDataBlock.cpp @@ -568,13 +568,15 @@ nsCSSExpandedDataBlock::~nsCSSExpandedDataBlock() const nsCSSExpandedDataBlock::PropertyOffsetInfo nsCSSExpandedDataBlock::kOffsetTable[eCSSProperty_COUNT_no_shorthands] = { - #define CSS_PROP_BACKENDONLY(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_) \ - { offsetof(nsCSSExpandedDataBlock, m##datastruct_.member_), \ - size_t(-1), \ + #define CSS_PROP_BACKENDONLY(name_, id_, method_, flags_, datastruct_, \ + member_, type_, kwtable_) \ + { offsetof(nsCSSExpandedDataBlock, m##datastruct_.member_), \ + size_t(-1), \ size_t(-1) }, - #define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestruct_, stylestructoffset_, animtype_) \ - { offsetof(nsCSSExpandedDataBlock, m##datastruct_.member_), \ - offsetof(nsRuleData, m##datastruct_##Data), \ + #define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, \ + kwtable_, stylestruct_, stylestructoffset_, animtype_) \ + { offsetof(nsCSSExpandedDataBlock, m##datastruct_.member_), \ + offsetof(nsRuleData, m##datastruct_##Data), \ offsetof(nsRuleData##datastruct_, member_) }, #include "nsCSSPropList.h" #undef CSS_PROP diff --git a/layout/style/nsCSSProperty.h b/layout/style/nsCSSProperty.h index 73903b6627f..b0a8f053596 100644 --- a/layout/style/nsCSSProperty.h +++ b/layout/style/nsCSSProperty.h @@ -51,7 +51,9 @@ enum nsCSSProperty { eCSSProperty_UNKNOWN = -1, - #define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestruct_, stylestructoffset_, animtype_) eCSSProperty_##id_, + #define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, \ + kwtable_, stylestruct_, stylestructoffset_, animtype_) \ + eCSSProperty_##id_, #include "nsCSSPropList.h" #undef CSS_PROP diff --git a/layout/style/nsCSSProps.cpp b/layout/style/nsCSSProps.cpp index acb7d1ddfb2..ec400d93be1 100644 --- a/layout/style/nsCSSProps.cpp +++ b/layout/style/nsCSSProps.cpp @@ -59,7 +59,9 @@ 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_, type_, kwtable_, stylestruct_, stylestructoffset_, animtype_) #name_, +#define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, \ + kwtable_, stylestruct_, stylestructoffset_, animtype_) \ + #name_, #include "nsCSSPropList.h" #undef CSS_PROP #define CSS_PROP_SHORTHAND(name_, id_, method_, flags_) #name_, @@ -1380,7 +1382,9 @@ 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_, type_, kwtable_, stylestruct_, stylestructoffset_, animtype_) kwtable_, + #define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, \ + kwtable_, stylestruct_, stylestructoffset_, animtype_) \ + kwtable_, #include "nsCSSPropList.h" #undef CSS_PROP }; @@ -1420,7 +1424,9 @@ PRBool nsCSSProps::GetColorName(PRInt32 aPropValue, nsCString &aStr) // define array of all CSS property types const nsCSSType nsCSSProps::kTypeTable[eCSSProperty_COUNT_no_shorthands] = { - #define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestruct_, stylestructoffset_, animtype_) type_, + #define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, \ + kwtable_, stylestruct_, stylestructoffset_, animtype_) \ + type_, #include "nsCSSPropList.h" #undef CSS_PROP }; @@ -1429,7 +1435,9 @@ 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_, type_, kwtable_, stylestruct_, stylestructoffset_, animtype_) eStyleStruct_##stylestruct_, + #define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, \ + kwtable_, stylestruct_, stylestructoffset_, animtype_) \ + eStyleStruct_##stylestruct_, #include "nsCSSPropList.h" @@ -1438,7 +1446,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_, type_, kwtable_, stylestruct_, stylestructoffset_, animtype_) \ +#define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, \ + kwtable_, stylestruct_, stylestructoffset_, animtype_) \ animtype_, #include "nsCSSPropList.h" #undef CSS_PROP @@ -1446,14 +1455,17 @@ nsCSSProps::kAnimTypeTable[eCSSProperty_COUNT_no_shorthands] = { const ptrdiff_t nsCSSProps::kStyleStructOffsetTable[eCSSProperty_COUNT_no_shorthands] = { -#define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestruct_, stylestructoffset_, animtype_) \ +#define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, \ + 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_, type_, kwtable_, stylestruct_, stylestructoffset_, animtype_) flags_, +#define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, \ + kwtable_, stylestruct_, stylestructoffset_, animtype_) \ + flags_, #include "nsCSSPropList.h" #undef CSS_PROP #define CSS_PROP_SHORTHAND(name_, id_, method_, flags_) flags_, diff --git a/layout/style/nsDOMCSSDeclaration.cpp b/layout/style/nsDOMCSSDeclaration.cpp index 4347e0b8a43..f5ef0bfa864 100644 --- a/layout/style/nsDOMCSSDeclaration.cpp +++ b/layout/style/nsDOMCSSDeclaration.cpp @@ -380,7 +380,8 @@ CSS2PropertiesTearoff::QueryInterface(REFNSIID aIID, void** aInstancePtr) // nsIDOMCSS2Properties // nsIDOMNSCSS2Properties -#define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestruct_, stylestructoffset_, animtype_) \ +#define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, \ + kwtable_, stylestruct_, stylestructoffset_, animtype_) \ NS_IMETHODIMP \ CSS2PropertiesTearoff::Get##method_(nsAString& aValue) \ { \ diff --git a/layout/style/test/ListCSSProperties.cpp b/layout/style/test/ListCSSProperties.cpp index dc7a6786711..8ab0674ed0c 100644 --- a/layout/style/test/ListCSSProperties.cpp +++ b/layout/style/test/ListCSSProperties.cpp @@ -48,7 +48,8 @@ struct PropertyInfo { const PropertyInfo gLonghandProperties[] = { -#define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestruct_, stylestructoffset_, animtype_) \ +#define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, \ + kwtable_, stylestruct_, stylestructoffset_, animtype_) \ { #name_, #method_ }, #include "nsCSSPropList.h" @@ -65,7 +66,8 @@ const PropertyInfo gLonghandProperties[] = { const char* gLonghandPropertiesWithDOMProp[] = { #define CSS_PROP_LIST_EXCLUDE_INTERNAL -#define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestruct_, stylestructoffset_, animtype_) \ +#define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, \ + kwtable_, stylestruct_, stylestructoffset_, animtype_) \ #name_, #include "nsCSSPropList.h"