Title: [126320] trunk/Source/WebCore
Revision
126320
Author
commit-qu...@webkit.org
Date
2012-08-22 10:56:48 -0700 (Wed, 22 Aug 2012)

Log Message

[chromium/mac] Remove unnecessary checks for OS version <= 10.5. We don't support those
https://bugs.webkit.org/show_bug.cgi?id=94658

Patch by James Robinson <jam...@chromium.org> on 2012-08-22
Reviewed by Tony Chang.

The chromium mac port hasn't supported Leopard for a while now, so remove chromium-specific code that checks
for OS X version <= Leopard.

* platform/graphics/chromium/CrossProcessFontLoading.mm:
(WebCore::FontPlatformData::loadFont):
* platform/graphics/cocoa/FontPlatformDataCocoa.mm:
(WebCore::canSetCascadeListForCustomFont):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (126319 => 126320)


--- trunk/Source/WebCore/ChangeLog	2012-08-22 17:51:44 UTC (rev 126319)
+++ trunk/Source/WebCore/ChangeLog	2012-08-22 17:56:48 UTC (rev 126320)
@@ -1,3 +1,18 @@
+2012-08-22  James Robinson  <jam...@chromium.org>
+
+        [chromium/mac] Remove unnecessary checks for OS version <= 10.5. We don't support those
+        https://bugs.webkit.org/show_bug.cgi?id=94658
+
+        Reviewed by Tony Chang.
+
+        The chromium mac port hasn't supported Leopard for a while now, so remove chromium-specific code that checks
+        for OS X version <= Leopard.
+
+        * platform/graphics/chromium/CrossProcessFontLoading.mm:
+        (WebCore::FontPlatformData::loadFont):
+        * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
+        (WebCore::canSetCascadeListForCustomFont):
+
 2012-08-22  W. James MacLean  <wjmacl...@chromium.org>
 
         [chromium] Add touch link highlight animation layers.

Modified: trunk/Source/WebCore/platform/graphics/chromium/CrossProcessFontLoading.mm (126319 => 126320)


--- trunk/Source/WebCore/platform/graphics/chromium/CrossProcessFontLoading.mm	2012-08-22 17:51:44 UTC (rev 126319)
+++ trunk/Source/WebCore/platform/graphics/chromium/CrossProcessFontLoading.mm	2012-08-22 17:56:48 UTC (rev 126320)
@@ -41,20 +41,6 @@
 typedef HashMap<uint32, MemoryActivatedFont*> FontContainerRefMemoryFontHash;
 typedef HashMap<WTF::String, MemoryActivatedFont*> FontNameMemoryFontHash;
 
-// On 10.5, font loading is not blocked by the sandbox and thus there is no
-// need for the cross-process font loading mechanim.
-// On system versions >=10.6 cross-process font loading is required.
-bool OutOfProcessFontLoadingEnabled()
-{
-    static SInt32 systemVersion = 0;
-    if (!systemVersion) {
-        if (Gestalt(gestaltSystemVersion, &systemVersion) != noErr)
-            return false;
-    }
-
-    return systemVersion >= 0x1060;
-}
-
 // Caching:
 //
 // Requesting a font from the browser process is expensive and so is
@@ -199,7 +185,7 @@
 {
     outNSFont = nsFont;
     cgFont = CTFontCopyGraphicsFont(toCTFontRef(outNSFont), 0);
-    if (OutOfProcessFontLoadingEnabled() && outNSFont && cgFont && isLastResortFont(cgFont)) {
+    if (outNSFont && cgFont && isLastResortFont(cgFont)) {
         // Release old CGFontRef since it points at the LastResort font which we don't want.
         CFRelease(cgFont);
         cgFont = 0;

Modified: trunk/Source/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm (126319 => 126320)


--- trunk/Source/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm	2012-08-22 17:51:44 UTC (rev 126319)
+++ trunk/Source/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm	2012-08-22 17:56:48 UTC (rev 126320)
@@ -247,15 +247,7 @@
 // Adding a cascade list breaks the font on Leopard
 static bool canSetCascadeListForCustomFont()
 {
-#if PLATFORM(CHROMIUM)
-    static SInt32 systemVersion;
-    if (!systemVersion) {
-        if (Gestalt(gestaltSystemVersion, &systemVersion) != noErr)
-            return false;
-    }
-
-    return systemVersion >= 0x1060;
-#elif PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
     return true;
 #else
     return false;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to