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

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

Issue 2793843002: Generalise 'flag' template to 'primitive' when generating ComputedStyle. (Closed)
Patch Set: Created 3 years, 9 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/templates/ComputedStyleBase.h.tmpl » ('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 93b49a89c21cb2eac7bccbd447655fecd5154742..5983b18b7ea38f725ca1faa0f7b4c060ca8e6882 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
@@ -193,8 +193,12 @@ def _create_field(field_role, property_):
type_name = property_['type_name']
default_value = property_['default_value']
size = None
+ elif property_['field_template'] == 'primitive':
+ type_name = property_['type_name']
+ default_value = property_['default_value']
+ size = 1 if type_name == 'bool' else None # pack bools with 1 bit.
else:
- assert property_['field_template'] in ('flag', 'monotonic_flag')
+ assert property_['field_template'] in ('monotonic_flag',)
type_name = 'bool'
default_value = 'false'
size = 1
@@ -222,7 +226,7 @@ def _create_inherited_flag_field(property_):
join_name(property_['name_for_methods'], 'is inherited'),
property_name=property_['name'],
type_name='bool',
- field_template='flag',
+ field_template='primitive',
size=1,
default_value='true',
)
« no previous file with comments | « no previous file | third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698