Bug 1448759 part 4 - Switch gAllSubpropTable to use generated ServoCSSPropList.h. r?heycam
MozReview-Commit-ID: IfzfFpw5ABz
--- a/layout/style/GenerateServoCSSPropList.py
+++ b/layout/style/GenerateServoCSSPropList.py
@@ -79,21 +79,26 @@ def generate_header(output, data):
elif method.startswith("Moz"):
method = "CSS_PROP_DOMPROP_PREFIXED({})".format(method[3:])
if flags:
flags = " | ".join(flags)
else:
flags = "CSSPropFlags(0)"
params = [name, id, method, flags, pref]
+ is_component_of_all = not is_internal and name not in ["direction", "unicode-bidi"]
+ if not is_component_of_all:
+ output.write("#ifndef CSS_PROP_LIST_ONLY_COMPONENTS_OF_ALL_SHORTHAND\n")
if is_internal:
output.write("#ifndef CSS_PROP_LIST_EXCLUDE_INTERNAL\n")
output.write("{}({})\n".format(MACRO_NAMES[proptype], ", ".join(params)))
if is_internal:
output.write("#endif\n")
+ if not is_component_of_all:
+ output.write("#endif\n")
output.write("""
#ifdef DEFINED_CSS_PROP_ALIAS
#undef CSS_PROP_ALIAS
#undef DEFINED_CSS_PROP_ALIAS
#endif
#ifdef DEFINED_CSS_PROP_SHORTHAND
--- a/layout/style/nsCSSProps.cpp
+++ b/layout/style/nsCSSProps.cpp
@@ -2199,19 +2199,19 @@ const CSSPropFlags nsCSSProps::kFlagsTab
#define CSS_PROP_SHORTHAND(name_, id_, method_, flags_, ...) flags_,
#include "mozilla/ServoCSSPropList.h"
#undef CSS_PROP_SHORTHAND
#undef CSS_PROP_LONGHAND
};
static const nsCSSPropertyID gAllSubpropTable[] = {
#define CSS_PROP_LIST_ONLY_COMPONENTS_OF_ALL_SHORTHAND
-#define CSS_PROP(name_, id_, ...) eCSSProperty_##id_,
-#include "nsCSSPropList.h"
-#undef CSS_PROP
+#define CSS_PROP_LONGHAND(name_, id_, ...) eCSSProperty_##id_,
+#include "mozilla/ServoCSSPropList.h"
+#undef CSS_PROP_LONGHAND
#undef CSS_PROP_LIST_ONLY_COMPONENTS_OF_ALL_SHORTHAND
eCSSProperty_UNKNOWN
};
static const nsCSSPropertyID gAnimationSubpropTable[] = {
eCSSProperty_animation_duration,
eCSSProperty_animation_timing_function,
eCSSProperty_animation_delay,