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

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

Issue 2679963003: Added a getter for properties variable in css_properties.py. (Closed)
Patch Set: Replaced with making a getter Created 3 years, 10 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 | no next file » | 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 json5_generator 6 import json5_generator
7 import name_utilities 7 import name_utilities
8 8
9 9
10 class CSSProperties(json5_generator.Writer): 10 class CSSProperties(json5_generator.Writer):
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 self._properties_including_aliases = properties 51 self._properties_including_aliases = properties
52 self._properties = {property['property_id']: property for property in pr operties} 52 self._properties = {property['property_id']: property for property in pr operties}
53 53
54 # The generated code will only work with at most one alias per property 54 # The generated code will only work with at most one alias per property
55 assert len({property['alias_for'] for property in self._aliases}) == len (self._aliases) 55 assert len({property['alias_for'] for property in self._aliases}) == len (self._aliases)
56 56
57 for property in self._aliases: 57 for property in self._aliases:
58 property['property_id'] = name_utilities.enum_for_css_property_alias (property['name']) 58 property['property_id'] = name_utilities.enum_for_css_property_alias (property['name'])
59 aliased_property = self._properties[name_utilities.enum_for_css_prop erty(property['alias_for'])] 59 aliased_property = self._properties[name_utilities.enum_for_css_prop erty(property['alias_for'])]
60 property['enum_value'] = aliased_property['enum_value'] + 512 60 property['enum_value'] = aliased_property['enum_value'] + 512
61 self._properties_including_aliases += self._aliases 61 self._properties_including_aliases += self._aliases
ktyliu 2017/02/08 04:29:38 do you need to access these other variables too?
62
63 def properties(self):
64 return self._properties
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698