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

Side by Side Diff: Source/build/scripts/make_style_builder.py

Issue 677103002: Expand system font values during property parsing. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: OVERRIDE -> override, Allow CSSValueNone in systemFont() Created 6 years, 2 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
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (C) 2013 Google Inc. All rights reserved. 2 # Copyright (C) 2013 Google Inc. All rights reserved.
3 # 3 #
4 # Redistribution and use in source and binary forms, with or without 4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions are 5 # modification, are permitted provided that the following conditions are
6 # met: 6 # met:
7 # 7 #
8 # * Redistributions of source code must retain the above copyright 8 # * Redistributions of source code must retain the above copyright
9 # notice, this list of conditions and the following disclaimer. 9 # notice, this list of conditions and the following disclaimer.
10 # * Redistributions in binary form must reproduce the above 10 # * Redistributions in binary form must reproduce the above
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 set_if_none(property, 'getter', lower_first(name)) 59 set_if_none(property, 'getter', lower_first(name))
60 set_if_none(property, 'setter', 'set' + name) 60 set_if_none(property, 'setter', 'set' + name)
61 set_if_none(property, 'initial', 'initial' + name) 61 set_if_none(property, 'initial', 'initial' + name)
62 if property['custom_all']: 62 if property['custom_all']:
63 property['custom_initial'] = True 63 property['custom_initial'] = True
64 property['custom_inherit'] = True 64 property['custom_inherit'] = True
65 property['custom_value'] = True 65 property['custom_value'] = True
66 property['should_declare_functions'] = not property['use_handlers_fo r'] and not property['longhands'] \ 66 property['should_declare_functions'] = not property['use_handlers_fo r'] and not property['longhands'] \
67 and not property['direction_a ware'] and not property['builder_skip'] 67 and not property['direction_a ware'] and not property['builder_skip']
68 68
69 self._properties['CSSPropertyFont']['should_declare_functions'] = True
70
71 @template_expander.use_jinja('StyleBuilderFunctions.h.tmpl', 69 @template_expander.use_jinja('StyleBuilderFunctions.h.tmpl',
72 filters=filters) 70 filters=filters)
73 def generate_style_builder_functions_h(self): 71 def generate_style_builder_functions_h(self):
74 return { 72 return {
75 'properties': self._properties, 73 'properties': self._properties,
76 } 74 }
77 75
78 @template_expander.use_jinja('StyleBuilderFunctions.cpp.tmpl', 76 @template_expander.use_jinja('StyleBuilderFunctions.cpp.tmpl',
79 filters=filters) 77 filters=filters)
80 def generate_style_builder_functions_cpp(self): 78 def generate_style_builder_functions_cpp(self):
81 return { 79 return {
82 'properties': self._properties, 80 'properties': self._properties,
83 } 81 }
84 82
85 @template_expander.use_jinja('StyleBuilder.cpp.tmpl', filters=filters) 83 @template_expander.use_jinja('StyleBuilder.cpp.tmpl', filters=filters)
86 def generate_style_builder(self): 84 def generate_style_builder(self):
87 return { 85 return {
88 'properties': self._properties, 86 'properties': self._properties,
89 } 87 }
90 88
91 89
92 if __name__ == '__main__': 90 if __name__ == '__main__':
93 in_generator.Maker(StyleBuilderWriter).main(sys.argv) 91 in_generator.Maker(StyleBuilderWriter).main(sys.argv)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698