Chromium Code Reviews| 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 2a31be9f71f4b30287bb6dcc42cc3a8e0ce3ddff..8f454f2d203fc5055494a8089f120f4279432bd4 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 |
| @@ -168,11 +168,7 @@ def _get_include_paths(properties): |
| """ |
| Get a list of paths that need to be included for ComputedStyleBase. |
| """ |
| - include_paths = set() |
| - for property_ in properties: |
| - if property_['field_type_path'] is not None: |
| - include_paths.add(property_['field_type_path'] + '.h') |
| - return list(sorted(include_paths)) |
| + return list(sorted(set(_flatten_list(property_['include_paths'] for property_ in properties)))) |
|
meade_UTC10
2017/05/26 01:20:18
uh, is there a way that the data can be structured
|
| def _group_fields(fields): |
| @@ -222,8 +218,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']] |
| @@ -409,11 +405,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) |