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

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

Issue 2609133002: Generated writing-mode in ComputedStyleBase (Closed)
Patch Set: Created 3 years, 12 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/core/css/CSSProperties.in » ('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 aeba875a4778a7c63c2b8a57e7c124e8ffb408b2..96f60c5057d1cfde5d7045ed323ccd8bf0a29c2c 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
@@ -104,6 +104,13 @@ class ComputedStyleBaseWriter(make_style_builder.StyleBuilderWriter):
type_path = property['field_storage_type']
type_name = type_path.split('/')[-1]
+ # For now, the getter name should match the field name. Later, getter names
+ # will start with an uppercase letter, so if they conflict with the type name,
+ # add 'get' to the front.
+ getter_method_name = property_name_lower
+ if type_name == property_name:
+ getter_method_name = 'get' + property_name
+
assert property['initial_keyword'] is not None, \
('MakeComputedStyleBase requires an initial keyword for keyword_only values, none specified '
'for property ' + property['name'])
@@ -139,7 +146,7 @@ class ComputedStyleBaseWriter(make_style_builder.StyleBuilderWriter):
storage_type_path=type_path,
size=int(math.ceil(bits_needed)),
default_value=default_value,
- getter_method_name=property_name_lower,
+ getter_method_name=getter_method_name,
setter_method_name='set' + property_name,
initial_method_name='initial' + property_name,
resetter_method_name='reset' + property_name,
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/CSSProperties.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698