- fixed build
authordarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 31 Oct 2006 05:50:14 +0000 (05:50 +0000)
committerdarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 31 Oct 2006 05:50:14 +0000 (05:50 +0000)
        * DumpRenderTree/DumpRenderTree.m: (-[LocalPasteboard setString:forType:]):
        Don't use CFPasteboard.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@17472 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKitTools/ChangeLog
WebKitTools/DumpRenderTree/DumpRenderTree.m

index 01704c15c46bdb86ccb4f150d96e732e4eedf6fa..75c75facaf36279fde60eb21b5f0e76149973b36 100644 (file)
@@ -1,3 +1,10 @@
+2006-10-30  Darin Adler  <darin@apple.com>
+
+        - fixed build
+
+        * DumpRenderTree/DumpRenderTree.m: (-[LocalPasteboard setString:forType:]):
+        Don't use CFPasteboard.
+
 2006-10-30  Vladimir Olexa  <vladimir.olexa@gmail.com>
 
         Reviewed by Tim H.
index 711745785d4be62352221126268386d82ebf0480..6491d012daf8fc9fc965ac29b4098ed28483dc72 100644 (file)
@@ -56,7 +56,7 @@
 #import <WebKit/WebView.h>
 #import <getopt.h>
 #import <malloc/malloc.h>
-#import <CoreFoundation/CFPasteboard.h>
+#import <CoreFoundation/CoreFoundation.h>
 #import <objc/objc-runtime.h>                       // for class_poseAs
 
 #define COMMON_DIGEST_FOR_OPENSSL
@@ -1137,8 +1137,12 @@ static NSString *md5HashStringForBitmap(CGImageRef bitmap)
 - (BOOL)setString:(NSString *)string forType:(NSString *)dataType
 {
     CFDataRef data = NULL;
-    if (string)
-        data = CFPasteboardCreateDataForString(NULL, (CFStringRef)string);
+    if (string) {
+        if ([string length] == 0)
+            data = CFDataCreate(NULL, NULL, 0);
+        else
+            data = CFStringCreateExternalRepresentation(NULL, (CFStringRef)string, kCFStringEncodingUTF8, 0);
+    }
     BOOL result = [self setData:(NSData *)data forType:dataType];
     if (data)
         CFRelease(data);