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

Side by Side Diff: sky/engine/build/scripts/css_properties.py

Issue 1229273004: Remove Animations and Transitions. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 5 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 | sky/engine/build/scripts/make_css_property_metadata.py » ('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 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,
16 'inherited': False, 15 'inherited': False,
17 'font': False, 16 'font': False,
18 'svg': False, 17 'svg': False,
19 'name_for_methods': None, 18 'name_for_methods': None,
20 'use_handlers_for': None, 19 'use_handlers_for': None,
21 'getter': None, 20 'getter': None,
22 'setter': None, 21 'setter': None,
23 'initial': None, 22 'initial': None,
24 'type_name': None, 23 'type_name': None,
25 'converter': None, 24 'converter': None,
26 'custom_all': False, 25 'custom_all': False,
27 'custom_initial': False, 26 'custom_initial': False,
28 'custom_inherit': False, 27 'custom_inherit': False,
29 'custom_value': False, 28 'custom_value': False,
30 'builder_skip': False, 29 'builder_skip': False,
31 'direction_aware': False, 30 'direction_aware': False,
32 } 31 }
33 32
34 valid_values = { 33 valid_values = {
35 'animatable': (True, False),
36 'inherited': (True, False), 34 'inherited': (True, False),
37 'font': (True, False), 35 'font': (True, False),
38 'svg': (True, False), 36 'svg': (True, False),
39 'custom_all': (True, False), 37 'custom_all': (True, False),
40 'custom_initial': (True, False), 38 'custom_initial': (True, False),
41 'custom_inherit': (True, False), 39 'custom_inherit': (True, False),
42 'custom_value': (True, False), 40 'custom_value': (True, False),
43 'builder_skip': (True, False), 41 'builder_skip': (True, False),
44 'direction_aware': (True, False), 42 'direction_aware': (True, False),
45 } 43 }
(...skipping 23 matching lines...) Expand all
69 def camelcase_css_name(css_name): 67 def camelcase_css_name(css_name):
70 """Convert hyphen-separated-name to UpperCamelCase. 68 """Convert hyphen-separated-name to UpperCamelCase.
71 69
72 E.g., '-foo-bar' becomes 'FooBar'. 70 E.g., '-foo-bar' becomes 'FooBar'.
73 """ 71 """
74 return ''.join(word.capitalize() for word in css_name.split('-')) 72 return ''.join(word.capitalize() for word in css_name.split('-'))
75 73
76 74
77 def css_name_to_enum(css_name): 75 def css_name_to_enum(css_name):
78 return 'CSSProperty' + camelcase_css_name(css_name) 76 return 'CSSProperty' + camelcase_css_name(css_name)
OLDNEW
« no previous file with comments | « no previous file | sky/engine/build/scripts/make_css_property_metadata.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698