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

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

Issue 2830983003: Remove the concept of 'nonproperties' from ComputedStyle generator. (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 | « third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.cpp.tmpl ('k') | 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 21 matching lines...) Expand all
32 32
33 namespace blink { 33 namespace blink {
34 34
35 // 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
36 // in ComputedStyle.h. 36 // in ComputedStyle.h.
37 class CORE_EXPORT ComputedStyleBase { 37 class CORE_EXPORT ComputedStyleBase {
38 public: 38 public:
39 inline bool IndependentInheritedEqual(const ComputedStyleBase& o) const { 39 inline bool IndependentInheritedEqual(const ComputedStyleBase& o) const {
40 return ( 40 return (
41 {{fieldwise_compare(computed_style, computed_style.all_fields 41 {{fieldwise_compare(computed_style, computed_style.all_fields
42 |selectattr("is_property")
42 |selectattr("is_inherited") 43 |selectattr("is_inherited")
43 |selectattr("is_independent") 44 |selectattr("is_independent")
44 |list 45 |list
45 )|indent(8)}} 46 )|indent(8)}}
46 true 47 true
47 ); 48 );
48 } 49 }
49 50
50 inline bool NonIndependentInheritedEqual(const ComputedStyleBase& o) const { 51 inline bool NonIndependentInheritedEqual(const ComputedStyleBase& o) const {
51 return ( 52 return (
52 {{fieldwise_compare(computed_style, computed_style.all_fields 53 {{fieldwise_compare(computed_style, computed_style.all_fields
54 |selectattr("is_property")
53 |selectattr("is_inherited") 55 |selectattr("is_inherited")
54 |rejectattr("is_independent") 56 |rejectattr("is_independent")
55 |list 57 |list
56 )|indent(8)}} 58 )|indent(8)}}
57 true 59 true
58 ); 60 );
59 } 61 }
60 62
61 inline bool InheritedEqual(const ComputedStyleBase& o) const { 63 inline bool InheritedEqual(const ComputedStyleBase& o) const {
62 return IndependentInheritedEqual(o) && NonIndependentInheritedEqual(o); 64 return IndependentInheritedEqual(o) && NonIndependentInheritedEqual(o);
63 } 65 }
64 66
65 inline bool NonInheritedEqual(const ComputedStyleBase& o) const { 67 inline bool NonInheritedEqual(const ComputedStyleBase& o) const {
66 return ( 68 return (
67 {{fieldwise_compare(computed_style, computed_style.all_fields 69 {{fieldwise_compare(computed_style, computed_style.all_fields
68 |selectattr("is_property") 70 |selectattr("is_property")
71 |rejectattr("has_custom_compare_and_copy")
69 |rejectattr("is_inherited") 72 |rejectattr("is_inherited")
70 |list 73 |list
71 )|indent(8)}} 74 )|indent(8)}}
72 true 75 true
73 ); 76 );
74 } 77 }
75 78
76 enum IsAtShadowBoundary { 79 enum IsAtShadowBoundary {
77 kAtShadowBoundary, 80 kAtShadowBoundary,
78 kNotAtShadowBoundary, 81 kNotAtShadowBoundary,
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 135
133 private: 136 private:
134 {% for field in computed_style.fields %} 137 {% for field in computed_style.fields %}
135 {{declare_storage(field)}} 138 {{declare_storage(field)}}
136 {% endfor %} 139 {% endfor %}
137 }; 140 };
138 141
139 } // namespace blink 142 } // namespace blink
140 143
141 #endif // ComputedStyleBase_h 144 #endif // ComputedStyleBase_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.cpp.tmpl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698