Bug 899473 - Remove OS X 10.4 and 10.5 code from gfx. r=jmuizelaar

This commit is contained in:
Josh Aas 2013-08-06 17:52:52 -04:00
parent ed2d029aba
commit 76e240d671
3 changed files with 3 additions and 9 deletions

View File

@ -488,10 +488,6 @@ gfxMacFontFamily::FindStyleVariations()
int faceCount = [fontfaces count];
int faceIndex;
// Bug 420981 - under 10.5, UltraLight and Light have the same weight value
bool needToCheckLightFaces =
(gfxPlatformMac::GetPlatform()->OSXVersion() >= MAC_OS_X_VERSION_10_5_HEX);
for (faceIndex = 0; faceIndex < faceCount; faceIndex++) {
NSArray *face = [fontfaces objectAtIndex:faceIndex];
NSString *psname = [face objectAtIndex:INDEX_FONT_POSTSCRIPT_NAME];
@ -500,7 +496,7 @@ gfxMacFontFamily::FindStyleVariations()
NSString *facename = [face objectAtIndex:INDEX_FONT_FACE_NAME];
bool isStandardFace = false;
if (needToCheckLightFaces && appKitWeight == kAppleExtraLightWeight) {
if (appKitWeight == kAppleExtraLightWeight) {
// if the facename contains UltraLight, set the weight to the ultralight weight value
NSRange range = [facename rangeOfString:@"ultralight" options:NSCaseInsensitiveSearch];
if (range.location != NSNotFound) {

View File

@ -342,8 +342,8 @@ gfxPlatformMac::OSXVersion()
OSErr err = ::Gestalt(gestaltSystemVersion, reinterpret_cast<SInt32*>(&mOSXVersion));
if (err != noErr) {
//This should probably be changed when our minimum version changes
NS_ERROR("Couldn't determine OS X version, assuming 10.4");
mOSXVersion = MAC_OS_X_VERSION_10_4_HEX;
NS_ERROR("Couldn't determine OS X version, assuming 10.6");
mOSXVersion = MAC_OS_X_VERSION_10_6_HEX;
}
}
return mOSXVersion;

View File

@ -9,8 +9,6 @@
#include "nsTArray.h"
#include "gfxPlatform.h"
#define MAC_OS_X_VERSION_10_4_HEX 0x00001040
#define MAC_OS_X_VERSION_10_5_HEX 0x00001050
#define MAC_OS_X_VERSION_10_6_HEX 0x00001060
#define MAC_OS_X_VERSION_10_7_HEX 0x00001070