Chromium Code Reviews| Index: third_party/WebKit/Source/platform/fonts/mac/FontCacheMac.mm |
| diff --git a/third_party/WebKit/Source/platform/fonts/mac/FontCacheMac.mm b/third_party/WebKit/Source/platform/fonts/mac/FontCacheMac.mm |
| index 29be5a084e8670e036ce5aa458dd683e37bdb1db..2696403e961d2e25addc4bbe37a9653bef35e310 100644 |
| --- a/third_party/WebKit/Source/platform/fonts/mac/FontCacheMac.mm |
| +++ b/third_party/WebKit/Source/platform/fonts/mac/FontCacheMac.mm |
| @@ -53,6 +53,8 @@ |
| namespace blink { |
| +const char* kColorEmojiFontMac = { "Apple Color Emoji" }; |
|
eae
2016/03/02 18:26:54
Remove curly brackets.
|
| + |
| static void invalidateFontCache() |
| { |
| if (!isMainThread()) { |
| @@ -87,8 +89,19 @@ static inline bool isAppKitFontWeightBold(NSInteger appKitFontWeight) |
| return appKitFontWeight >= 7; |
| } |
| -PassRefPtr<SimpleFontData> FontCache::fallbackFontForCharacter(const FontDescription& fontDescription, UChar32 character, const SimpleFontData* fontDataToSubstitute) |
| +PassRefPtr<SimpleFontData> FontCache::fallbackFontForCharacter( |
| + const FontDescription& fontDescription, |
| + UChar32 character, |
| + const SimpleFontData* fontDataToSubstitute, |
| + FontFallbackPriority fallbackPriority) |
| { |
| + |
| + if (fallbackPriority == FontFallbackPriority::EmojiEmoji) { |
| + RefPtr<SimpleFontData> emojiFont = getFontData(fontDescription, AtomicString(kColorEmojiFontMac)); |
| + if (emojiFont) |
| + return emojiFont; |
| + } |
| + |
| // FIXME: We should fix getFallbackFamily to take a UChar32 |
| // and remove this split-to-UChar16 code. |
| UChar codeUnits[2]; |