| Index: third_party/WebKit/Source/platform/fonts/FontCache.cpp
|
| diff --git a/third_party/WebKit/Source/platform/fonts/FontCache.cpp b/third_party/WebKit/Source/platform/fonts/FontCache.cpp
|
| index d5a4e3da6628a96b4d502c20ff72b24dc3bafb89..9208ac4499d472e7050295c73f450646bdf44527 100644
|
| --- a/third_party/WebKit/Source/platform/fonts/FontCache.cpp
|
| +++ b/third_party/WebKit/Source/platform/fonts/FontCache.cpp
|
| @@ -172,7 +172,7 @@ FontPlatformData* FontCache::getFontPlatformData(
|
| foundResult = result || !addResult.isNewEntry;
|
| }
|
|
|
| - if (!foundResult && alternateFontName != AlternateFontName::NoAlternate &&
|
| + if (!foundResult && alternateFontName == AlternateFontName::AllowAlternate &&
|
| creationParams.creationType() == CreateFontByFamily) {
|
| // We were unable to find a font. We have a small set of fonts that we alias
|
| // to other names, e.g., Arial/Helvetica, Courier/Courier New, etc. Try
|
| @@ -296,14 +296,23 @@ PassRefPtr<SimpleFontData> FontCache::fontDataFromFontPlatformData(
|
| return gFontDataCache->get(platformData, shouldRetain, subpixelAscentDescent);
|
| }
|
|
|
| -bool FontCache::isPlatformFontAvailable(const FontDescription& fontDescription,
|
| - const AtomicString& family) {
|
| +bool FontCache::isPlatformFamilyMatchAvailable(
|
| + const FontDescription& fontDescription,
|
| + const AtomicString& family) {
|
| return getFontPlatformData(
|
| fontDescription,
|
| FontFaceCreationParams(adjustFamilyNameToAvoidUnsupportedFonts(family)),
|
| AlternateFontName::NoAlternate);
|
| }
|
|
|
| +bool FontCache::isPlatformFontUniqueNameMatchAvailable(
|
| + const FontDescription& fontDescription,
|
| + const AtomicString& uniqueFontName) {
|
| + return getFontPlatformData(fontDescription,
|
| + FontFaceCreationParams(uniqueFontName),
|
| + AlternateFontName::LocalUniqueFace);
|
| +}
|
| +
|
| String FontCache::firstAvailableOrFirst(const String& families) {
|
| // The conversions involve at least two string copies, and more if non-ASCII.
|
| // For now we prefer shared code over the cost because a) inputs are
|
|
|