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

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

Issue 2879123002: Add generated InheritedDataShared in ComputedStyleBase. (Closed)
Patch Set: Rebase 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 | third_party/WebKit/Source/build/scripts/templates/fields/field.tmpl » ('j') | 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, setter_expression, declare_storage, fieldwise_compare, fieldwise_copy, fieldwise_diff %} 2 {% from 'fields/field.tmpl' import encode, getter_expression, setter_expression, declare_storage, fieldwise_compare, fieldwise_copy, fieldwise_diff, fieldwise_p ointer_compare_inherited %}
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"
11 #include "core/style/DataRef.h" 11 #include "core/style/DataRef.h"
12 #include "core/style/StyleDifference.h" 12 #include "core/style/StyleDifference.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 {{fieldwise_compare(computed_style, computed_style.all_fields 88 {{fieldwise_compare(computed_style, computed_style.all_fields
89 |selectattr("is_property") 89 |selectattr("is_property")
90 |rejectattr("has_custom_compare_and_copy") 90 |rejectattr("has_custom_compare_and_copy")
91 |rejectattr("is_inherited") 91 |rejectattr("is_inherited")
92 |list 92 |list
93 )|indent(8)}} 93 )|indent(8)}}
94 true 94 true
95 ); 95 );
96 } 96 }
97 97
98 inline bool InheritedDataShared(const ComputedStyleBase& o) const {
99 return (
100 {{fieldwise_pointer_compare_inherited(computed_style)|indent(8)}}
101 true
102 );
103 }
104
98 enum IsAtShadowBoundary { 105 enum IsAtShadowBoundary {
99 kAtShadowBoundary, 106 kAtShadowBoundary,
100 kNotAtShadowBoundary, 107 kNotAtShadowBoundary,
101 }; 108 };
102 109
103 void InheritFrom(const ComputedStyleBase& other, 110 void InheritFrom(const ComputedStyleBase& other,
104 IsAtShadowBoundary isAtShadowBoundary) { 111 IsAtShadowBoundary isAtShadowBoundary) {
105 {{fieldwise_copy(computed_style, computed_style.all_fields 112 {{fieldwise_copy(computed_style, computed_style.all_fields
106 |selectattr("is_property") 113 |selectattr("is_property")
107 |selectattr("is_inherited") 114 |selectattr("is_inherited")
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 193
187 private: 194 private:
188 {% for field in computed_style.fields %} 195 {% for field in computed_style.fields %}
189 {{declare_storage(field)}} 196 {{declare_storage(field)}}
190 {% endfor %} 197 {% endfor %}
191 }; 198 };
192 199
193 } // namespace blink 200 } // namespace blink
194 201
195 #endif // ComputedStyleBase_h 202 #endif // ComputedStyleBase_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/build/scripts/templates/fields/field.tmpl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698