Changeset 109146 in webkit


Ignore:
Timestamp:
Feb 28, 2012 1:49:55 PM (12 years ago)
Author:
adamk@chromium.org
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 <webkit.review.bot@gmail.com> on 2012-02-28

  • platform/graphics/mac/SimpleFontDataMac.mm:

(WebCore):
(WebCore::pathFromFont):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r109144 r109146  
     12012-02-28  Sheriff Bot  <webkit.review.bot@gmail.com>
     2
     3        Unreviewed, rolling out r109137.
     4        http://trac.webkit.org/changeset/109137
     5        https://bugs.webkit.org/show_bug.cgi?id=79833
     6
     7        Broke cr-mac build (Requested by aklein on #webkit).
     8
     9        * platform/graphics/mac/SimpleFontDataMac.mm:
     10        (WebCore):
     11        (WebCore::pathFromFont):
     12
    1132012-02-28  Jungshik Shin  <jshin@chromium.org>
    214
  • trunk/Source/WebCore/platform/graphics/mac/SimpleFontDataMac.mm

    r109137 r109146  
    8383
    8484#if !ERROR_DISABLED
    85 static NSString *pathFromFont(NSFont *font)
    86 {
    87     return [[[font fontDescriptor] objectForKey:(NSString *)kCTFontURLAttribute] path];
    88 }
     85#if defined(__LP64__) || (!defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD))
     86static NSString* pathFromFont(NSFont*)
     87{
     88    // FMGetATSFontRefFromFont is not available. As pathFromFont is only used for debugging purposes,
     89    // returning nil is acceptable.
     90    return nil;
     91}
     92#else
     93static NSString* pathFromFont(NSFont *font)
     94{
     95    ATSFontRef atsFont = FMGetATSFontRefFromFont(CTFontGetPlatformFont(toCTFontRef(font), 0));
     96    FSRef fileRef;
     97
     98    OSStatus status = ATSFontGetFileReference(atsFont, &fileRef);
     99    if (status != noErr)
     100        return nil;
     101
     102    UInt8 filePathBuffer[PATH_MAX];
     103    status = FSRefMakePath(&fileRef, filePathBuffer, PATH_MAX);
     104    if (status == noErr)
     105        return [NSString stringWithUTF8String:(const char*)filePathBuffer];
     106
     107    return nil;
     108}
     109#endif // __LP64__
    89110#endif // !ERROR_DISABLED
    90111
Note: See TracChangeset for help on using the changeset viewer.