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

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

Issue 23503080: Pass DOM locale to Skia in FontCache::getFontDataForCharacter (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@fontcleanup
Patch Set: Pure Android only Created 7 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
Index: Source/core/css/resolver/FontBuilder.cpp
diff --git a/Source/core/css/resolver/FontBuilder.cpp b/Source/core/css/resolver/FontBuilder.cpp
index 684f36d47c9f2bfbacf137cf6284f1cd6a9ab45d..8f33e734f532dbeb45bccb6313c2aaab259a92f9 100644
--- a/Source/core/css/resolver/FontBuilder.cpp
+++ b/Source/core/css/resolver/FontBuilder.cpp
@@ -448,7 +448,7 @@ void FontBuilder::setScript(const String& locale)
{
FontDescriptionChangeScope scope(this);
- scope.fontDescription().setScript(localeToScriptCodeForFontSelection(locale));
+ scope.fontDescription().setLocale(AtomicString(locale));
}
void FontBuilder::setItalic(FontItalic italic)
@@ -646,10 +646,11 @@ void FontBuilder::createFont(PassRefPtr<FontSelector> fontSelector, const Render
void FontBuilder::createFontForDocument(PassRefPtr<FontSelector> fontSelector, RenderStyle* documentStyle)
{
FontDescription fontDescription = FontDescription();
- fontDescription.setScript(localeToScriptCodeForFontSelection(documentStyle->locale()));
+ UScriptCode script = localeToScriptCodeForFontSelection(documentStyle->locale());
+ fontDescription.setLocale(documentStyle->locale());
if (Settings* settings = m_document->settings()) {
fontDescription.setUsePrinterFont(m_document->printing());
- const AtomicString& standardFont = settings->standardFontFamily(fontDescription.script());
+ const AtomicString& standardFont = settings->standardFontFamily(script);
if (!standardFont.isEmpty()) {
fontDescription.setGenericFamily(FontDescription::StandardFamily);
fontDescription.firstFamily().setFamily(standardFont);

Powered by Google App Engine
This is Rietveld 408576698