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

Unified Diff: Source/platform/fonts/FontDescription.cpp

Issue 468793003: Make style building for 'font-size' less custom. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix regression related to FontDescriptions with isAbsolute=true. Created 6 years, 3 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
« no previous file with comments | « Source/platform/fonts/FontDescription.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/fonts/FontDescription.cpp
diff --git a/Source/platform/fonts/FontDescription.cpp b/Source/platform/fonts/FontDescription.cpp
index 1022de52bfffeaa821fd6526c297b0aaf68b7cdd..0f6e36376ee7dd12fd6997d04838a742df2912fa 100644
--- a/Source/platform/fonts/FontDescription.cpp
+++ b/Source/platform/fonts/FontDescription.cpp
@@ -96,6 +96,16 @@ FontWeight FontDescription::bolderWeight(FontWeight weight)
return FontWeightNormal;
}
+FontDescription::Size FontDescription::largerSize(const Size& size)
+{
+ return Size(0, size.value * 1.2, size.isAbsolute);
+}
+
+FontDescription::Size FontDescription::smallerSize(const Size& size)
+{
+ return Size(0, size.value / 1.2, size.isAbsolute);
+}
+
FontTraits FontDescription::traits() const
{
return FontTraits(style(), variant(), weight(), stretch());
« no previous file with comments | « Source/platform/fonts/FontDescription.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698