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

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

Issue 450103005: Add inherited flag to CSSProperties.in (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: mark paint-order inherited 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
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 in_generator 9 import in_generator
10 import template_expander 10 import template_expander
11 11
12 12
13 class CSSPropertyMetadataWriter(css_properties.CSSProperties): 13 class CSSPropertyMetadataWriter(css_properties.CSSProperties):
14 def __init__(self, in_file_path): 14 def __init__(self, in_file_path):
15 super(CSSPropertyMetadataWriter, self).__init__(in_file_path) 15 super(CSSPropertyMetadataWriter, self).__init__(in_file_path)
16 self._outputs = {'CSSPropertyMetadata.cpp': self.generate_css_property_m etadata_cpp} 16 self._outputs = {'CSSPropertyMetadata.cpp': self.generate_css_property_m etadata_cpp}
17 17
18 @template_expander.use_jinja('CSSPropertyMetadata.cpp.tmpl') 18 @template_expander.use_jinja('CSSPropertyMetadata.cpp.tmpl')
19 def generate_css_property_metadata_cpp(self): 19 def generate_css_property_metadata_cpp(self):
20 return { 20 return {
21 'properties': self._properties, 21 'properties': self._properties,
22 'switches': [('animatable', 'isAnimatableProperty'),
23 ('inherited', 'isInheritedProperty'),
24 ],
22 } 25 }
23 26
24 27
25 if __name__ == '__main__': 28 if __name__ == '__main__':
26 in_generator.Maker(CSSPropertyMetadataWriter).main(sys.argv) 29 in_generator.Maker(CSSPropertyMetadataWriter).main(sys.argv)
OLDNEW
« no previous file with comments | « Source/build/scripts/css_properties.py ('k') | Source/build/scripts/templates/CSSPropertyMetadata.cpp.tmpl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698