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

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

Issue 2871793002: Revert of Move nested classes in ComputedStyleBase outside. (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 {% from 'macros.tmpl' import license, print_if %} 1 {% from 'macros.tmpl' import license, print_if %}
2 {% from 'fields/field.tmpl' import encode, getter_expression, declare_storage, f ieldwise_compare %} 2 {% from 'fields/field.tmpl' import encode, getter_expression, declare_storage, f ieldwise_compare %}
3 {% from 'fields/group.tmpl' import define_field_group_class %} 3 {% from 'fields/group.tmpl' import define_field_group_class %}
4 {{license()}} 4 {{license()}}
5 5
6 #ifndef ComputedStyleBase_h 6 #ifndef ComputedStyleBase_h
7 #define ComputedStyleBase_h 7 #define ComputedStyleBase_h
8 8
9 #include "core/style/ComputedStyleConstants.h" 9 #include "core/style/ComputedStyleConstants.h"
10 #include "core/CoreExport.h" 10 #include "core/CoreExport.h"
(...skipping 14 matching lines...) Expand all
25 {% set field_templates = { 25 {% set field_templates = {
26 'keyword': keyword, 26 'keyword': keyword,
27 'primitive': primitive, 27 'primitive': primitive,
28 'monotonic_flag': monotonic_flag, 28 'monotonic_flag': monotonic_flag,
29 'storage_only': storage_only, 29 'storage_only': storage_only,
30 'external': external 30 'external': external
31 } %} 31 } %}
32 32
33 namespace blink { 33 namespace blink {
34 34
35 {% for subgroup in computed_style.subgroups %}
36 {{define_field_group_class(subgroup)|indent(2)}}
37
38 {% endfor %}
39
40 // The generated portion of ComputedStyle. For more info, see the header comment 35 // The generated portion of ComputedStyle. For more info, see the header comment
41 // in ComputedStyle.h. 36 // in ComputedStyle.h.
42 class CORE_EXPORT ComputedStyleBase { 37 class CORE_EXPORT ComputedStyleBase {
43 public: 38 public:
44 inline bool IndependentInheritedEqual(const ComputedStyleBase& o) const { 39 inline bool IndependentInheritedEqual(const ComputedStyleBase& o) const {
45 return ( 40 return (
46 {{fieldwise_compare(computed_style, computed_style.all_fields 41 {{fieldwise_compare(computed_style, computed_style.all_fields
47 |selectattr("is_property") 42 |selectattr("is_property")
48 |selectattr("is_inherited") 43 |selectattr("is_inherited")
49 |selectattr("is_independent") 44 |selectattr("is_independent")
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 92
98 // Fields. 93 // Fields.
99 // TODO(sashab): Remove initialFoo() static methods and update callers to 94 // TODO(sashab): Remove initialFoo() static methods and update callers to
100 // use resetFoo(), which can be more efficient. 95 // use resetFoo(), which can be more efficient.
101 96
102 {% for field in computed_style.all_fields %} 97 {% for field in computed_style.all_fields %}
103 // {{field.property_name}} 98 // {{field.property_name}}
104 {{field_templates[field.field_template].decl_public_methods(field)|indent(2)}} 99 {{field_templates[field.field_template].decl_public_methods(field)|indent(2)}}
105 100
106 {% endfor %} 101 {% endfor %}
102 private:
103 {% for subgroup in computed_style.subgroups %}
104 {{define_field_group_class(subgroup)|indent(2)}}
105
106 {% endfor %}
107 107
108 protected: 108 protected:
109 // Constructor and destructor are protected so that only the parent class Comp utedStyle 109 // Constructor and destructor are protected so that only the parent class Comp utedStyle
110 // can instantiate this class. 110 // can instantiate this class.
111 ALWAYS_INLINE ComputedStyleBase() : 111 ALWAYS_INLINE ComputedStyleBase() :
112 {% for field in computed_style.fields %} 112 {% for field in computed_style.fields %}
113 {{field.name}}({{encode(field, field.default_value)}}){{print_if(not loop. last, ',')}} 113 {{field.name}}({{encode(field, field.default_value)}}){{print_if(not loop. last, ',')}}
114 {% endfor %} 114 {% endfor %}
115 { 115 {
116 {% for subgroup in computed_style.subgroups %} 116 {% for subgroup in computed_style.subgroups %}
(...skipping 18 matching lines...) Expand all
135 135
136 private: 136 private:
137 {% for field in computed_style.fields %} 137 {% for field in computed_style.fields %}
138 {{declare_storage(field)}} 138 {{declare_storage(field)}}
139 {% endfor %} 139 {% endfor %}
140 }; 140 };
141 141
142 } // namespace blink 142 } // namespace blink
143 143
144 #endif // ComputedStyleBase_h 144 #endif // ComputedStyleBase_h
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698