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

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

Issue 2742263002: Add 'storage_only' template to make_computed_style_base.py. (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 unified diff | Download patch
OLDNEW
1 {% from 'macros.tmpl' import license, print_if %} 1 {% from 'macros.tmpl' import license, print_if %}
2 {{license()}} 2 {{license()}}
3 3
4 #ifndef ComputedStyleBase_h 4 #ifndef ComputedStyleBase_h
5 #define ComputedStyleBase_h 5 #define ComputedStyleBase_h
6 6
7 #include "core/ComputedStyleBaseConstants.h" 7 #include "core/ComputedStyleBaseConstants.h"
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 {% for path in include_paths %} 9 {% for path in include_paths %}
10 #include "{{path}}" 10 #include "{{path}}"
11 {% endfor %} 11 {% endfor %}
12 12
13 {# Each field template has macros that we can call to generate specific 13 {# Each field template has macros that we can call to generate specific
14 aspects of the field (e.g. getters, setters). 14 aspects of the field (e.g. getters, setters).
15 #} 15 #}
16 {% import 'fields/keyword.tmpl' as keyword %} 16 {% import 'fields/keyword.tmpl' as keyword %}
17 {% import 'fields/flag.tmpl' as flag %} 17 {% import 'fields/flag.tmpl' as flag %}
18 {% import 'fields/monotonic_flag.tmpl' as monotonic_flag %} 18 {% import 'fields/monotonic_flag.tmpl' as monotonic_flag %}
19 {% set field_templates = { 'keyword': keyword, 'flag': flag, 'monotonic_flag': m onotonic_flag } %} 19 {% import 'fields/storage_only.tmpl' as storage_only %}
20 {% set field_templates = {
21 'keyword': keyword, 'flag': flag, 'monotonic_flag': monotonic_flag, 'storag e_only': storage_only
sashab 2017/03/13 07:57:11 To think about -- these are starting to repeat all
shend 2017/03/14 22:20:06 Yeah I agree. It's a bit tricky because they're re
22 } %}
20 23
21 namespace blink { 24 namespace blink {
22 25
23 // The generated portion of ComputedStyle. For more info, see the header comment 26 // The generated portion of ComputedStyle. For more info, see the header comment
24 // in ComputedStyle.h. 27 // in ComputedStyle.h.
25 class CORE_EXPORT ComputedStyleBase { 28 class CORE_EXPORT ComputedStyleBase {
26 public: 29 public:
27 ALWAYS_INLINE ComputedStyleBase() : 30 ALWAYS_INLINE ComputedStyleBase() :
28 {% for field in fields %} 31 {% for field in fields %}
29 {{field.name}}(static_cast<unsigned>({{field.default_value}})){{print_if(n ot loop.last, ',')}} 32 {{field.name}}(static_cast<unsigned>({{field.default_value}})){{print_if(n ot loop.last, ',')}}
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 protected: 98 protected:
96 // Storage. 99 // Storage.
97 {% for field in fields %} 100 {% for field in fields %}
98 unsigned {{field.name}} : {{field.size}}; // {{field.type_name}} 101 unsigned {{field.name}} : {{field.size}}; // {{field.type_name}}
99 {% endfor %} 102 {% endfor %}
100 }; 103 };
101 104
102 } // namespace blink 105 } // namespace blink
103 106
104 #endif // ComputedStyleBase_h 107 #endif // ComputedStyleBase_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698