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

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

Issue 2722503002: [CSS Typed OM] Specify and check separators for repeated properties (Closed)
Patch Set: Add "/" as a valid separator in CSSProperties.json5 Created 3 years, 9 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
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 sys 6 import sys
7 7
8 import css_properties 8 import css_properties
9 import json5_generator 9 import json5_generator
10 from name_utilities import lower_first 10 from name_utilities import lower_first
(...skipping 10 matching lines...) Expand all
21 self._outputs = {'CSSPropertyMetadata.cpp': self.generate_css_property_m etadata_cpp} 21 self._outputs = {'CSSPropertyMetadata.cpp': self.generate_css_property_m etadata_cpp}
22 22
23 @template_expander.use_jinja('CSSPropertyMetadata.cpp.tmpl', filters=filters ) 23 @template_expander.use_jinja('CSSPropertyMetadata.cpp.tmpl', filters=filters )
24 def generate_css_property_metadata_cpp(self): 24 def generate_css_property_metadata_cpp(self):
25 return { 25 return {
26 'properties': self._properties, 26 'properties': self._properties,
27 'switches': [('descriptor_only', 'isDescriptorOnly'), 27 'switches': [('descriptor_only', 'isDescriptorOnly'),
28 ('interpolable', 'isInterpolableProperty'), 28 ('interpolable', 'isInterpolableProperty'),
29 ('inherited', 'isInheritedProperty'), 29 ('inherited', 'isInheritedProperty'),
30 ('supports_percentage', 'propertySupportsPercentage'), 30 ('supports_percentage', 'propertySupportsPercentage'),
31 ('repeated', 'propertyIsRepeated') 31 ('separator', 'propertyIsRepeated')
sashab 2017/02/28 23:20:47 Not sure about this part. Do we need propertyIsRep
meade_UTC10 2017/03/01 06:20:28 It's really nice to have both - there are lots of
32 ], 32 ],
33 'first_enum_value': self._first_enum_value, 33 'first_enum_value': self._first_enum_value,
34 } 34 }
35 35
36 36
37 if __name__ == '__main__': 37 if __name__ == '__main__':
38 json5_generator.Maker(CSSPropertyMetadataWriter).main() 38 json5_generator.Maker(CSSPropertyMetadataWriter).main()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698