Index: third_party/WebKit/Source/build/scripts/make_css_property_apis.py |
diff --git a/third_party/WebKit/Source/build/scripts/make_css_property_apis.py b/third_party/WebKit/Source/build/scripts/make_css_property_apis.py |
index 2948308033439c57b253b8a1681f9bc5604bef96..c69630de092514edef714da9a3fccb517f1bc7ac 100755 |
--- a/third_party/WebKit/Source/build/scripts/make_css_property_apis.py |
+++ b/third_party/WebKit/Source/build/scripts/make_css_property_apis.py |
@@ -35,19 +35,21 @@ class CSSPropertyAPIWriter(json5_generator.Writer): |
self._outputs = { |
'CSSPropertyDescriptor.cpp': self.generate_property_descriptor_cpp, |
+ 'CSSPropertyAPI.h': self.generate_property_api, |
} |
- # Stores a map of API method name -> (return_type, parameters) |
+ # Stores a map of API method name -> (return_type, parameters, comment) |
self.all_api_methods = {} |
# Stores an ordered list of all API method names. This must match the |
# order they appear in the Descriptor object. |
self.ordered_api_method_names = [] |
- ApiMethod = namedtuple('ApiMethod', ('return_type', 'parameters')) |
+ ApiMethod = namedtuple('ApiMethod', ('return_type', 'parameters', 'comment')) |
for api_method in self.css_property_api_methods.name_dictionaries: |
self.ordered_api_method_names.append(api_method['name']) |
self.all_api_methods[api_method['name']] = ApiMethod( |
sashab
2017/02/10 02:47:09
Add TODO - wrap comment to 72 chars, will do in fo
|
return_type=api_method['return_type'], |
parameters=api_method['parameters'], |
+ comment=api_method['comment'], |
) |
# Temporary map of API classname to list of propertyIDs that the API class is for. |
@@ -83,6 +85,13 @@ class CSSPropertyAPIWriter(json5_generator.Writer): |
'ordered_api_method_names': self.ordered_api_method_names, |
} |
+ @template_expander.use_jinja('CSSPropertyAPI.h.tmpl') |
+ def generate_property_api(self): |
+ return { |
+ 'ordered_api_method_names': self.ordered_api_method_names, |
+ 'all_api_methods': self.all_api_methods, |
+ } |
+ |
# Provides a function object given the classname of the property. |
def generate_property_api_h_builder(self, api_classname): |
@template_expander.use_jinja('CSSPropertyAPIFiles.h.tmpl') |