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

Unified Diff: Source/core/platform/graphics/cocoa/FontPlatformDataCocoa.mm

Issue 15091005: Remove support for Mac OS X Leopard (10.5) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove support for Mac OS X Laopard (10.5) Created 7 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/platform/graphics/cocoa/FontPlatformDataCocoa.mm
diff --git a/Source/core/platform/graphics/cocoa/FontPlatformDataCocoa.mm b/Source/core/platform/graphics/cocoa/FontPlatformDataCocoa.mm
index f82ed91af2291b7645cb009c1ebbe6a1f46678f2..ac239fa24ac43995573ee29dd379c9833b5f1263 100644
--- a/Source/core/platform/graphics/cocoa/FontPlatformDataCocoa.mm
+++ b/Source/core/platform/graphics/cocoa/FontPlatformDataCocoa.mm
@@ -78,7 +78,7 @@ FontPlatformData:: ~FontPlatformData()
void FontPlatformData::platformDataInit(const FontPlatformData& f)
{
- m_font = f.m_font && f.m_font != reinterpret_cast<NSFont *>(-1) ? const_cast<NSFont *>(static_cast<const NSFont *>(CFRetain(f.m_font))) : f.m_font;
+ m_font = f.m_font && f.m_font != reinterpret_cast<NSFont *>(-1) ? [f.m_font retain] : f.m_font;
m_cgFont = f.m_cgFont;
m_CTFont = f.m_CTFont;
@@ -233,23 +233,13 @@ static CTFontDescriptorRef cascadeToLastResortAndDisableSwashesFontDescriptor()
return descriptor;
}
-// Adding a cascade list breaks the font on Leopard
-static bool canSetCascadeListForCustomFont()
-{
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
- return true;
-#else
- return false;
-#endif
-}
-
CTFontRef FontPlatformData::ctFont() const
{
if (m_CTFont)
return m_CTFont.get();
if (m_inMemoryFont) {
- m_CTFont.adoptCF(CTFontCreateWithGraphicsFont(m_inMemoryFont->cgFont(), m_size, 0, canSetCascadeListForCustomFont() ? cascadeToLastResortFontDescriptor() : 0));
+ m_CTFont.adoptCF(CTFontCreateWithGraphicsFont(m_inMemoryFont->cgFont(), m_size, 0, cascadeToLastResortFontDescriptor()));
return m_CTFont.get();
}
@@ -264,7 +254,7 @@ CTFontRef FontPlatformData::ctFont() const
fontDescriptor = cascadeToLastResortFontDescriptor();
m_CTFont.adoptCF(CTFontCreateCopyWithAttributes(m_CTFont.get(), m_size, 0, fontDescriptor));
} else
- m_CTFont.adoptCF(CTFontCreateWithGraphicsFont(m_cgFont.get(), m_size, 0, canSetCascadeListForCustomFont() ? cascadeToLastResortFontDescriptor() : 0));
+ m_CTFont.adoptCF(CTFontCreateWithGraphicsFont(m_cgFont.get(), m_size, 0, cascadeToLastResortFontDescriptor()));
if (m_widthVariant != RegularWidth) {
int featureTypeValue = kTextSpacingType;
« no previous file with comments | « Source/WebKit/chromium/src/mac/WebInputEventFactory.mm ('k') | Source/core/platform/graphics/mac/SimpleFontDataMac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698