зеркало из https://github.com/mozilla/gecko-dev.git
Bug 849657 patch 1: Expose CSS_PROP_PUBLIC_OR_PRIVATE macro to users of nsCSSPropList.h rather than CSS_PROP_DOMPROP_PREFIXED, so that we can avoid 'CssFloat' spreading even further. r=bzbarsky
This commit is contained in:
Родитель
8bd2833f97
Коммит
93f4ab7a9a
|
@ -12,13 +12,13 @@
|
|||
DO_PROP(method, pref)
|
||||
#define CSS_PROP_SHORTHAND(name, id, method, flags, pref) \
|
||||
DO_PROP(method, pref)
|
||||
#define CSS_PROP_DOMPROP_PREFIXED(val) Moz##val
|
||||
#define CSS_PROP_PUBLIC_OR_PRIVATE(publicname_, privatename_) publicname_
|
||||
#define CSS_PROP_LIST_EXCLUDE_INTERNAL
|
||||
|
||||
#include "nsCSSPropList.h"
|
||||
|
||||
#undef CSS_PROP_LIST_EXCLUDE_INTERNAL
|
||||
#undef CSS_PROP_DOMPROP_PREFIXED
|
||||
#undef CSS_PROP_PUBLIC_OR_PRIVATE
|
||||
#undef CSS_PROP_SHORTHAND
|
||||
#undef CSS_PROP
|
||||
|
||||
|
|
|
@ -32,10 +32,12 @@
|
|||
-. 'method' is designed to be as input for CSS2Properties and similar
|
||||
callers. It must always be the same as 'name' except it must use
|
||||
InterCaps and all hyphens ('-') must be removed. Callers using this
|
||||
parameter must also define the CSS_PROP_DOMPROP_PREFIXED(prop) macro,
|
||||
either to be Moz ## prop or to just be prop, depending on whether they
|
||||
want Moz prefixes or not (i.e., whether the use is for internal use
|
||||
such as nsRuleData::ValueFor* or external use).
|
||||
parameter must also define the CSS_PROP_PUBLIC_OR_PRIVATE(publicname_,
|
||||
privatename_) macro to yield either publicname_ or privatename_.
|
||||
The names differ in that publicname_ has Moz prefixes where they are
|
||||
used, and also in CssFloat vs. Float. The caller's choice depends on
|
||||
whether the use is for internal use such as eCSSProperty_* or
|
||||
nsRuleData::ValueFor* or external use such as exposing DOM properties.
|
||||
|
||||
-. 'pref' is the name of a pref that controls whether the property
|
||||
is enabled. The property is enabled if 'pref' is an empty string,
|
||||
|
@ -76,6 +78,9 @@
|
|||
#define DEFINED_CSS_PROP_SHORTHAND
|
||||
#endif
|
||||
|
||||
#define CSS_PROP_DOMPROP_PREFIXED(name_) \
|
||||
CSS_PROP_PUBLIC_OR_PRIVATE(Moz ## name_, name_)
|
||||
|
||||
#define CSS_PROP_NO_OFFSET (-1)
|
||||
|
||||
// Callers may define CSS_PROP_LIST_EXCLUDE_INTERNAL if they want to
|
||||
|
@ -3640,3 +3645,5 @@ CSS_PROP_TABLE(
|
|||
#undef CSS_PROP_SHORTHAND
|
||||
#undef DEFINED_CSS_PROP_SHORTHAND
|
||||
#endif
|
||||
|
||||
#undef CSS_PROP_DOMPROP_PREFIXED(name_)
|
||||
|
|
|
@ -2259,7 +2259,7 @@ static const nsCSSProperty gMozTransformSubpropTable[] = {
|
|||
|
||||
const nsCSSProperty *const
|
||||
nsCSSProps::kSubpropertyTable[eCSSProperty_COUNT - eCSSProperty_COUNT_no_shorthands] = {
|
||||
#define CSS_PROP_DOMPROP_PREFIXED(prop_) prop_
|
||||
#define CSS_PROP_PUBLIC_OR_PRIVATE(publicname_, privatename_) privatename_
|
||||
// Need an extra level of macro nesting to force expansion of method_
|
||||
// params before they get pasted.
|
||||
#define NSCSSPROPS_INNER_MACRO(method_) g##method_##SubpropTable,
|
||||
|
@ -2268,7 +2268,7 @@ nsCSSProps::kSubpropertyTable[eCSSProperty_COUNT - eCSSProperty_COUNT_no_shortha
|
|||
#include "nsCSSPropList.h"
|
||||
#undef CSS_PROP_SHORTHAND
|
||||
#undef NSCSSPROPS_INNER_MACRO
|
||||
#undef CSS_PROP_DOMPROP_PREFIXED
|
||||
#undef CSS_PROP_PUBLIC_OR_PRIVATE
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ public:
|
|||
NS_IMETHOD GetParentRule(nsIDOMCSSRule * *aParentRule) MOZ_OVERRIDE = 0;
|
||||
|
||||
// WebIDL interface for CSS2Properties
|
||||
#define CSS_PROP_DOMPROP_PREFIXED(prop_) Moz ## prop_
|
||||
#define CSS_PROP_PUBLIC_OR_PRIVATE(publicname_, privatename_) publicname_
|
||||
#define CSS_PROP(name_, id_, method_, flags_, pref_, parsevariant_, \
|
||||
kwtable_, stylestruct_, stylestructoffset_, animtype_) \
|
||||
void \
|
||||
|
@ -88,7 +88,7 @@ public:
|
|||
#undef CSS_PROP_SHORTHAND
|
||||
#undef CSS_PROP_LIST_EXCLUDE_INTERNAL
|
||||
#undef CSS_PROP
|
||||
#undef CSS_PROP_DOMPROP_PREFIXED
|
||||
#undef CSS_PROP_PUBLIC_OR_PRIVATE
|
||||
|
||||
virtual void IndexedGetter(uint32_t aIndex, bool& aFound, nsAString& aPropName);
|
||||
|
||||
|
|
|
@ -91,7 +91,7 @@ struct nsRuleData
|
|||
* Like ValueFor(), the caller must check that the property is within
|
||||
* mSIDs.
|
||||
*/
|
||||
#define CSS_PROP_DOMPROP_PREFIXED(prop_) prop_
|
||||
#define CSS_PROP_PUBLIC_OR_PRIVATE(publicname_, privatename_) privatename_
|
||||
#define CSS_PROP(name_, id_, method_, flags_, pref_, parsevariant_, \
|
||||
kwtable_, stylestruct_, stylestructoffset_, animtype_) \
|
||||
nsCSSValue* ValueFor##method_() { \
|
||||
|
@ -114,7 +114,7 @@ struct nsRuleData
|
|||
/* empty; backend-only structs are not in nsRuleData */
|
||||
#include "nsCSSPropList.h"
|
||||
#undef CSS_PROP
|
||||
#undef CSS_PROP_DOMPROP_PREFIXED
|
||||
#undef CSS_PROP_PUBLIC_OR_PRIVATE
|
||||
#undef CSS_PROP_BACKENDONLY
|
||||
|
||||
private:
|
||||
|
|
|
@ -17,7 +17,7 @@ struct PropertyInfo {
|
|||
|
||||
const PropertyInfo gLonghandProperties[] = {
|
||||
|
||||
#define CSS_PROP_DOMPROP_PREFIXED(prop_) Moz ## prop_
|
||||
#define CSS_PROP_PUBLIC_OR_PRIVATE(publicname_, privatename_) publicname_
|
||||
#define CSS_PROP(name_, id_, method_, flags_, pref_, parsevariant_, kwtable_, \
|
||||
stylestruct_, stylestructoffset_, animtype_) \
|
||||
{ #name_, #method_, pref_ },
|
||||
|
@ -25,7 +25,7 @@ const PropertyInfo gLonghandProperties[] = {
|
|||
#include "nsCSSPropList.h"
|
||||
|
||||
#undef CSS_PROP
|
||||
#undef CSS_PROP_DOMPROP_PREFIXED
|
||||
#undef CSS_PROP_PUBLIC_OR_PRIVATE
|
||||
|
||||
};
|
||||
|
||||
|
@ -50,7 +50,7 @@ const char* gLonghandPropertiesWithDOMProp[] = {
|
|||
|
||||
const PropertyInfo gShorthandProperties[] = {
|
||||
|
||||
#define CSS_PROP_DOMPROP_PREFIXED(prop_) Moz ## prop_
|
||||
#define CSS_PROP_PUBLIC_OR_PRIVATE(publicname_, privatename_) publicname_
|
||||
// Need an extra level of macro nesting to force expansion of method_
|
||||
// params before they get pasted.
|
||||
#define LISTCSSPROPERTIES_INNER_MACRO(method_) #method_
|
||||
|
@ -61,7 +61,7 @@ const PropertyInfo gShorthandProperties[] = {
|
|||
|
||||
#undef CSS_PROP_SHORTHAND
|
||||
#undef LISTCSSPROPERTIES_INNER_MACRO
|
||||
#undef CSS_PROP_DOMPROP_PREFIXED
|
||||
#undef CSS_PROP_PUBLIC_OR_PRIVATE
|
||||
|
||||
#define CSS_PROP_ALIAS(name_, id_, method_, pref_) \
|
||||
{ #name_, #method_, pref_ },
|
||||
|
|
Загрузка…
Ссылка в новой задаче