Index: third_party/WebKit/Source/build/scripts/make_css_property_apis.py |
diff --git a/third_party/WebKit/Source/build/scripts/make_css_property_descriptor.py b/third_party/WebKit/Source/build/scripts/make_css_property_apis.py |
similarity index 80% |
rename from third_party/WebKit/Source/build/scripts/make_css_property_descriptor.py |
rename to third_party/WebKit/Source/build/scripts/make_css_property_apis.py |
index 8e9343167b4eaadb3647653297bf2d1a2c7cfb8f..a9cce8fca9d05605609b44e9546d67c371451409 100755 |
--- a/third_party/WebKit/Source/build/scripts/make_css_property_descriptor.py |
+++ b/third_party/WebKit/Source/build/scripts/make_css_property_apis.py |
@@ -37,6 +37,7 @@ class CSSPropertyAPIWriter(make_style_builder.StyleBuilderWriter): |
continue |
classname = get_classname(property) |
properties_for_class[classname].append(property['property_id']) |
+ self._outputs[classname + '.h'] = self.generate_property_api_h_builder(classname) |
# Stores a list of classes with elements (index, classname, [propertyIDs, ..]). |
self._api_classes = [] |
@@ -55,5 +56,15 @@ class CSSPropertyAPIWriter(make_style_builder.StyleBuilderWriter): |
'api_classes': self._api_classes, |
} |
+ # Provides a function object given the classname of the property. |
+ # This returned function generates a .h file for the specified property. |
sashab
2016/12/15 23:22:22
\o/!
|
+ def generate_property_api_h_builder(self, api_classname): |
+ @template_expander.use_jinja('CSSPropertyAPIFiles.h.tmpl') |
+ def generate_property_api_h(): |
+ return { |
+ 'api_classname': api_classname, |
+ } |
+ return generate_property_api_h |
+ |
if __name__ == '__main__': |
in_generator.Maker(CSSPropertyAPIWriter).main(sys.argv) |