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

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: Rebase Created 3 years, 10 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 b40d4dfc6e5202e91f8dd6642a3ef1a7c1256402..047caddc55a9a694c5e2feafdb3de62dcd5eebc2 100644
--- a/third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl
+++ b/third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl
@@ -16,7 +16,13 @@
{% import 'fields/keyword.tmpl' as keyword %}
{% import 'fields/flag.tmpl' as flag %}
{% import 'fields/monotonic_flag.tmpl' as monotonic_flag %}
-{% set field_templates = { 'keyword': keyword, 'flag': flag, 'monotonic_flag': monotonic_flag } %}
+{% import 'fields/external.tmpl' as external %}
+{% set field_templates = {
+ 'keyword': keyword,
+ 'flag': flag,
+ 'monotonic_flag': monotonic_flag,
+ 'external': external
+ } %}
namespace blink {
@@ -26,7 +32,11 @@ class CORE_EXPORT ComputedStyleBase {
public:
ALWAYS_INLINE ComputedStyleBase() :
{% for field in fields %}
+ {% if field.is_packed %}
{{field.name}}(static_cast<unsigned>({{field.default_value}})){{print_if(not loop.last, ',')}}
+ {% else %}
+ {{field.name}}({{field.default_value}}){{print_if(not loop.last, ',')}}
+ {% endif %}
{% endfor %}
{}
~ComputedStyleBase() {}
@@ -105,7 +115,11 @@ class CORE_EXPORT ComputedStyleBase {
protected:
// Storage.
{% for field in fields %}
+ {% if field.is_packed %}
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