--- a/dom/base/gen-usecounters.py
+++ b/dom/base/gen-usecounters.py
@@ -57,18 +57,17 @@ def generate_list(f, counters):
print_optional_macro_undeclare('USE_COUNTER_CUSTOM')
def generate_property_map(f, counters):
print(AUTOGENERATED_WARNING_COMMENT, file=f)
print('''
enum {
#define CSS_PROP_PUBLIC_OR_PRIVATE(publicname_, privatename_) privatename_
#define CSS_PROP_LIST_INCLUDE_LOGICAL
- #define CSS_PROP(name_, id_, method_, flags_, pref_, parsevariant_, \\
- kwtable_, stylestruct_, stylestructoffset_, animtype_) \\
+ #define CSS_PROP(name_, id_, method_, ...) \\
USE_COUNTER_FOR_CSS_PROPERTY_##method_ = eUseCounter_UNKNOWN,
#include "nsCSSPropList.h"
#undef CSS_PROP
#undef CSS_PROP_LIST_INCLUDE_LOGICAL
#undef CSS_PROP_PUBLIC_OR_PRIVATE
};
''', file=f)
for counter in counters:
--- a/layout/style/PythonCSSProps.h
+++ b/layout/style/PythonCSSProps.h
@@ -11,23 +11,21 @@
[
#define PROP_STRINGIFY_INTERNAL(X) #X
#define PROP_STRINGIFY(X) PROP_STRINGIFY_INTERNAL(X)
#define DO_PROP(name, method, id, flags, pref, proptype) \
[ #name, #method, #id, PROP_STRINGIFY(flags), pref, proptype ],
-#define CSS_PROP(name, id, method, flags, pref, parsevariant, kwtable, \
- stylestruct, stylestructoffset, animtype) \
+#define CSS_PROP(name, id, method, flags, pref, ...) \
DO_PROP(name, method, id, flags, pref, "longhand")
#define CSS_PROP_SHORTHAND(name, id, method, flags, pref) \
DO_PROP(name, method, id, flags, pref, "shorthand")
-#define CSS_PROP_LOGICAL(name, id, method, flags, pref, parsevariant, kwtable, \
- stylestruct, stylestructoffset, animtype) \
+#define CSS_PROP_LOGICAL(name, id, method, flags, pref, ...) \
DO_PROP(name, method, id, flags, pref, "logical")
#define CSS_PROP_PUBLIC_OR_PRIVATE(publicname_, privatename_) publicname_
#include "nsCSSPropList.h"
#undef CSS_PROP_PUBLIC_OR_PRIVATE
#undef CSS_PROP_LOGICAL
#undef CSS_PROP_SHORTHAND
--- a/layout/style/ServoPropPrefList.h
+++ b/layout/style/ServoPropPrefList.h
@@ -4,18 +4,17 @@
* 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/. */
#ifndef mozilla_ServoPropPrefList_h
#define mozilla_ServoPropPrefList_h
namespace mozilla {
-#define CSS_PROP(name_, id_, method_, flags_, pref_, parsevariant_, kwtable_, \
- stylestruct_, stylestructoffset_, animtype_) \
+#define CSS_PROP(name_, id_, method_, flags_, pref_, ...) \
const bool SERVO_PREF_ENABLED_##id_ = !(sizeof(pref_) == 1);
#define CSS_PROP_SHORTHAND(name_, id_, method_, flags_, pref_) \
const bool SERVO_PREF_ENABLED_##id_ = !(sizeof(pref_) == 1);
#define CSS_PROP_LIST_INCLUDE_LOGICAL
#include "nsCSSPropList.h"
#undef CSS_PROP_LIST_INCLUDE_LOGICAL
#undef CSS_PROP
#undef CSS_PROP_SHORTHAND
--- a/layout/style/nsCSSPropertyID.h
+++ b/layout/style/nsCSSPropertyID.h
@@ -16,30 +16,27 @@
enum values are "eCSSProperty_foo" (where foo is the property)
To change the list of properties, see nsCSSPropList.h
*/
enum nsCSSPropertyID {
eCSSProperty_UNKNOWN = -1,
- #define CSS_PROP(name_, id_, method_, flags_, pref_, parsevariant_, \
- kwtable_, stylestruct_, stylestructoffset_, animtype_) \
- eCSSProperty_##id_,
+ #define CSS_PROP(name_, id_, ...) eCSSProperty_##id_,
#define CSS_PROP_LIST_INCLUDE_LOGICAL
#include "nsCSSPropList.h"
#undef CSS_PROP_LIST_INCLUDE_LOGICAL
#undef CSS_PROP
eCSSProperty_COUNT_no_shorthands,
// Make the count continue where it left off:
eCSSProperty_COUNT_DUMMY = eCSSProperty_COUNT_no_shorthands - 1,
- #define CSS_PROP_SHORTHAND(name_, id_, method_, flags_, pref_) \
- eCSSProperty_##id_,
+ #define CSS_PROP_SHORTHAND(name_, id_, ...) eCSSProperty_##id_,
#include "nsCSSPropList.h"
#undef CSS_PROP_SHORTHAND
eCSSProperty_COUNT,
// Make the count continue where it left off:
eCSSProperty_COUNT_DUMMY2 = eCSSProperty_COUNT - 1,
#define CSS_PROP_ALIAS(aliasname_, aliasid_, id_, method_, pref_) \
--- a/layout/style/nsCSSProps.cpp
+++ b/layout/style/nsCSSProps.cpp
@@ -58,19 +58,17 @@ typedef nsCSSProps::KTableEntry KTableEn
#undef CSS_PROP_LIST_INCLUDE_LOGICAL
#undef CSS_PROP
// required to make the symbol external, so that TestCSSPropertyLookup.cpp can link with it
extern const char* const kCSSRawProperties[];
// define an array of all CSS properties
const char* const kCSSRawProperties[eCSSProperty_COUNT_with_aliases] = {
-#define CSS_PROP(name_, id_, method_, flags_, pref_, parsevariant_, kwtable_, \
- stylestruct_, stylestructoffset_, animtype_) \
- #name_,
+#define CSS_PROP(name_, ...) #name_,
#define CSS_PROP_LIST_INCLUDE_LOGICAL
#include "nsCSSPropList.h"
#undef CSS_PROP_LIST_INCLUDE_LOGICAL
#undef CSS_PROP
#define CSS_PROP_SHORTHAND(name_, id_, method_, flags_, pref_) #name_,
#include "nsCSSPropList.h"
#undef CSS_PROP_SHORTHAND
#define CSS_PROP_ALIAS(aliasname_, aliasid_, id_, method_, pref_) #aliasname_,
@@ -184,18 +182,17 @@ nsCSSProps::AddRefTable(void)
prefObserversInited = true;
#define OBSERVE_PROP(pref_, id_) \
if (pref_[0]) { \
Preferences::AddBoolVarCache(&gPropertyEnabled[id_], \
pref_); \
}
- #define CSS_PROP(name_, id_, method_, flags_, pref_, parsevariant_, \
- kwtable_, stylestruct_, stylestructoffset_, animtype_) \
+ #define CSS_PROP(name_, id_, method_, flags_, pref_, ...) \
OBSERVE_PROP(pref_, eCSSProperty_##id_)
#define CSS_PROP_LIST_INCLUDE_LOGICAL
#include "nsCSSPropList.h"
#undef CSS_PROP_LIST_INCLUDE_LOGICAL
#undef CSS_PROP
#define CSS_PROP_SHORTHAND(name_, id_, method_, flags_, pref_) \
OBSERVE_PROP(pref_, eCSSProperty_##id_)
@@ -2209,19 +2206,18 @@ nsCSSProps::ValueToKeyword(int32_t aValu
return sNullStr;
} else {
return nsCSSKeywords::GetStringValue(keyword);
}
}
/* static */ const KTableEntry* const
nsCSSProps::kKeywordTableTable[eCSSProperty_COUNT_no_shorthands] = {
- #define CSS_PROP(name_, id_, method_, flags_, pref_, parsevariant_, \
- kwtable_, stylestruct_, stylestructoffset_, animtype_) \
- kwtable_,
+ #define CSS_PROP(name_, id_, method_, flags_, pref_, parsevariant_, \
+ kwtable_, ...) kwtable_,
#define CSS_PROP_LIST_INCLUDE_LOGICAL
#include "nsCSSPropList.h"
#undef CSS_PROP_LIST_INCLUDE_LOGICAL
#undef CSS_PROP
};
const nsCString&
nsCSSProps::LookupPropertyValue(nsCSSPropertyID aProp, int32_t aValue)
@@ -2257,18 +2253,18 @@ bool nsCSSProps::GetColorName(int32_t aP
aStr = nsCSSKeywords::GetStringValue(keyword);
nsCSSKeywords::ReleaseTable();
rv = true;
}
return rv;
}
const nsStyleStructID nsCSSProps::kSIDTable[eCSSProperty_COUNT_no_shorthands] = {
- #define CSS_PROP(name_, id_, method_, flags_, pref_, parsevariant_, \
- kwtable_, stylestruct_, stylestructoffset_, animtype_) \
+ #define CSS_PROP(name_, id_, method_, flags_, pref_, parsevariant_, \
+ kwtable_, stylestruct_, ...) \
eStyleStruct_##stylestruct_,
#define CSS_PROP_LIST_INCLUDE_LOGICAL
#include "nsCSSPropList.h"
#undef CSS_PROP_LIST_INCLUDE_LOGICAL
#undef CSS_PROP
};
@@ -2280,34 +2276,30 @@ nsCSSProps::kAnimTypeTable[eCSSProperty_
animtype_,
#define CSS_PROP_LIST_INCLUDE_LOGICAL
#include "nsCSSPropList.h"
#undef CSS_PROP_LIST_INCLUDE_LOGICAL
#undef CSS_PROP
};
const uint32_t nsCSSProps::kFlagsTable[eCSSProperty_COUNT] = {
-#define CSS_PROP(name_, id_, method_, flags_, pref_, parsevariant_, kwtable_, \
- stylestruct_, stylestructoffset_, animtype_) \
- flags_,
+#define CSS_PROP(name_, id_, method_, flags_, ...) flags_,
#define CSS_PROP_LIST_INCLUDE_LOGICAL
#include "nsCSSPropList.h"
#undef CSS_PROP_LIST_INCLUDE_LOGICAL
#undef CSS_PROP
#define CSS_PROP_SHORTHAND(name_, id_, method_, flags_, pref_) flags_,
#include "nsCSSPropList.h"
#undef CSS_PROP_SHORTHAND
};
static const nsCSSPropertyID gAllSubpropTable[] = {
#define CSS_PROP_LIST_ONLY_COMPONENTS_OF_ALL_SHORTHAND
#define CSS_PROP_LIST_INCLUDE_LOGICAL
-#define CSS_PROP(name_, id_, method_, flags_, pref_, parsevariant_, kwtable_, \
- stylestruct_, stylestructoffset_, animtype_) \
- eCSSProperty_##id_,
+#define CSS_PROP(name_, id_, ...) eCSSProperty_##id_,
#include "nsCSSPropList.h"
#undef CSS_PROP
#undef CSS_PROP_LIST_INCLUDE_LOGICAL
#undef CSS_PROP_LIST_ONLY_COMPONENTS_OF_ALL_SHORTHAND
eCSSProperty_UNKNOWN
};
static const nsCSSPropertyID gAnimationSubpropTable[] = {
@@ -2753,18 +2745,17 @@ nsCSSProps::gPropertyEnabled[eCSSPropert
// If the property has any "ENABLED_IN" flag set, it is disabled by
// default. Note that, if a property has pref, whatever its default
// value is, it will later be changed in nsCSSProps::AddRefTable().
// If the property has "ENABLED_IN" flags but doesn't have a pref,
// it is an internal property which is disabled elsewhere.
#define IS_ENABLED_BY_DEFAULT(flags_) \
(!((flags_) & CSS_PROPERTY_ENABLED_MASK))
- #define CSS_PROP(name_, id_, method_, flags_, pref_, parsevariant_, \
- kwtable_, stylestruct_, stylestructoffset_, animtype_) \
+ #define CSS_PROP(name_, id_, method_, flags_, ...) \
IS_ENABLED_BY_DEFAULT(flags_),
#define CSS_PROP_LIST_INCLUDE_LOGICAL
#include "nsCSSPropList.h"
#undef CSS_PROP_LIST_INCLUDE_LOGICAL
#undef CSS_PROP
#define CSS_PROP_SHORTHAND(name_, id_, method_, flags_, pref_) \
IS_ENABLED_BY_DEFAULT(flags_),
@@ -2780,29 +2771,27 @@ nsCSSProps::gPropertyEnabled[eCSSPropert
};
#include "../../dom/base/PropertyUseCounterMap.inc"
/* static */ const UseCounter
nsCSSProps::gPropertyUseCounter[eCSSProperty_COUNT_no_shorthands] = {
#define CSS_PROP_PUBLIC_OR_PRIVATE(publicname_, privatename_) privatename_
#define CSS_PROP_LIST_INCLUDE_LOGICAL
- #define CSS_PROP(name_, id_, method_, flags_, pref_, parsevariant_, \
- kwtable_, stylestruct_, stylestructoffset_, animtype_) \
+ #define CSS_PROP(name_, id_, method_, ...) \
static_cast<UseCounter>(USE_COUNTER_FOR_CSS_PROPERTY_##method_),
#include "nsCSSPropList.h"
#undef CSS_PROP
#undef CSS_PROP_LIST_INCLUDE_LOGICAL
#undef CSS_PROP_PUBLIC_OR_PRIVATE
};
const uint32_t
nsCSSProps::kParserVariantTable[eCSSProperty_COUNT_no_shorthands] = {
-#define CSS_PROP(name_, id_, method_, flags_, pref_, parsevariant_, kwtable_, \
- stylestruct_, stylestructoffset_, animtype_) \
+#define CSS_PROP(name_, id_, method_, flags_, pref_, parsevariant_, ...) \
parsevariant_,
#define CSS_PROP_LIST_INCLUDE_LOGICAL
#include "nsCSSPropList.h"
#undef CSS_PROP_LIST_INCLUDE_LOGICAL
#undef CSS_PROP
};
#include "nsCSSPropsGenerated.inc"
--- a/layout/style/nsComputedDOMStyle.cpp
+++ b/layout/style/nsComputedDOMStyle.cpp
@@ -7160,35 +7160,33 @@ nsComputedDOMStyle::RegisterPrefChangeCa
// just those that are implemented on computed style objects, as it's not
// easy to grab specific property data from nsCSSPropList.h based on the
// entries iterated in nsComputedDOMStylePropertyList.h.
ComputedStyleMap* data = GetComputedStyleMap();
#define REGISTER_CALLBACK(pref_) \
if (pref_[0]) { \
Preferences::RegisterCallback(MarkComputedStyleMapDirty, pref_, data); \
}
-#define CSS_PROP(prop_, id_, method_, flags_, pref_, parsevariant_, \
- kwtable_, stylestruct_, stylestructoffset_, animtype_) \
+#define CSS_PROP(prop_, id_, method_, flags_, pref_, ...) \
REGISTER_CALLBACK(pref_)
#define CSS_PROP_LIST_INCLUDE_LOGICAL
#include "nsCSSPropList.h"
#undef CSS_PROP_LIST_INCLUDE_LOGICAL
#undef CSS_PROP
#undef REGISTER_CALLBACK
}
/* static */ void
nsComputedDOMStyle::UnregisterPrefChangeCallbacks()
{
ComputedStyleMap* data = GetComputedStyleMap();
#define UNREGISTER_CALLBACK(pref_) \
if (pref_[0]) { \
Preferences::UnregisterCallback(MarkComputedStyleMapDirty, pref_, data); \
}
-#define CSS_PROP(prop_, id_, method_, flags_, pref_, parsevariant_, \
- kwtable_, stylestruct_, stylestructoffset_, animtype_) \
+#define CSS_PROP(prop_, id_, method_, flags_, pref_, ...) \
UNREGISTER_CALLBACK(pref_)
#define CSS_PROP_LIST_INCLUDE_LOGICAL
#include "nsCSSPropList.h"
#undef CSS_PROP_LIST_INCLUDE_LOGICAL
#undef CSS_PROP
#undef UNREGISTER_CALLBACK
}
--- a/layout/style/nsDOMCSSDeclaration.h
+++ b/layout/style/nsDOMCSSDeclaration.h
@@ -78,39 +78,37 @@ public:
NS_IMETHOD SetProperty(const nsAString& propertyName,
const nsAString& value,
const nsAString& priority,
nsIPrincipal* aSubjectPrincipal) override;
uint32_t Length() override;
// WebIDL interface for CSS2Properties
#define CSS_PROP_PUBLIC_OR_PRIVATE(publicname_, privatename_) publicname_
-#define CSS_PROP(name_, id_, method_, flags_, pref_, parsevariant_, \
- kwtable_, stylestruct_, stylestructoffset_, animtype_) \
+#define CSS_PROP(name_, id_, method_, ...) \
void \
Get##method_(nsAString& aValue, mozilla::ErrorResult& rv) \
{ \
rv = GetPropertyValue(eCSSProperty_##id_, aValue); \
} \
\
void \
Set##method_(const nsAString& aValue, nsIPrincipal* aSubjectPrincipal, \
mozilla::ErrorResult& rv) \
{ \
rv = SetPropertyValue(eCSSProperty_##id_, aValue, aSubjectPrincipal); \
}
#define CSS_PROP_LIST_EXCLUDE_INTERNAL
#define CSS_PROP_LIST_INCLUDE_LOGICAL
-#define CSS_PROP_SHORTHAND(name_, id_, method_, flags_, pref_) \
- CSS_PROP(name_, id_, method_, flags_, pref_, X, X, X, X, X)
+#define CSS_PROP_SHORTHAND(name_, id_, method_, ...) CSS_PROP(name_, id_, method_, )
#include "nsCSSPropList.h"
-#define CSS_PROP_ALIAS(aliasname_, aliasid_, propid_, aliasmethod_, pref_) \
- CSS_PROP(X, propid_, aliasmethod_, X, pref_, X, X, X, X, X)
+#define CSS_PROP_ALIAS(aliasname_, aliasid_, propid_, aliasmethod_, ...) \
+ CSS_PROP(X, propid_, aliasmethod_, )
#include "nsCSSPropAliasList.h"
#undef CSS_PROP_ALIAS
#undef CSS_PROP_SHORTHAND
#undef CSS_PROP_LIST_INCLUDE_LOGICAL
#undef CSS_PROP_LIST_EXCLUDE_INTERNAL
#undef CSS_PROP
#undef CSS_PROP_PUBLIC_OR_PRIVATE
--- a/layout/style/test/ListCSSProperties.cpp
+++ b/layout/style/test/ListCSSProperties.cpp
@@ -14,18 +14,17 @@ struct PropertyInfo {
const char *propName;
const char *domName;
const char *pref;
};
const PropertyInfo gLonghandProperties[] = {
#define CSS_PROP_PUBLIC_OR_PRIVATE(publicname_, privatename_) publicname_
-#define CSS_PROP(name_, id_, method_, flags_, pref_, parsevariant_, kwtable_, \
- stylestruct_, stylestructoffset_, animtype_) \
+#define CSS_PROP(name_, id_, method_, flags_, pref_, ...) \
{ #name_, #method_, pref_ },
#define CSS_PROP_LIST_INCLUDE_LOGICAL
#include "nsCSSPropList.h"
#undef CSS_PROP_LIST_INCLUDE_LOGICAL
#undef CSS_PROP
#undef CSS_PROP_PUBLIC_OR_PRIVATE
@@ -35,19 +34,17 @@ const PropertyInfo gLonghandProperties[]
/*
* These are the properties for which domName in the above list should
* be used. They're in the same order as the above list, with some
* items skipped.
*/
const char* gLonghandPropertiesWithDOMProp[] = {
#define CSS_PROP_LIST_EXCLUDE_INTERNAL
-#define CSS_PROP(name_, id_, method_, flags_, pref_, parsevariant_, kwtable_, \
- stylestruct_, stylestructoffset_, animtype_) \
- #name_,
+#define CSS_PROP(name_, ...) #name_,
#define CSS_PROP_LIST_INCLUDE_LOGICAL
#include "nsCSSPropList.h"
#undef CSS_PROP_LIST_INCLUDE_LOGICAL
#undef CSS_PROP
#undef CSS_PROP_LIST_EXCLUDE_INTERNAL