Bug 1284169 - include ACDEFINES flags in CSS properties PyGen
MozReview-Commit-ID: 6fBTizGkBqG
--- a/dom/bindings/GenerateCSS2PropertiesWebIDL.py
+++ b/dom/bindings/GenerateCSS2PropertiesWebIDL.py
@@ -12,16 +12,17 @@ from mozbuild import shellutil
# Generates a line of WebIDL with the given spelling of the property name
# (whether camelCase, _underscorePrefixed, etc.) and the given array of
# extended attributes.
def generateLine(propName, extendedAttrs):
return " [%s] attribute DOMString %s;\n" % (", ".join(extendedAttrs),
propName)
def generate(output, idlFilename, preprocessorHeader):
cpp = shellutil.split(buildconfig.substs['CPP'])
+ cpp += shellutil.split(buildconfig.substs['ACDEFINES'])
cpp.append(preprocessorHeader)
preprocessed = subprocess.check_output(cpp)
propList = eval(preprocessed)
props = ""
for [name, prop, id, flags, pref, proptype] in propList:
if "CSS_PROPERTY_INTERNAL" in flags:
continue
--- a/layout/style/GenerateCSSPropsGenerated.py
+++ b/layout/style/GenerateCSSPropsGenerated.py
@@ -6,16 +6,17 @@ import sys
import string
import argparse
import subprocess
import buildconfig
from mozbuild import shellutil
def get_properties(preprocessorHeader):
cpp = shellutil.split(buildconfig.substs['CPP'])
+ cpp += shellutil.split(buildconfig.substs['ACDEFINES'])
cpp.append(preprocessorHeader)
preprocessed = subprocess.check_output(cpp)
properties = [{"name":p[0], "prop":p[1], "id":p[2],
"flags":p[3], "pref":p[4], "proptype":p[5]}
for (i, p) in enumerate(eval(preprocessed))]
# Sort the list so that longhand and logical properties are intermingled
# first, shorthand properties follow, then aliases appear last. This matches