Bug 92821
| Summary: | [chromium mac] Chromium compile fails in debug with 10.7sdk in Source/WebCore/platform/graphics/mac/SimpleFontDataMac.mm due to bad #if guards | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | James Robinson <jamesr> |
| Component: | New Bugs | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | Normal | CC: | mitz, thakis |
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
James Robinson
Chromium mac fails to compile with xcode 4.4 / mac10.7sdk in Source/WebCore/platform/graphics/mac/SimpleFontDataMac.mm with this error:
Source/WebCore/platform/graphics/mac/SimpleFontDataMac.mm:95:26: error: use of undeclared identifier 'FMGetATSFontRefFromFont'
ATSFontRef atsFont = FMGetATSFontRefFromFont(CTFontGetPlatformFont(toCTFontRef(font), 0));
Looking at the code:
#if !ERROR_DISABLED
#if defined(__LP64__) || PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
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));
...
the intention is to not compile this function in when using the 10.7 sdk. However, since the chromium port doesn't set OS_X_VERSION_MIN_REQUIRED we do try to compile in the actual impl. We should probably just not compile this function in ever in the chromium port, or at least not when using a 10.7+ sdk
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Nico Weber
(dupe has patch)
*** This bug has been marked as a duplicate of bug 93202 ***