Index: third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl |
diff --git a/third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl b/third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl |
index 5956fd1fa20ef2684a1708b9271655caa2c6081e..2757340d87409c4ea039604422c543432e46ed6c 100644 |
--- a/third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl |
+++ b/third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl |
@@ -138,6 +138,12 @@ class CORE_EXPORT ComputedStyleBase { |
DataRef<{{subgroup.type_name}}> {{subgroup.member_name}}; |
{% endfor %} |
+ 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
|
+ DCHECK_GE(width, 0); |
+ return static_cast<unsigned>(std::min<float>(width, kMaxForBorderWidth) * |
+ kBorderWidthDenominator); |
+ } |
+ |
private: |
{% for field in computed_style.fields %} |
{{declare_storage(field)}} |