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

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

Issue 2913233003: Move fixed point constants from ComputedStyleConstants to BorderValue. (Closed)
Patch Set: Created 3 years, 6 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/core/style/BorderValue.h » ('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, fieldwise_p ointer_compare_inherited %} 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"
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 {% endif %} 213 {% endif %}
214 {% endfor %} 214 {% endfor %}
215 215
216 ~ComputedStyleBase() = default; 216 ~ComputedStyleBase() = default;
217 217
218 // Storage. 218 // Storage.
219 {% for subgroup in computed_style.subgroups %} 219 {% for subgroup in computed_style.subgroups %}
220 DataRef<{{subgroup.type_name}}> {{subgroup.member_name}}; 220 DataRef<{{subgroup.type_name}}> {{subgroup.member_name}};
221 {% endfor %} 221 {% endfor %}
222 222
223 static unsigned WidthToFixedPoint(float width) {
224 DCHECK_GE(width, 0);
225 return static_cast<unsigned>(std::min<float>(width, kMaxForBorderWidth) *
226 kBorderWidthDenominator);
227 }
228
229 private: 223 private:
230 {% for field in computed_style.fields %} 224 {% for field in computed_style.fields %}
231 {{declare_storage(field)}} 225 {{declare_storage(field)}}
232 {% endfor %} 226 {% endfor %}
233 }; 227 };
234 228
235 } // namespace blink 229 } // namespace blink
236 230
237 #endif // ComputedStyleBase_h 231 #endif // ComputedStyleBase_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/style/BorderValue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698