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

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

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

Powered by Google App Engine
This is Rietveld 408576698