Bug 1448759 part 4 - Switch gAllSubpropTable to use generated ServoCSSPropList.h. r=heycam

MozReview-Commit-ID: IfzfFpw5ABz

--HG--
extra : rebase_source : ce27e8440108763c0758f9dc071b7990fc4034b6
This commit is contained in:
Xidorn Quan 2018-04-29 22:03:48 +10:00
Родитель 8f6370d1d3
Коммит 2e130c425c
2 изменённых файлов: 8 добавлений и 3 удалений

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

@ -84,11 +84,16 @@ def generate_header(output, data):
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

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

@ -2204,9 +2204,9 @@ const CSSPropFlags nsCSSProps::kFlagsTable[eCSSProperty_COUNT] = {
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
};