Changeset 148261 in webkit
- Timestamp:
- Apr 11, 2013 10:03:18 PM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r148260 r148261 1 2013-04-11 Nico Weber <thakis@chromium.org> 2 3 Remove debugging code that is no longer used with current mac sdks. 4 https://bugs.webkit.org/show_bug.cgi?id=114486 5 6 Reviewed by Dan Bernstein. 7 8 This code compared __MAC_OS_X_VERSION_MAX_ALLOWED and friends to 9 107 and 106 instead of the correct 1070 and 1060. Instead of fixing 10 this, rip the code out completely: Since WebKit now only targets 11 current systems, the ifdef is always false anyways. 12 13 No tests, as this only removes debugging code. 14 15 * platform/graphics/mac/SimpleFontDataMac.mm: 16 (WebCore::SimpleFontData::platformInit): 17 1 18 2013-04-11 Oliver Hunt <oliver@apple.com> 2 19 -
trunk/Source/WebCore/platform/graphics/mac/SimpleFontDataMac.mm
r147710 r148261 80 80 } 81 81 82 #if !ERROR_DISABLED83 #if defined(__LP64__) || PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070 || (__MAC_OS_X_VERSION_MAX_ALLOWED >= 107 && __MAC_OS_X_VERSION_MIN_REQUIRED >= 106)84 static NSString* pathFromFont(NSFont*)85 {86 // FMGetATSFontRefFromFont is not available. As pathFromFont is only used for debugging purposes,87 // returning nil is acceptable.88 return nil;89 }90 #else91 static NSString* pathFromFont(NSFont *font)92 {93 ATSFontRef atsFont = FMGetATSFontRefFromFont(CTFontGetPlatformFont(toCTFontRef(font), 0));94 FSRef fileRef;95 96 OSStatus status = ATSFontGetFileReference(atsFont, &fileRef);97 if (status != noErr)98 return nil;99 100 UInt8 filePathBuffer[PATH_MAX];101 status = FSRefMakePath(&fileRef, filePathBuffer, PATH_MAX);102 if (status == noErr)103 return [NSString stringWithUTF8String:(const char*)filePathBuffer];104 105 return nil;106 }107 #endif // __LP64__108 #endif // !ERROR_DISABLED109 110 82 const SimpleFontData* SimpleFontData::getCompositeFontReferenceFontData(NSFont *key) const 111 83 { … … 167 139 else 168 140 m_platformData.setFont([NSFont fontWithName:fallbackFontFamily size:m_platformData.size()]); 169 #if !ERROR_DISABLED170 NSString *filePath = pathFromFont(initialFont.get());171 if (!filePath)172 filePath = @"not known";173 #endif174 141 if (!initFontData(this)) { 175 142 if ([fallbackFontFamily isEqual:@"Times New Roman"]) { … … 179 146 if (!initFontData(this)) { 180 147 // We tried, Times, Times New Roman, and the system font. No joy. We have to give up. 181 LOG_ERROR("unable to initialize with font %@ at %@", initialFont.get(), filePath);148 LOG_ERROR("unable to initialize with font %@", initialFont.get()); 182 149 failedSetup = true; 183 150 } 184 151 } else { 185 152 // We tried the requested font and the system font. No joy. We have to give up. 186 LOG_ERROR("unable to initialize with font %@ at %@", initialFont.get(), filePath);153 LOG_ERROR("unable to initialize with font %@", initialFont.get()); 187 154 failedSetup = true; 188 155 } … … 190 157 191 158 // Report the problem. 192 LOG_ERROR("Corrupt font detected, using %@ in place of %@ located at \"%@\".",193 [m_platformData.font() familyName], [initialFont.get() familyName] , filePath);159 LOG_ERROR("Corrupt font detected, using %@ in place of %@.", 160 [m_platformData.font() familyName], [initialFont.get() familyName]); 194 161 } 195 162
Note: See TracChangeset
for help on using the changeset viewer.