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 21bc41b38dba82ee79a02d97aeaa9c145c945538..f766782e841ed6f211bf7cfe2f83b305a7d12bf9 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 |
@@ -27,6 +27,7 @@ NONPROPERTY_FIELDS = [ |
{'name': 'hasVariableReferenceFromNonInheritedProperty', 'field': {'template': 'monotonic_flag'}}, |
# Explicitly inherits a non-inherited property |
{'name': 'hasExplicitlyInheritedProperties', 'field': {'template': 'monotonic_flag'}}, |
+ {'name': 'emptyState', 'field': {'template': 'storage_only', 'size': 1}}, |
sashab
2017/03/13 07:57:11
# These properties only have generated storage, an
shend
2017/03/14 22:20:06
Done.
|
] |
@@ -204,8 +205,8 @@ def _create_nonproperty_field(property_): |
""" |
Create a nonproperty field from its name and return the Field object. |
""" |
- # TODO(shend): Make this work for nonflags |
- assert property_['field']['template'] in ('flag', 'monotonic_flag'), \ |
+ # TODO(shend): Make this work for other templates (need to compute size correctly) |
+ assert property_['field']['template'] in ('flag', 'monotonic_flag', 'storage_only'), \ |
"Nonproperties with arbitrary templates are not yet supported" |
member_name = 'm_' + property_['name'] |
field_name_upper = upper_first_letter(property_['name']) |
@@ -216,7 +217,7 @@ def _create_nonproperty_field(property_): |
property_name=property_['name'], |
type_name='bool', |
template=property_['field']['template'], |
- size=1, |
+ size=property_['field'].get('size', 1), |
sashab
2017/03/13 07:57:11
Can you document somewhere (like at the top of the
shend
2017/03/14 22:20:06
Done.
|
default_value='false', |
getter_method_name=property_['name'], |
setter_method_name='set' + field_name_upper, |