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

Unified Diff: third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl

Issue 2697953004: Add support for generating external types in ComputedStyleBase. (Closed)
Patch Set: remove unused macro 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
Index: third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl
diff --git a/third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl b/third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl
index 5baf4c07819e329a017b5988ee41433da4d63875..e04e7af7fcb29636993954b3d13150bd84d76a69 100644
--- a/third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl
+++ b/third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl
@@ -17,8 +17,14 @@
{% import 'fields/flag.tmpl' as flag %}
{% import 'fields/monotonic_flag.tmpl' as monotonic_flag %}
{% import 'fields/storage_only.tmpl' as storage_only %}
+{% import 'fields/external.tmpl' as external %}
+{% from 'fields/field.tmpl' import encode %}
{% set field_templates = {
- 'keyword': keyword, 'flag': flag, 'monotonic_flag': monotonic_flag, 'storage_only': storage_only
+ 'keyword': keyword,
+ 'flag': flag,
+ 'monotonic_flag': monotonic_flag,
+ 'storage_only': storage_only,
+ 'external': external
} %}
namespace blink {
@@ -83,7 +89,7 @@ class CORE_EXPORT ComputedStyleBase {
// can instantiate this class.
ALWAYS_INLINE ComputedStyleBase() :
{% for field in fields %}
- {{field.name}}(static_cast<unsigned>({{field.default_value}})){{print_if(not loop.last, ',')}}
+ {{field.name}}({{encode(field, field.default_value)}}){{print_if(not loop.last, ',')}}
{% endfor %}
{}
@@ -91,7 +97,11 @@ class CORE_EXPORT ComputedStyleBase {
// Storage.
{% for field in fields %}
+ {% if field.is_bit_field %}
unsigned {{field.name}} : {{field.size}}; // {{field.type_name}}
+ {% else %}
+ {{field.type_name}} {{field.name}};
+ {% endif %}
{% endfor %}
};

Powered by Google App Engine
This is Rietveld 408576698