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

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

Issue 2861773004: Move border-*-width out of BorderValue and store on SurroundData in ComputedStyle instead (Closed)
Patch Set: Change border-*-width from a float to unsigned 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
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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 {% endif %} 131 {% endif %}
132 {% endfor %} 132 {% endfor %}
133 133
134 ~ComputedStyleBase() = default; 134 ~ComputedStyleBase() = default;
135 135
136 // Storage. 136 // Storage.
137 {% for subgroup in computed_style.subgroups %} 137 {% for subgroup in computed_style.subgroups %}
138 DataRef<{{subgroup.type_name}}> {{subgroup.member_name}}; 138 DataRef<{{subgroup.type_name}}> {{subgroup.member_name}};
139 {% endfor %} 139 {% endfor %}
140 140
141 static unsigned WidthToFixedPoint(float width) {
nainar 2017/05/05 07:16:50 need a copy of this here to initialize the border-
shend 2017/05/07 23:08:30 Can this be in BorderValue or some utilities file
nainar 2017/05/08 00:59:57 Not unless I include BorderValue by hand. Utilitie
shend 2017/05/08 04:39:02 Ok, keep it as it is then. I think we can resolve
142 DCHECK_GE(width, 0);
143 return static_cast<unsigned>(std::min<float>(width, kMaxForBorderWidth) *
144 kBorderWidthDenominator);
145 }
146
141 private: 147 private:
142 {% for field in computed_style.fields %} 148 {% for field in computed_style.fields %}
143 {{declare_storage(field)}} 149 {{declare_storage(field)}}
144 {% endfor %} 150 {% endfor %}
145 }; 151 };
146 152
147 } // namespace blink 153 } // namespace blink
148 154
149 #endif // ComputedStyleBase_h 155 #endif // ComputedStyleBase_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698