Title: [109146] trunk/Source/WebCore
- Revision
- 109146
- Author
- [email protected]
- Date
- 2012-02-28 13:49:55 -0800 (Tue, 28 Feb 2012)
Log Message
Unreviewed, rolling out r109137.
http://trac.webkit.org/changeset/109137
https://bugs.webkit.org/show_bug.cgi?id=79833
Broke cr-mac build (Requested by aklein on #webkit).
Patch by Sheriff Bot <[email protected]> on 2012-02-28
* platform/graphics/mac/SimpleFontDataMac.mm:
(WebCore):
(WebCore::pathFromFont):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (109145 => 109146)
--- trunk/Source/WebCore/ChangeLog 2012-02-28 21:45:56 UTC (rev 109145)
+++ trunk/Source/WebCore/ChangeLog 2012-02-28 21:49:55 UTC (rev 109146)
@@ -1,3 +1,15 @@
+2012-02-28 Sheriff Bot <[email protected]>
+
+ Unreviewed, rolling out r109137.
+ http://trac.webkit.org/changeset/109137
+ https://bugs.webkit.org/show_bug.cgi?id=79833
+
+ Broke cr-mac build (Requested by aklein on #webkit).
+
+ * platform/graphics/mac/SimpleFontDataMac.mm:
+ (WebCore):
+ (WebCore::pathFromFont):
+
2012-02-28 Jungshik Shin <[email protected]>
Add a fallback path to LineBreakIteratorPoolICU when the locale
Modified: trunk/Source/WebCore/platform/graphics/mac/SimpleFontDataMac.mm (109145 => 109146)
--- trunk/Source/WebCore/platform/graphics/mac/SimpleFontDataMac.mm 2012-02-28 21:45:56 UTC (rev 109145)
+++ trunk/Source/WebCore/platform/graphics/mac/SimpleFontDataMac.mm 2012-02-28 21:49:55 UTC (rev 109146)
@@ -82,10 +82,31 @@
}
#if !ERROR_DISABLED
-static NSString *pathFromFont(NSFont *font)
+#if defined(__LP64__) || (!defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD))
+static NSString* pathFromFont(NSFont*)
{
- return [[[font fontDescriptor] objectForKey:(NSString *)kCTFontURLAttribute] path];
+ // 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
void SimpleFontData::platformInit()
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes