Bug 1284169 - include ACDEFINES flags in CSS properties PyGen draft
authorAstley Chen <aschen@mozilla.com>
Mon, 04 Jul 2016 13:48:54 +0800 (2016-07-04)
changeset 383435 959a9b4a53c9b9641e481e383a4ede3dbe7b0b31
parent 383328 39dffbba764210b25bfc1e749b4f16db77fa0d46
child 524481 a1797c624e60999fbae93194dd695502f7c5d8c7
push id22027
push useraschen@mozilla.com
push dateMon, 04 Jul 2016 05:49:29 +0000 (2016-07-04)
bugs1284169
milestone50.0a1
Bug 1284169 - include ACDEFINES flags in CSS properties PyGen MozReview-Commit-ID: 6fBTizGkBqG
dom/bindings/GenerateCSS2PropertiesWebIDL.py
layout/style/GenerateCSSPropsGenerated.py
--- 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