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

Unified Diff: third_party/WebKit/Source/build/scripts/make_computed_style_base.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
« no previous file with comments | « no previous file | third_party/WebKit/Source/build/scripts/make_css_value_id_mappings.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/build/scripts/make_computed_style_base.py
diff --git a/third_party/WebKit/Source/build/scripts/make_computed_style_base.py b/third_party/WebKit/Source/build/scripts/make_computed_style_base.py
index 787cee19849787eef9a24045da25f01337c15b4e..9bd3bfd693e8ea28969951c503b573997aa08b7f 100755
--- a/third_party/WebKit/Source/build/scripts/make_computed_style_base.py
+++ b/third_party/WebKit/Source/build/scripts/make_computed_style_base.py
@@ -174,8 +174,7 @@ def _get_include_paths(properties):
"""
include_paths = set()
for property_ in properties:
- if property_['field_type_path'] is not None:
- include_paths.add(property_['field_type_path'] + '.h')
+ include_paths.update(property_['include_paths'])
return list(sorted(include_paths))
@@ -230,8 +229,8 @@ def _create_enums(properties):
"""
enums = {}
for property_ in properties:
- # Only generate enums for keyword properties that use the default field_type_path.
- if property_['field_template'] == 'keyword' and property_['field_type_path'] is None:
+ # Only generate enums for keyword properties that do not require includes.
+ if property_['field_template'] == 'keyword' and len(property_['include_paths']) == 0:
enum_name = property_['type_name']
enum_values = [enum_value_name(k) for k in property_['keywords']]
@@ -423,11 +422,6 @@ class ComputedStyleBaseWriter(make_style_builder.StyleBuilderWriter):
all_properties = css_properties + extra_fields
- # Override the type name when field_type_path is specified
- for property_ in all_properties:
- if property_['field_type_path']:
- property_['type_name'] = property_['field_type_path'].split('/')[-1]
-
self._generated_enums = _create_enums(all_properties)
all_fields = _create_fields(all_properties)
« no previous file with comments | « no previous file | third_party/WebKit/Source/build/scripts/make_css_value_id_mappings.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698