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

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

Issue 2329463004: ABANDONED CL: Changes needed to make things compile after running rewrite_to_chrome_style tool. (Closed)
Patch Set: More fixes - things build fine at this point. 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
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 03bf4aaa816beef4ba8de28129d77a814a42d28c..29475a0ad2e7a0a5101144b71e03e907dac13656 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
@@ -62,7 +62,7 @@ NONPROPERTIES = [
'type_name': 'bool', 'inherited': False, 'independent': False},
{'name': 'StyleType', 'field_template': 'storage_only', 'size': 6, 'default_value': '0',
'type_name': 'PseudoId', 'inherited': False, 'independent': False},
- {'name': 'PseudoBits', 'field_template': 'storage_only', 'size': 8, 'default_value': 'PseudoIdNone',
+ {'name': 'PseudoBits', 'field_template': 'storage_only', 'size': 8, 'default_value': 'kPseudoIdNone',
'type_name': 'PseudoId', 'inherited': False, 'independent': False},
# True if 'underline solid' is the only text decoration on this element.
{'name': 'HasSimpleUnderline', 'field_template': 'storage_only', 'size': 1, 'default_value': 'false',
@@ -105,7 +105,7 @@ class Field(object):
"""
def __init__(self, field_role, name_for_methods, property_name, type_name,
- field_template, size, default_value, **kwargs):
+ field_template, size, default_value, properties, **kwargs):
"""Creates a new field."""
self.name = class_member_name(name_for_methods)
self.property_name = property_name
@@ -129,11 +129,14 @@ class Field(object):
self.is_inherited_method_name = method_name(join_name(name_for_methods, 'is inherited'))
# Method names
- getter_prefix = 'Get' if name_for_methods == self.type_name else ''
- self.getter_method_name = method_name(join_name(getter_prefix, name_for_methods))
- self.setter_method_name = method_name(join_name('set', name_for_methods))
- self.initial_method_name = method_name(join_name('initial', name_for_methods))
- self.resetter_method_name = method_name(join_name('reset', name_for_methods))
+ if 'getter' in properties and not self.is_inherited_flag:
+ self.getter_method_name = properties['getter']
+ else:
+ getter_prefix = 'Get' if name_for_methods == self.type_name else ''
+ self.getter_method_name = method_name(join_name(getter_prefix, name_for_methods))
+ self.setter_method_name = method_name(join_name('Set', name_for_methods))
+ self.initial_method_name = method_name(join_name('Initial', name_for_methods))
+ self.resetter_method_name = method_name(join_name('Reset', name_for_methods))
# If the size of the field is not None, it means it is a bit field
self.is_bit_field = self.size is not None
@@ -221,6 +224,7 @@ def _create_field(field_role, property_):
field_template=property_['field_template'],
size=size,
default_value=default_value,
+ properties=property_,
)
@@ -237,6 +241,7 @@ def _create_inherited_flag_field(property_):
field_template='primitive',
size=1,
default_value='true',
+ properties=property_,
)

Powered by Google App Engine
This is Rietveld 408576698