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

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

Issue 2811253002: Extract default naming logic in StyleBuilderWriter to a method. (Closed)
Patch Set: Add TODO 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 | third_party/WebKit/Source/build/scripts/make_style_builder.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 fbb0aff6366e0d9a2d3d65e2eb8eb658f45d8fde..5cfbcb8b2da12d0606ee48a1e27b29b0410ac94b 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
@@ -312,14 +312,12 @@ class ComputedStyleBaseWriter(make_style_builder.StyleBuilderWriter):
# TODO(shend): Remove this once we move NONPROPERTIES to its own JSON file,
# since the JSON5 reader will handle missing fields and defaults.
for property_ in NONPROPERTIES:
- property_['name_for_methods'] = property_['name']
- if 'field_type_path' not in property_:
- property_['field_type_path'] = None
- if 'type_name' not in property_:
- property_['type_name'] = 'E' + enum_type_name(property_['name_for_methods'])
- property_['getter'] = method_name(property_['name_for_methods'])
- property_['setter'] = method_name(join_name('set', property_['name_for_methods']))
- property_['initial'] = method_name(join_name('initial', property_['name_for_methods']))
+ for parameter in self.json5_file.parameters:
+ if parameter not in property_:
+ property_[parameter] = None
+
+ for property_ in NONPROPERTIES:
+ make_style_builder.apply_property_naming_defaults(property_)
# Ignore shorthand properties
for property_ in self._properties.values():
« no previous file with comments | « no previous file | third_party/WebKit/Source/build/scripts/make_style_builder.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698