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

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

Issue 2876803003: Generate diffs for fields in ComputedStyle that use their public getters (Closed)
Patch Set: 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_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 c039ac174bc2e60661b107c5e12a34f6147e42a7..d81931ac23c7b5635d48db58aaa337646978e4c3 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
@@ -189,18 +189,21 @@ def _group_fields(fields):
def _create_diff_groups_map(diff_function_inputs, root_group):
diff_functions_map = {}
for entry in diff_function_inputs:
- diff_functions_map[entry['name']] = _create_diff_groups(entry['fields'], root_group)
+ diff_functions_map[entry['name']] = _create_diff_groups(entry['fields'], entry['map_of_expressions'], root_group)
return diff_functions_map
-def _create_diff_groups(fields_to_diff, root_group):
+def _create_diff_groups(fields_to_diff, map_of_expressions, root_group):
diff_group = DiffGroup(root_group.member_name)
for subgroup in root_group.subgroups:
- if any(field.property_name in fields_to_diff for field in subgroup.all_fields):
- diff_group.subgroups.append(_create_diff_groups(fields_to_diff, subgroup))
+ if any(field.property_name in (fields_to_diff + map_of_expressions.values()) for field in subgroup.all_fields):
+ diff_group.subgroups.append(_create_diff_groups(fields_to_diff, map_of_expressions, subgroup))
for field in root_group.fields:
if field.property_name in fields_to_diff:
diff_group.expressions.append(field.getter_expression)
+ for expression, property_ in map_of_expressions.iteritems():
+ if property_ == field.property_name:
+ diff_group.expressions.append(expression)
return diff_group

Powered by Google App Engine
This is Rietveld 408576698