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

Side by Side Diff: third_party/WebKit/Source/build/scripts/make_css_property_apis.py

Issue 2661003004: Adds framework classes for ALL remaining parseSingleValue Ribbon APIs. (Closed)
Patch Set: format Created 3 years, 10 months 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/build/scripts/templates/CSSPropertyAPIFiles.h.tmpl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2016 The Chromium Authors. All rights reserved. 2 # Copyright 2016 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 import sys 6 import sys
7 7
8 import json5_generator 8 import json5_generator
9 import template_expander 9 import template_expander
10 import make_style_builder 10 import make_style_builder
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 api_methods=api_methods_for_class[classname], 53 api_methods=api_methods_for_class[classname],
54 )) 54 ))
55 55
56 @template_expander.use_jinja('CSSPropertyDescriptor.cpp.tmpl') 56 @template_expander.use_jinja('CSSPropertyDescriptor.cpp.tmpl')
57 def generate_property_descriptor_cpp(self): 57 def generate_property_descriptor_cpp(self):
58 return { 58 return {
59 'api_classes': self._api_classes, 59 'api_classes': self._api_classes,
60 'api_methods': self.json5_file.parameters['api_methods']['valid_valu es'], 60 'api_methods': self.json5_file.parameters['api_methods']['valid_valu es'],
61 } 61 }
62 62
63 # This returned function generates a .h file for the specified property 63 # Provides a function object given the classname of the property.
64 def generate_property_api_h_builder(self, api_classname, api_methods): 64 def generate_property_api_h_builder(self, api_classname, api_methods):
65 @template_expander.use_jinja('CSSPropertyAPIFiles.h.tmpl') 65 @template_expander.use_jinja('CSSPropertyAPIFiles.h.tmpl')
66 def generate_property_api_h(): 66 def generate_property_api_h():
67 return { 67 return {
68 'api_classname': api_classname, 68 'api_classname': api_classname,
69 'api_methods': api_methods, 69 'api_methods': api_methods,
70 } 70 }
71 return generate_property_api_h 71 return generate_property_api_h
72 72
73 if __name__ == '__main__': 73 if __name__ == '__main__':
74 json5_generator.Maker(CSSPropertyAPIWriter).main() 74 json5_generator.Maker(CSSPropertyAPIWriter).main()
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/build/scripts/templates/CSSPropertyAPIFiles.h.tmpl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698