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

Unified Diff: Source/core/css/resolver/FontBuilder.cpp

Issue 983073002: Make font-size-adjust animatable. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 9 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/core/css/resolver/FontBuilder.cpp
diff --git a/Source/core/css/resolver/FontBuilder.cpp b/Source/core/css/resolver/FontBuilder.cpp
index f4ac93595588604e94b3f5118cb37d9e43b2199b..470231a2291f6e086869c008ee3ca274ed2eb877 100644
--- a/Source/core/css/resolver/FontBuilder.cpp
+++ b/Source/core/css/resolver/FontBuilder.cpp
@@ -335,6 +335,11 @@ void FontBuilder::updateAdjustedSize(FontDescription& fontDescription, const Lay
return;
// We need to create a temporal Font to get xHeight of a primary font.
+ // To get an accurate x-height from a font cache while animation, we need to reset adjustedSize
rune 2015/03/06 10:08:06 ... while animating ...
changseok 2015/03/08 06:16:56 Done.
+ // before creating a Font. Because a retrived font data from the cache is based on a FontCacheKey
+ // and which is affected by effectiveFontSize.
rune 2015/03/06 10:08:05 -and
changseok 2015/03/08 06:16:56 Done.
+ fontDescription.setAdjustedSize(0);
rune 2015/03/06 10:08:06 This is necessary in general to get the correct re
changseok 2015/03/08 06:16:56 Yes correct. thanks for the summary =)
+
Font font(fontDescription);
font.update(fontSelector);
if (!font.fontMetrics().hasXHeight())

Powered by Google App Engine
This is Rietveld 408576698