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

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

Issue 2809053002: Filter out shorthands for make_computed_style_base.py. (Closed)
Patch Set: Add asserts Created 3 years, 8 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 | no next file » | 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 e2849de568032b787c69592f3b46b8e5e232ae6c..be2f62897f2d30a6f7d987d4198d41ce5feacb5b 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
@@ -317,7 +317,13 @@ class ComputedStyleBaseWriter(make_style_builder.StyleBuilderWriter):
if 'type_name' not in property_:
property_['type_name'] = 'E' + enum_type_name(property_['name_for_methods'])
- property_values = self._properties.values()
+ # Ignore shorthand properties
+ for property_ in self._properties.values():
+ if property_['field_template'] is not None:
+ assert not property_['longhands'], \
+ "Shorthand '{}' cannot have a field_template.".format(property_['name'])
+
+ property_values = [value for value in self._properties.values() if not value['longhands']]
for property_ in property_values:
# Override the type name when field_type_path is specified
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698