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

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

Issue 2137483004: Enable "system-ui" generic font family (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: drott nit Created 4 years, 2 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 inLanguage:(id)useNil; 54 inLanguage:(id)useNil;
55 + (NSFont*)findFontLike:(NSFont*)font 55 + (NSFont*)findFontLike:(NSFont*)font
56 forCharacter:(UniChar)uc 56 forCharacter:(UniChar)uc
57 inLanguage:(id)useNil; 57 inLanguage:(id)useNil;
58 @end 58 @end
59 59
60 namespace blink { 60 namespace blink {
61 61
62 const char* kColorEmojiFontMac = "Apple Color Emoji"; 62 const char* kColorEmojiFontMac = "Apple Color Emoji";
63 63
64 // static
65 const AtomicString& FontCache::legacySystemFontFamily() {
66 DEFINE_STATIC_LOCAL(AtomicString, legacySystemFontFamily,
67 ("BlinkMacSystemFont"));
68 return legacySystemFontFamily;
69 }
70
64 static void invalidateFontCache() { 71 static void invalidateFontCache() {
65 if (!isMainThread()) { 72 if (!isMainThread()) {
66 Platform::current()->mainThread()->getWebTaskRunner()->postTask( 73 Platform::current()->mainThread()->getWebTaskRunner()->postTask(
67 BLINK_FROM_HERE, WTF::bind(&invalidateFontCache)); 74 BLINK_FROM_HERE, WTF::bind(&invalidateFontCache));
68 return; 75 return;
69 } 76 }
70 FontCache::fontCache()->invalidate(); 77 FontCache::fontCache()->invalidate();
71 } 78 }
72 79
73 static void fontCacheRegisteredFontsChangedNotificationCallback( 80 static void fontCacheRegisteredFontsChangedNotificationCallback(
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 std::unique_ptr<FontPlatformData> platformData = wrapUnique( 284 std::unique_ptr<FontPlatformData> platformData = wrapUnique(
278 new FontPlatformData(platformFont, size, syntheticBold, syntheticItalic, 285 new FontPlatformData(platformFont, size, syntheticBold, syntheticItalic,
279 fontDescription.orientation())); 286 fontDescription.orientation()));
280 if (!platformData->typeface()) { 287 if (!platformData->typeface()) {
281 return nullptr; 288 return nullptr;
282 } 289 }
283 return platformData; 290 return platformData;
284 } 291 }
285 292
286 } // namespace blink 293 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698