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

Side by Side Diff: third_party/WebKit/Source/platform/fonts/mac/FontCacheMac.mm

Issue 1682103004: Add FontCache::acceptLanguagesChanged() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tkent review Created 4 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
3 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> 3 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com>
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 void FontCache::platformInit() 89 void FontCache::platformInit()
90 { 90 {
91 CFNotificationCenterAddObserver(CFNotificationCenterGetLocalCenter(), this, fontCacheRegisteredFontsChangedNotificationCallback, kCTFontManagerRegisteredFon tsChangedNotification, 0, CFNotificationSuspensionBehaviorDeliverImmediately); 91 CFNotificationCenterAddObserver(CFNotificationCenterGetLocalCenter(), this, fontCacheRegisteredFontsChangedNotificationCallback, kCTFontManagerRegisteredFon tsChangedNotification, 0, CFNotificationSuspensionBehaviorDeliverImmediately);
92 } 92 }
93 93
94 static inline bool isAppKitFontWeightBold(NSInteger appKitFontWeight) 94 static inline bool isAppKitFontWeightBold(NSInteger appKitFontWeight)
95 { 95 {
96 return appKitFontWeight >= 7; 96 return appKitFontWeight >= 7;
97 } 97 }
98 98
99 void FontCache::acceptLanguagesChanged(const String&) {}
100
99 PassRefPtr<SimpleFontData> FontCache::fallbackFontForCharacter(const FontDescrip tion& fontDescription, UChar32 character, const SimpleFontData* fontDataToSubsti tute) 101 PassRefPtr<SimpleFontData> FontCache::fallbackFontForCharacter(const FontDescrip tion& fontDescription, UChar32 character, const SimpleFontData* fontDataToSubsti tute)
100 { 102 {
101 // FIXME: We should fix getFallbackFamily to take a UChar32 103 // FIXME: We should fix getFallbackFamily to take a UChar32
102 // and remove this split-to-UChar16 code. 104 // and remove this split-to-UChar16 code.
103 UChar codeUnits[2]; 105 UChar codeUnits[2];
104 int codeUnitsLength; 106 int codeUnitsLength;
105 if (character <= 0xFFFF) { 107 if (character <= 0xFFFF) {
106 codeUnits[0] = character; 108 codeUnits[0] = character;
107 codeUnitsLength = 1; 109 codeUnitsLength = 1;
108 } else { 110 } else {
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 for (size_t i = 0; i < WTF_ARRAY_LENGTH(kSymbolsAndMathFontsMac); ++i) 244 for (size_t i = 0; i < WTF_ARRAY_LENGTH(kSymbolsAndMathFontsMac); ++i)
243 returnVector.append(kSymbolsAndMathFontsMac[i]); 245 returnVector.append(kSymbolsAndMathFontsMac[i]);
244 break; 246 break;
245 default: 247 default:
246 ASSERT_NOT_REACHED(); 248 ASSERT_NOT_REACHED();
247 } 249 }
248 return returnVector; 250 return returnVector;
249 } 251 }
250 252
251 } // namespace blink 253 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698