Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(165)

Unified Diff: third_party/WebKit/Source/build/scripts/make_css_property_apis.py

Issue 2578773002: Made a generator for .h files for implementations of CSSPropertyAPI.h (Closed)
Patch Set: Rebase Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/build/scripts/make_css_property_descriptor.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
« no previous file with comments | « no previous file | third_party/WebKit/Source/build/scripts/make_css_property_descriptor.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698