| Index: Source/platform/fonts/linux/FontCacheLinux.cpp
|
| diff --git a/Source/platform/fonts/linux/FontCacheLinux.cpp b/Source/platform/fonts/linux/FontCacheLinux.cpp
|
| index 69e81b68174eda804b52207da72e303aa543eb10..2ba13f834fd025e6d89d835700c39660ffe7e739 100644
|
| --- a/Source/platform/fonts/linux/FontCacheLinux.cpp
|
| +++ b/Source/platform/fonts/linux/FontCacheLinux.cpp
|
| @@ -34,16 +34,26 @@
|
|
|
| namespace WebCore {
|
|
|
| -void FontCache::getFontFamilyForCharacter(UChar32 c, const char* preferredLocale, FontCache::SimpleFontFamily* family)
|
| +void FontCache::getFontForCharacter(UChar32 c, const char* preferredLocale, FontCache::PlatformFallbackFont* fallbackFont)
|
| {
|
| - blink::WebFontFamily webFamily;
|
| - if (blink::Platform::current()->sandboxSupport())
|
| +
|
| + if (blink::Platform::current()->sandboxSupport()) {
|
| + // TODO(dro): crbug.com/382411 Change this to using new getFallbackFontForCharacter sandbox API
|
| + // and WebFallbackFont class to complete the rename, and pull WebFallbackFont out of the if statement again.
|
| + blink::WebFontFamily webFamily;
|
| blink::Platform::current()->sandboxSupport()->getFontFamilyForCharacter(c, preferredLocale, &webFamily);
|
| - else
|
| - blink::WebFontInfo::familyForChar(c, preferredLocale, &webFamily);
|
| - family->name = String::fromUTF8(CString(webFamily.name));
|
| - family->isBold = webFamily.isBold;
|
| - family->isItalic = webFamily.isItalic;
|
| + fallbackFont->name = String::fromUTF8(CString(webFamily.name));
|
| + fallbackFont->isBold = webFamily.isBold;
|
| + fallbackFont->isItalic = webFamily.isItalic;
|
| + } else {
|
| + blink::WebFallbackFont webFallbackFont;
|
| + blink::WebFontInfo::fallbackFontForChar(c, preferredLocale, &webFallbackFont);
|
| + fallbackFont->name = String::fromUTF8(CString(webFallbackFont.name));
|
| + fallbackFont->filename = CString(webFallbackFont.filename);
|
| + fallbackFont->ttcIndex = webFallbackFont.ttcIndex;
|
| + fallbackFont->isBold = webFallbackFont.isBold;
|
| + fallbackFont->isItalic = webFallbackFont.isItalic;
|
| + }
|
| }
|
|
|
| }
|
|
|