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

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

Issue 2563913002: Added functionality in ComputedStyleBase to use platform/ types (Closed)
Patch Set: Rebase Created 3 years, 11 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/make_computed_style_base.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 import name_utilities 7 import name_utilities
8 8
9 9
10 class CSSProperties(in_generator.Writer): 10 class CSSProperties(in_generator.Writer):
(...skipping 14 matching lines...) Expand all
25 'initial': None, 25 'initial': None,
26 'type_name': None, 26 'type_name': None,
27 'converter': None, 27 'converter': None,
28 'custom_all': False, 28 'custom_all': False,
29 'custom_initial': False, 29 'custom_initial': False,
30 'custom_inherit': False, 30 'custom_inherit': False,
31 'custom_value': False, 31 'custom_value': False,
32 'builder_skip': False, 32 'builder_skip': False,
33 'direction_aware': False, 33 'direction_aware': False,
34 'api_class': None, 34 'api_class': None,
35 # Generated ComputedStyle annotations.
36 'field_storage_type': None,
35 # Typed OM annotations. 37 # Typed OM annotations.
36 'typedom_types': [], 38 'typedom_types': [],
37 'keywords': [], 39 'keywords': [],
38 'initial_keyword': None, 40 'initial_keyword': None,
39 'keyword_only': False, 41 'keyword_only': False,
40 'supports_percentage': False, 42 'supports_percentage': False,
41 'repeated': False, 43 'repeated': False,
42 } 44 }
43 45
44 valid_values = { 46 valid_values = {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 self._properties = {property['property_id']: property for property in pr operties} 86 self._properties = {property['property_id']: property for property in pr operties}
85 87
86 # The generated code will only work with at most one alias per property 88 # The generated code will only work with at most one alias per property
87 assert len({property['alias_for'] for property in self._aliases}) == len (self._aliases) 89 assert len({property['alias_for'] for property in self._aliases}) == len (self._aliases)
88 90
89 for property in self._aliases: 91 for property in self._aliases:
90 property['property_id'] = name_utilities.enum_for_css_property_alias (property['name']) 92 property['property_id'] = name_utilities.enum_for_css_property_alias (property['name'])
91 aliased_property = self._properties[name_utilities.enum_for_css_prop erty(property['alias_for'])] 93 aliased_property = self._properties[name_utilities.enum_for_css_prop erty(property['alias_for'])]
92 property['enum_value'] = aliased_property['enum_value'] + 512 94 property['enum_value'] = aliased_property['enum_value'] + 512
93 self._properties_including_aliases += self._aliases 95 self._properties_including_aliases += self._aliases
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/build/scripts/make_computed_style_base.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698