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

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

Issue 943463002: Initial implementation of font-size-adjust (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 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: Source/platform/fonts/FontDescription.cpp
diff --git a/Source/platform/fonts/FontDescription.cpp b/Source/platform/fonts/FontDescription.cpp
index 7a9d0b9b5606b2a5ec65409bef47764fb8e55cbd..0016d81ec1cb2817a6eef96b2522b6a6ca75b749 100644
--- a/Source/platform/fonts/FontDescription.cpp
+++ b/Source/platform/fonts/FontDescription.cpp
@@ -40,7 +40,7 @@ struct SameSizeAsFontDescription {
FontFamily familyList;
RefPtr<FontFeatureSettings> m_featureSettings;
String locale;
- float sizes[4];
+ float sizes[5];
// FXIME: Make them fit into one word.
uint32_t bitfields;
uint32_t bitfields2 : 7;
@@ -145,7 +145,8 @@ float FontDescription::effectiveFontSize() const
{
// Ensure that the effective precision matches the font-cache precision.
// This guarantees that the same precision is used regardless of cache status.
- return floorf(computedSize() * FontCacheKey::precisionMultiplier()) / FontCacheKey::precisionMultiplier();
+ float computedOrAdjustedSize = adjustedSize() ? adjustedSize() : computedSize();
+ return floorf(computedOrAdjustedSize * FontCacheKey::precisionMultiplier()) / FontCacheKey::precisionMultiplier();
}
FontCacheKey FontDescription::cacheKey(const FontFaceCreationParams& creationParams, FontTraits desiredTraits) const
« Source/core/css/parser/CSSPropertyParser.cpp ('K') | « Source/platform/fonts/FontDescription.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698