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

Unified Diff: third_party/WebKit/Source/build/scripts/make_css_value_id_mappings.py

Issue 2904483003: Replace "field_type_path" with "include_paths" in CSSProperties.json5. (Closed)
Patch Set: Rebase Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/build/scripts/make_css_value_id_mappings.py
diff --git a/third_party/WebKit/Source/build/scripts/make_css_value_id_mappings.py b/third_party/WebKit/Source/build/scripts/make_css_value_id_mappings.py
index 1809ec0e94b3b75a08addc9ea80326568d983160..8394727d702d01f727764c0e1d47011be4affc21 100755
--- a/third_party/WebKit/Source/build/scripts/make_css_value_id_mappings.py
+++ b/third_party/WebKit/Source/build/scripts/make_css_value_id_mappings.py
@@ -20,16 +20,12 @@ class CSSValueIDMappingsWriter(make_style_builder.StyleBuilderWriter):
@template_expander.use_jinja('CSSValueIDMappingsGenerated.h.tmpl')
def generate_css_value_mappings(self):
mappings = {}
- include_paths = []
+ include_paths = set()
for property_ in self._properties.values():
if property_['field_template'] == 'keyword':
- if property_['field_type_path']:
- type_name = property_['field_type_path'].split('/')[-1]
- include_paths.append(property_['field_type_path'] + '.h')
- else:
- type_name = property_['type_name']
+ include_paths.update(property_['include_paths'])
- mappings[type_name] = {
+ mappings[property_['type_name']] = {
'default_value': enum_value_name(property_['default_value']),
'mapping': [(enum_value_name(k), enum_for_css_keyword(k)) for k in property_['keywords']],
}

Powered by Google App Engine
This is Rietveld 408576698