Changeset 91237 in webkit
- Timestamp:
- Jul 18, 2011 9:14:42 PM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r91235 r91237 1 2011-07-18 Ryosuke Niwa <rniwa@webkit.org> 2 3 REGRESSION(91209?): fast/css/custom-font-xheight.html is failing on Leopard 4 https://bugs.webkit.org/show_bug.cgi?id=64767 5 6 Add a runtime check for font cascading optimization. 7 8 It's a constant value in Mac port so hopefully gcc will constant-propagate the value 9 and eliminate the function altogether. 10 11 * platform/graphics/cocoa/FontPlatformDataCocoa.mm: 12 (WebCore::canSetCascadeListForCustomFont): Added. 13 (WebCore::FontPlatformData::ctFont): 14 1 15 2011-07-18 MORITA Hajime <morrita@google.com> 2 16 -
trunk/Source/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm
r91231 r91237 193 193 } 194 194 195 // Adding a cascade list breaks the font on Leopard 196 static bool canSetCascadeListForCustomFont() 197 { 198 #if PLATFORM(CHROMIUM) 199 static SInt32 systemVersion; 200 if (!systemVersion) { 201 if (Gestalt(gestaltSystemVersion, &systemVersion) != noErr) 202 return false; 203 } 204 205 return systemVersion >= 0x1060; 206 #elif !defined(BUILDING_ON_LEOPARD) 207 return true; 208 #else 209 return false; 210 #endif 211 } 212 195 213 CTFontRef FontPlatformData::ctFont() const 196 214 { … … 201 219 if (m_CTFont) 202 220 m_CTFont.adoptCF(CTFontCreateCopyWithAttributes(m_CTFont.get(), m_size, 0, cascadeToLastResortFontDescriptor())); 203 else { 204 #if !defined(BUILDING_ON_LEOPARD) 205 m_CTFont.adoptCF(CTFontCreateWithGraphicsFont(m_cgFont.get(), m_size, 0, cascadeToLastResortFontDescriptor())); 206 #else 207 m_CTFont.adoptCF(CTFontCreateWithGraphicsFont(m_cgFont.get(), m_size, 0, 0)); 208 #endif 209 } 221 else 222 m_CTFont.adoptCF(CTFontCreateWithGraphicsFont(m_cgFont.get(), m_size, 0, canSetCascadeListForCustomFont() ? cascadeToLastResortFontDescriptor() : 0)); 210 223 211 224 if (m_widthVariant != RegularWidth) {
Note: See TracChangeset
for help on using the changeset viewer.