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
4 # found in the LICENSE file.
10 from name_utilities
import lower_first
11 import template_expander
14 class CSSPropertyMetadataWriter(css_properties
.CSSProperties
):
16 'lower_first': lower_first
,
19 def __init__(self
, in_file_path
):
20 super(CSSPropertyMetadataWriter
, self
).__init
__(in_file_path
)
21 self
._outputs
= {'CSSPropertyMetadata.cpp': self
.generate_css_property_metadata_cpp
}
23 @template_expander.use_jinja('CSSPropertyMetadata.cpp.tmpl', filters
=filters
)
24 def generate_css_property_metadata_cpp(self
):
26 'properties': self
._properties
,
27 'switches': [('interpolable', 'isInterpolableProperty'),
28 ('inherited', 'isInheritedProperty'),
30 'first_enum_value': self
._first
_enum
_value
,
34 if __name__
== '__main__':
35 in_generator
.Maker(CSSPropertyMetadataWriter
).main(sys
.argv
)