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

Unified 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 side-by-side diff with in-line comments
Download patch
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)}}

Powered by Google App Engine
This is Rietveld 408576698