WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-114486-20130411190701.patch (text/plain), 4.65 KB, created by
Nico Weber
on 2013-04-11 19:07:19 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Nico Weber
Created:
2013-04-11 19:07:19 PDT
Size:
4.65 KB
patch
obsolete
>Subversion Revision: 148257 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 4a750cbb805f380d384974661bf5cac8e5eee589..03f88f8e7c96c8ba5183233f4ec23b08d49c4b55 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,20 @@ >+2013-04-11 Nico Weber <thakis@chromium.org> >+ >+ Remove debugging code that is no longer used with current mac sdks. >+ https://bugs.webkit.org/show_bug.cgi?id=114486 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ This code compared __MAC_OS_X_VERSION_MAX_ALLOWED and friends to >+ 107 and 106 instead of the correct 1070 and 1060. Instead of fixing >+ this, rip the code out completely: Since WebKit now only targets >+ current systems, the ifdef is always false anyways. >+ >+ No tests, as this only removes debugging code. >+ >+ * platform/graphics/mac/SimpleFontDataMac.mm: >+ (WebCore::SimpleFontData::platformInit): >+ > 2013-04-11 Oliver Hunt <oliver@apple.com> > > Add more type validation to debug builds >diff --git a/Source/WebCore/platform/graphics/mac/SimpleFontDataMac.mm b/Source/WebCore/platform/graphics/mac/SimpleFontDataMac.mm >index c37eddbef0e0a0ab5745d3ae4bdab3e584987069..28a87f6c5463e9861eb51d6f2faf7e253a719de9 100644 >--- a/Source/WebCore/platform/graphics/mac/SimpleFontDataMac.mm >+++ b/Source/WebCore/platform/graphics/mac/SimpleFontDataMac.mm >@@ -79,34 +79,6 @@ static NSString *webFallbackFontFamily(void) > return webFallbackFontFamily.get(); > } > >-#if !ERROR_DISABLED >-#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) >-static NSString* pathFromFont(NSFont*) >-{ >- // FMGetATSFontRefFromFont is not available. As pathFromFont is only used for debugging purposes, >- // returning nil is acceptable. >- return nil; >-} >-#else >-static NSString* pathFromFont(NSFont *font) >-{ >- ATSFontRef atsFont = FMGetATSFontRefFromFont(CTFontGetPlatformFont(toCTFontRef(font), 0)); >- FSRef fileRef; >- >- OSStatus status = ATSFontGetFileReference(atsFont, &fileRef); >- if (status != noErr) >- return nil; >- >- UInt8 filePathBuffer[PATH_MAX]; >- status = FSRefMakePath(&fileRef, filePathBuffer, PATH_MAX); >- if (status == noErr) >- return [NSString stringWithUTF8String:(const char*)filePathBuffer]; >- >- return nil; >-} >-#endif // __LP64__ >-#endif // !ERROR_DISABLED >- > const SimpleFontData* SimpleFontData::getCompositeFontReferenceFontData(NSFont *key) const > { > if (key && !CFEqual(RetainPtr<CFStringRef>(AdoptCF, CTFontCopyPostScriptName(CTFontRef(key))).get(), CFSTR("LastResort"))) { >@@ -166,11 +138,6 @@ void SimpleFontData::platformInit() > m_platformData.setFont([[NSFontManager sharedFontManager] convertFont:m_platformData.font() toFamily:fallbackFontFamily]); > else > m_platformData.setFont([NSFont fontWithName:fallbackFontFamily size:m_platformData.size()]); >-#if !ERROR_DISABLED >- NSString *filePath = pathFromFont(initialFont.get()); >- if (!filePath) >- filePath = @"not known"; >-#endif > if (!initFontData(this)) { > if ([fallbackFontFamily isEqual:@"Times New Roman"]) { > // OK, couldn't setup Times New Roman as an alternate to Times, fallback >@@ -178,19 +145,19 @@ void SimpleFontData::platformInit() > m_platformData.setFont([[NSFontManager sharedFontManager] convertFont:m_platformData.font() toFamily:webFallbackFontFamily()]); > if (!initFontData(this)) { > // We tried, Times, Times New Roman, and the system font. No joy. We have to give up. >- LOG_ERROR("unable to initialize with font %@ at %@", initialFont.get(), filePath); >+ LOG_ERROR("unable to initialize with font %@", initialFont.get()); > failedSetup = true; > } > } else { > // We tried the requested font and the system font. No joy. We have to give up. >- LOG_ERROR("unable to initialize with font %@ at %@", initialFont.get(), filePath); >+ LOG_ERROR("unable to initialize with font %@", initialFont.get()); > failedSetup = true; > } > } > > // Report the problem. >- LOG_ERROR("Corrupt font detected, using %@ in place of %@ located at \"%@\".", >- [m_platformData.font() familyName], [initialFont.get() familyName], filePath); >+ LOG_ERROR("Corrupt font detected, using %@ in place of %@.", >+ [m_platformData.font() familyName], [initialFont.get() familyName]); > } > > // If all else fails, try to set up using the system font.
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 114486
: 197710