Title: [170623] trunk/Tools
Revision
170623
Author
mmaxfi...@apple.com
Date
2014-06-30 17:45:50 -0700 (Mon, 30 Jun 2014)

Log Message

[iOS] GSFontAddCGFont is deprecated and we use it in DumpRenderTree
https://bugs.webkit.org/show_bug.cgi?id=134133

Reviewed by Simon Fraser.

Replace it with CTFontManagerRegisterGraphicsFont

* DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
* DumpRenderTree/mac/DumpRenderTree.mm:
(activateFontIOS):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (170622 => 170623)


--- trunk/Tools/ChangeLog	2014-07-01 00:42:49 UTC (rev 170622)
+++ trunk/Tools/ChangeLog	2014-07-01 00:45:50 UTC (rev 170623)
@@ -1,3 +1,16 @@
+2014-06-30  Myles C. Maxfield  <mmaxfi...@apple.com>
+
+        [iOS] GSFontAddCGFont is deprecated and we use it in DumpRenderTree
+        https://bugs.webkit.org/show_bug.cgi?id=134133
+
+        Reviewed by Simon Fraser.
+
+        Replace it with CTFontManagerRegisterGraphicsFont
+
+        * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+        * DumpRenderTree/mac/DumpRenderTree.mm:
+        (activateFontIOS):
+
 2014-06-30  Michael Saboff  <msab...@apple.com>
 
         Add option to run-jsc-stress-testes to filter out tests that use large heaps

Modified: trunk/Tools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj (170622 => 170623)


--- trunk/Tools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj	2014-07-01 00:42:49 UTC (rev 170622)
+++ trunk/Tools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj	2014-07-01 00:45:50 UTC (rev 170623)
@@ -54,6 +54,7 @@
 		1AD8683F163B2FD000A28583 /* NPRuntimeCallsWithNullNPP.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD8683D163B2FD000A28583 /* NPRuntimeCallsWithNullNPP.cpp */; };
 		1AD9D2FE12028409001A70D1 /* PluginScriptableNPObjectInvokeDefault.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD9D2FD12028409001A70D1 /* PluginScriptableNPObjectInvokeDefault.cpp */; };
 		1AFF66BC137DEFD200791696 /* GetURLNotifyWithURLThatFailsToLoad.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AFF66BB137DEA8300791696 /* GetURLNotifyWithURLThatFailsToLoad.cpp */; };
+		1CB67420195BAE7B000F35B5 /* CoreText.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1CB6741F195BAE7B000F35B5 /* CoreText.framework */; };
 		29CFBA11122736E600BC30C0 /* AccessibilityTextMarker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29CFBA0F122736E600BC30C0 /* AccessibilityTextMarker.cpp */; };
 		29CFBA2E12273A1000BC30C0 /* AccessibilityTextMarkerMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 29CFBA2D12273A1000BC30C0 /* AccessibilityTextMarkerMac.mm */; };
 		2CE88FA217124D8C00734FC0 /* _javascript_Threading.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2CE88FA117124CEE00734FC0 /* _javascript_Threading.cpp */; };
@@ -243,6 +244,7 @@
 		1AD8683D163B2FD000A28583 /* NPRuntimeCallsWithNullNPP.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NPRuntimeCallsWithNullNPP.cpp; sourceTree = "<group>"; };
 		1AD9D2FD12028409001A70D1 /* PluginScriptableNPObjectInvokeDefault.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PluginScriptableNPObjectInvokeDefault.cpp; sourceTree = "<group>"; };
 		1AFF66BB137DEA8300791696 /* GetURLNotifyWithURLThatFailsToLoad.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GetURLNotifyWithURLThatFailsToLoad.cpp; sourceTree = "<group>"; };
+		1CB6741F195BAE7B000F35B5 /* CoreText.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreText.framework; path = System/Library/Frameworks/CoreText.framework; sourceTree = SDKROOT; };
 		23BCB88F0EA57623003C6289 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = "<absolute>"; };
 		29CFBA0E122736E600BC30C0 /* AccessibilityTextMarker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AccessibilityTextMarker.h; sourceTree = "<group>"; };
 		29CFBA0F122736E600BC30C0 /* AccessibilityTextMarker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AccessibilityTextMarker.cpp; sourceTree = "<group>"; };
@@ -424,6 +426,7 @@
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				1CB67420195BAE7B000F35B5 /* CoreText.framework in Frameworks */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -707,6 +710,7 @@
 		A803FF6409CAACC1009B2A37 /* Frameworks */ = {
 			isa = PBXGroup;
 			children = (
+				1CB6741F195BAE7B000F35B5 /* CoreText.framework */,
 				1A7961061803454C00FE42CD /* IOKit.framework */,
 				BCB284B20CFA82CB007E533E /* ApplicationServices.framework */,
 				AE8257EF08D22389000507AB /* Carbon.framework */,

Modified: trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm (170622 => 170623)


--- trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm	2014-07-01 00:42:49 UTC (rev 170622)
+++ trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm	2014-07-01 00:45:50 UTC (rev 170623)
@@ -99,7 +99,6 @@
 
 #if PLATFORM(IOS)
 #import <CoreGraphics/CGFontDB.h>
-#import <GraphicsServices/GSFont.h>
 #import <QuartzCore/QuartzCore.h>
 #import <UIKit/UIApplication_Private.h>
 #import <UIKit/UIMath.h>
@@ -529,8 +528,10 @@
         exit(1);
     }
 
-    if (!GSFontAddCGFont(cgFont)) {
-        fprintf(stderr, "Failed to add CGFont to GraphicsServices for the %s font.\n", sectionName.c_str());
+    CFErrorRef error = nullptr;
+    CTFontManagerRegisterGraphicsFont(cgFont, &error);
+    if (error) {
+        fprintf(stderr, "Failed to add CGFont to CoreText for the %s font: %s.\n", sectionName.c_str(), CFStringGetCStringPtr(CFErrorCopyDescription(error), kCFStringEncodingUTF8));
         exit(1);
     }
     CGFontRelease(cgFont);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to