| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright 2014 The Chromium Authors. All rights reserved. | 2 # Copyright 2014 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 in_generator | 6 import in_generator |
| 7 from name_utilities import lower_first | 7 from name_utilities import lower_first |
| 8 | 8 |
| 9 | 9 |
| 10 class CSSProperties(in_generator.Writer): | 10 class CSSProperties(in_generator.Writer): |
| 11 defaults = { | 11 defaults = { |
| 12 'alias_for': None, | 12 'alias_for': None, |
| 13 'runtime_flag': None, | 13 'runtime_flag': None, |
| 14 'longhands': '', | 14 'longhands': '', |
| 15 'animatable': False, | 15 'interpolable': False, |
| 16 'inherited': False, | 16 'inherited': False, |
| 17 'font': False, | 17 'font': False, |
| 18 'svg': False, | 18 'svg': False, |
| 19 'name_for_methods': None, | 19 'name_for_methods': None, |
| 20 'use_handlers_for': None, | 20 'use_handlers_for': None, |
| 21 'getter': None, | 21 'getter': None, |
| 22 'setter': None, | 22 'setter': None, |
| 23 'initial': None, | 23 'initial': None, |
| 24 'type_name': None, | 24 'type_name': None, |
| 25 'converter': None, | 25 'converter': None, |
| 26 'custom_all': False, | 26 'custom_all': False, |
| 27 'custom_initial': False, | 27 'custom_initial': False, |
| 28 'custom_inherit': False, | 28 'custom_inherit': False, |
| 29 'custom_value': False, | 29 'custom_value': False, |
| 30 'builder_skip': False, | 30 'builder_skip': False, |
| 31 'direction_aware': False, | 31 'direction_aware': False, |
| 32 } | 32 } |
| 33 | 33 |
| 34 valid_values = { | 34 valid_values = { |
| 35 'animatable': (True, False), | 35 'interpolable': (True, False), |
| 36 'inherited': (True, False), | 36 'inherited': (True, False), |
| 37 'font': (True, False), | 37 'font': (True, False), |
| 38 'svg': (True, False), | 38 'svg': (True, False), |
| 39 'custom_all': (True, False), | 39 'custom_all': (True, False), |
| 40 'custom_initial': (True, False), | 40 'custom_initial': (True, False), |
| 41 'custom_inherit': (True, False), | 41 'custom_inherit': (True, False), |
| 42 'custom_value': (True, False), | 42 'custom_value': (True, False), |
| 43 'builder_skip': (True, False), | 43 'builder_skip': (True, False), |
| 44 'direction_aware': (True, False), | 44 'direction_aware': (True, False), |
| 45 } | 45 } |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 """ | 84 """ |
| 85 return ''.join(word.capitalize() for word in css_name.split('-')) | 85 return ''.join(word.capitalize() for word in css_name.split('-')) |
| 86 | 86 |
| 87 | 87 |
| 88 def css_name_to_enum(css_name): | 88 def css_name_to_enum(css_name): |
| 89 return 'CSSProperty' + camelcase_css_name(css_name) | 89 return 'CSSProperty' + camelcase_css_name(css_name) |
| 90 | 90 |
| 91 | 91 |
| 92 def css_alias_name_to_enum(css_name): | 92 def css_alias_name_to_enum(css_name): |
| 93 return 'CSSPropertyAlias' + camelcase_css_name(css_name) | 93 return 'CSSPropertyAlias' + camelcase_css_name(css_name) |
| OLD | NEW |