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

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

Issue 2614883007: Change computed style enums to be prefixed with 'k'. (Closed)
Patch Set: Rebase on ToT. Created 3 years, 11 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/animation/CSSVisibilityInterpolationType.cpp » ('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 7698f78d36f615a1c4909e0a1aa3741c69d457d8..4fa06778a9119703811b7d39a600dcc85a5affeb 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
@@ -83,7 +83,7 @@ class ComputedStyleBaseWriter(make_style_builder.StyleBuilderWriter):
if property['keyword_only'] and property['field_storage_type'] is None:
enum_name = property['type_name']
# From the Blink style guide: Enum members should use InterCaps with an initial capital letter. [names-enum-members]
- enum_values = [camel_case(k) for k in property['keywords']]
+ enum_values = [('k' + camel_case(k)) for k in property['keywords']]
self._computed_enums[enum_name] = enum_values
# A list of all the fields to be generated.
@@ -114,7 +114,7 @@ class ComputedStyleBaseWriter(make_style_builder.StyleBuilderWriter):
assert property['initial_keyword'] is not None, \
('MakeComputedStyleBase requires an initial keyword for keyword_only values, none specified '
'for property ' + property['name'])
- default_value = type_name + '::' + camel_case(property['initial_keyword'])
+ default_value = type_name + '::k' + camel_case(property['initial_keyword'])
# If the property is independent, add the single-bit sized isInherited flag
# to the list of Fields as well.
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/animation/CSSVisibilityInterpolationType.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698