OLD | NEW |
1 { | 1 { |
2 // This file specifies fields in ComputedStyle that we would like to | 2 // This file specifies fields in ComputedStyle that we would like to |
3 // generate, but are not CSS properties. | 3 // generate, but are not CSS properties. |
4 | 4 |
5 parameters: { | 5 parameters: { |
6 // If the field has_custom_compare_and_copy, then it does not appear in | 6 // If true, we do not include this field in ComputedStyleBase::InheritFrom |
7 // ComputedStyle::operator== and ComputedStyle::CopyNonInheritedFromCached. | 7 // and ComputedStyleBase::CopyNonInheritedFromCached. |
8 has_custom_compare_and_copy: { | 8 custom_copy: { |
9 default: false, | 9 default: false, |
10 }, | 10 }, |
11 | 11 |
| 12 // If true, we do not include this field in ComputedStyleBase::InheritedEqua
l |
| 13 // and ComputedStyleBase::NonInheritedEqual. |
| 14 custom_compare: { |
| 15 default: false, |
| 16 }, |
| 17 |
12 // The rest is the same as CSSProperties.json5, but the only relevant ones i
n | 18 // The rest is the same as CSSProperties.json5, but the only relevant ones i
n |
13 // this file are: | 19 // this file are: |
14 // name, field_template, include_paths, default_value, type_name, keyword, | 20 // name, field_template, include_paths, default_value, type_name, keyword, |
15 // inherited | 21 // inherited |
16 }, | 22 }, |
17 | 23 |
18 data: [ | 24 data: [ |
19 { | 25 { |
20 name: "IsLink", | 26 name: "IsLink", |
21 field_template: "monotonic_flag", | 27 field_template: "monotonic_flag", |
22 default_value: "false", | 28 default_value: "false", |
23 has_custom_compare_and_copy: true, | 29 custom_copy: true, |
| 30 custom_compare: true, |
24 }, | 31 }, |
25 { | 32 { |
26 name: "BorderLeftColorIsCurrentColor", | 33 name: "BorderLeftColorIsCurrentColor", |
27 field_template: "primitive", | 34 field_template: "primitive", |
28 default_value: "true", | 35 default_value: "true", |
29 type_name: "bool", | 36 type_name: "bool", |
30 field_group: "surround", | 37 field_group: "surround", |
31 }, | 38 }, |
32 { | 39 { |
33 name: "BorderRightColorIsCurrentColor", | 40 name: "BorderRightColorIsCurrentColor", |
(...skipping 26 matching lines...) Expand all Loading... |
60 "table-footer-group", "table-row", "table-column-group", "table-column
", "table-cell", "table-caption", "-webkit-box", | 67 "table-footer-group", "table-row", "table-column-group", "table-column
", "table-cell", "table-caption", "-webkit-box", |
61 "-webkit-inline-box", "flex", "inline-flex", "grid", "inline-grid", "c
ontents", "flow-root", "none", | 68 "-webkit-inline-box", "flex", "inline-flex", "grid", "inline-grid", "c
ontents", "flow-root", "none", |
62 ], | 69 ], |
63 }, | 70 }, |
64 { | 71 { |
65 name: "InsideLink", | 72 name: "InsideLink", |
66 field_template: "keyword", | 73 field_template: "keyword", |
67 default_value: "not-inside-link", | 74 default_value: "not-inside-link", |
68 keywords: ["not-inside-link", "inside-unvisited-link", "inside-visited-lin
k"], | 75 keywords: ["not-inside-link", "inside-unvisited-link", "inside-visited-lin
k"], |
69 inherited: true, | 76 inherited: true, |
70 has_custom_compare_and_copy: true, | |
71 }, | 77 }, |
72 // Style can not be shared. | 78 // Style can not be shared. |
73 { | 79 { |
74 name: "Unique", | 80 name: "Unique", |
75 field_template: "monotonic_flag", | 81 field_template: "monotonic_flag", |
76 default_value: "false", | 82 default_value: "false", |
77 has_custom_compare_and_copy: true, | 83 custom_copy: true, |
| 84 custom_compare: true, |
78 }, | 85 }, |
79 // Whether this style is affected by these pseudo-classes. | 86 // Whether this style is affected by these pseudo-classes. |
80 { | 87 { |
81 name: "AffectedByFocus", | 88 name: "AffectedByFocus", |
82 field_template: "monotonic_flag", | 89 field_template: "monotonic_flag", |
83 default_value: "false", | 90 default_value: "false", |
84 has_custom_compare_and_copy: true, | 91 custom_copy: true, |
| 92 custom_compare: true, |
85 }, | 93 }, |
86 { | 94 { |
87 name: "AffectedByFocusWithin", | 95 name: "AffectedByFocusWithin", |
88 field_template: "monotonic_flag", | 96 field_template: "monotonic_flag", |
89 default_value: "false", | 97 default_value: "false", |
90 has_custom_compare_and_copy: true, | 98 custom_copy: true, |
| 99 custom_compare: true, |
91 }, | 100 }, |
92 { | 101 { |
93 name: "AffectedByHover", | 102 name: "AffectedByHover", |
94 field_template: "monotonic_flag", | 103 field_template: "monotonic_flag", |
95 default_value: "false", | 104 default_value: "false", |
96 has_custom_compare_and_copy: true, | 105 custom_copy: true, |
| 106 custom_compare: true, |
97 }, | 107 }, |
98 { | 108 { |
99 name: "AffectedByActive", | 109 name: "AffectedByActive", |
100 field_template: "monotonic_flag", | 110 field_template: "monotonic_flag", |
101 default_value: "false", | 111 default_value: "false", |
102 has_custom_compare_and_copy: true, | 112 custom_copy: true, |
| 113 custom_compare: true, |
103 }, | 114 }, |
104 { | 115 { |
105 name: "AffectedByDrag", | 116 name: "AffectedByDrag", |
106 field_template: "monotonic_flag", | 117 field_template: "monotonic_flag", |
107 default_value: "false", | 118 default_value: "false", |
108 has_custom_compare_and_copy: true, | 119 custom_copy: true, |
| 120 custom_compare: true, |
109 }, | 121 }, |
110 // A non-inherited property references a variable or @apply is used | 122 // A non-inherited property references a variable or @apply is used |
111 { | 123 { |
112 name: "HasVariableReferenceFromNonInheritedProperty", | 124 name: "HasVariableReferenceFromNonInheritedProperty", |
113 field_template: "monotonic_flag", | 125 field_template: "monotonic_flag", |
114 default_value: "false", | 126 default_value: "false", |
115 has_custom_compare_and_copy: true, | 127 custom_copy: true, |
| 128 custom_compare: true, |
116 }, | 129 }, |
117 // Explicitly inherits a non-inherited property | 130 // Explicitly inherits a non-inherited property |
118 { | 131 { |
119 name: "HasExplicitlyInheritedProperties", | 132 name: "HasExplicitlyInheritedProperties", |
120 field_template: "monotonic_flag", | 133 field_template: "monotonic_flag", |
121 default_value: "false", | 134 default_value: "false", |
122 has_custom_compare_and_copy: true, | 135 custom_copy: true, |
| 136 custom_compare: true, |
123 }, | 137 }, |
124 // These are set if we used viewport or rem units when resolving a length. | 138 // These are set if we used viewport or rem units when resolving a length. |
125 // TODO(shend): HasViewportUnits should be a monotonic_flag. | 139 // TODO(shend): HasViewportUnits should be a monotonic_flag. |
126 { | 140 { |
127 name: "HasViewportUnits", | 141 name: "HasViewportUnits", |
128 field_template: "primitive", | 142 field_template: "primitive", |
129 default_value: "false", | 143 default_value: "false", |
130 type_name: "bool", | 144 type_name: "bool", |
131 has_custom_compare_and_copy: true, | 145 custom_compare: true, |
132 }, | 146 }, |
133 { | 147 { |
134 name: "HasRemUnits", | 148 name: "HasRemUnits", |
135 field_template: "monotonic_flag", | 149 field_template: "monotonic_flag", |
136 default_value: "false", | 150 default_value: "false", |
137 has_custom_compare_and_copy: true, | 151 custom_compare: true, |
138 }, | 152 }, |
139 // These properties only have generated storage, and their methods are handw
ritten in ComputedStyle. | 153 // These properties only have generated storage, and their methods are handw
ritten in ComputedStyle. |
140 // TODO(shend): Remove these fields and delete the 'storage_only' template. | 154 // TODO(shend): Remove these fields and delete the 'storage_only' template. |
141 { | 155 { |
142 name: "EmptyState", | 156 name: "EmptyState", |
143 field_template: "storage_only", | 157 field_template: "storage_only", |
144 field_size: 1, | 158 field_size: 1, |
145 default_value: "false", | 159 default_value: "false", |
146 type_name: "bool", | 160 type_name: "bool", |
147 has_custom_compare_and_copy: true, | 161 custom_copy: true, |
| 162 custom_compare: true, |
148 }, | 163 }, |
149 { | 164 { |
150 name: "StyleType", | 165 name: "StyleType", |
151 field_template: "storage_only", | 166 field_template: "storage_only", |
152 field_size: 6, | 167 field_size: 6, |
153 default_value: "0", | 168 default_value: "0", |
154 type_name: "PseudoId", | 169 type_name: "PseudoId", |
155 has_custom_compare_and_copy: true, | 170 custom_copy: true, |
| 171 custom_compare: true, |
156 }, | 172 }, |
157 { | 173 { |
158 name: "PseudoBits", | 174 name: "PseudoBits", |
159 field_template: "storage_only", | 175 field_template: "storage_only", |
160 field_size: 8, | 176 field_size: 8, |
161 default_value: "kPseudoIdNone", | 177 default_value: "kPseudoIdNone", |
162 type_name: "PseudoId", | 178 type_name: "PseudoId", |
163 has_custom_compare_and_copy: true, | 179 custom_copy: true, |
| 180 custom_compare: true, |
164 }, | 181 }, |
165 // True if 'underline solid' is the only text decoration on this element. | 182 // True if 'underline solid' is the only text decoration on this element. |
166 { | 183 { |
167 name: "HasSimpleUnderline", | 184 name: "HasSimpleUnderline", |
168 field_template: "storage_only", | 185 field_template: "storage_only", |
169 field_size: 1, | 186 field_size: 1, |
170 default_value: "false", | 187 default_value: "false", |
171 type_name: "bool", | 188 type_name: "bool", |
172 inherited: true, | 189 inherited: true, |
173 has_custom_compare_and_copy: true, | |
174 }, | 190 }, |
175 // TODO(shend): vertical align is actually a CSS property, but since we don'
t support union fields | 191 // TODO(shend): vertical align is actually a CSS property, but since we don'
t support union fields |
176 // which can be either a keyword or Length, this is specified in this file f
or now. Remove this | 192 // which can be either a keyword or Length, this is specified in this file f
or now. Remove this |
177 // once we can support union fields. | 193 // once we can support union fields. |
178 { | 194 { |
179 name: "VerticalAlign", | 195 name: "VerticalAlign", |
180 field_template: "storage_only", | 196 field_template: "storage_only", |
181 field_size: 4, | 197 field_size: 4, |
182 default_value: "EVerticalAlign::kBaseline", | 198 default_value: "EVerticalAlign::kBaseline", |
183 type_name: "EVerticalAlign", | 199 type_name: "EVerticalAlign", |
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
550 inherited: true, | 566 inherited: true, |
551 field_template: "storage_only", | 567 field_template: "storage_only", |
552 type_name: "StyleInheritedVariables", | 568 type_name: "StyleInheritedVariables", |
553 include_paths: ["core/style/StyleInheritedVariables.h"], | 569 include_paths: ["core/style/StyleInheritedVariables.h"], |
554 default_value: "nullptr", | 570 default_value: "nullptr", |
555 wrapper_pointer_name: "RefPtr", | 571 wrapper_pointer_name: "RefPtr", |
556 field_group: "rare-inherited", | 572 field_group: "rare-inherited", |
557 }, | 573 }, |
558 ], | 574 ], |
559 } | 575 } |
OLD | NEW |