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

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: meade@'s suggestion 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) {
+ 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