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

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

Issue 2538493005: Added initial_keyword flag to CSSProperties.in (Closed)
Patch Set: Review feedback Created 4 years 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 16 matching lines...) Expand all
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 # Typed OM annotations. 34 # Typed OM annotations.
35 'typedom_types': [], 35 'typedom_types': [],
36 'keywords': [], 36 'keywords': [],
37 'initial_keyword': None,
37 'keyword_only': False, 38 'keyword_only': False,
38 'supports_percentage': False, 39 'supports_percentage': False,
39 'supports_multiple': False, 40 'supports_multiple': False,
40 } 41 }
41 42
42 valid_values = { 43 valid_values = {
43 'interpolable': (True, False), 44 'interpolable': (True, False),
44 'inherited': (True, False), 45 'inherited': (True, False),
45 'independent': (True, False), 46 'independent': (True, False),
46 'font': (True, False), 47 'font': (True, False),
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 self._properties = {property['property_id']: property for property in pr operties} 83 self._properties = {property['property_id']: property for property in pr operties}
83 84
84 # The generated code will only work with at most one alias per property 85 # The generated code will only work with at most one alias per property
85 assert len({property['alias_for'] for property in self._aliases}) == len (self._aliases) 86 assert len({property['alias_for'] for property in self._aliases}) == len (self._aliases)
86 87
87 for property in self._aliases: 88 for property in self._aliases:
88 property['property_id'] = name_utilities.enum_for_css_property_alias (property['name']) 89 property['property_id'] = name_utilities.enum_for_css_property_alias (property['name'])
89 aliased_property = self._properties[name_utilities.enum_for_css_prop erty(property['alias_for'])] 90 aliased_property = self._properties[name_utilities.enum_for_css_prop erty(property['alias_for'])]
90 property['enum_value'] = aliased_property['enum_value'] + 512 91 property['enum_value'] = aliased_property['enum_value'] + 512
91 self._properties_including_aliases += self._aliases 92 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