[iOS] Fix two more AdoptCF I missed in my last patch.
authordarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 6 May 2014 14:14:49 +0000 (14:14 +0000)
committerdarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 6 May 2014 14:14:49 +0000 (14:14 +0000)
* WebView/WebHTMLView.mm:
(imageFromRect): Use adoptCF instead of AdoptCF.

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

Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebView/WebHTMLView.mm

index 7d2a9886d81c4a1fa5aa537baec49a1fd5f64604..a56a2d0d8550d3296b5c2ec042b920cccf8065bf 100644 (file)
@@ -1,3 +1,10 @@
+2014-05-06  Darin Adler  <darin@apple.com>
+
+        [iOS] Fix two more AdoptCF I missed in my last patch.
+
+        * WebView/WebHTMLView.mm:
+        (imageFromRect): Use adoptCF instead of AdoptCF.
+
 2014-05-05  Andreas Kling  <akling@apple.com>
 
         Unreviewed, rolling out r168334.
index 5b8d441a5d8eb1e819f3522dfd35d0d686d813b8..6e95a00ee8b4c3982856721a5542ad9a319a23ba 100644 (file)
@@ -6593,8 +6593,8 @@ static CGImageRef imageFromRect(Frame* frame, CGRect rect)
     size_t bitsPerComponent = 8;
     size_t bitsPerPixel = 4 * bitsPerComponent;
     size_t bytesPerRow = ((bitsPerPixel + 7) / 8) * width;
-    RetainPtr<CGColorSpaceRef> colorSpace(AdoptCF, CGColorSpaceCreateDeviceRGB());
-    RetainPtr<CGContextRef> context(AdoptCF, CGBitmapContextCreate(NULL, width, height, bitsPerComponent, bytesPerRow, colorSpace.get(), kCGImageAlphaPremultipliedLast));
+    RetainPtr<CGColorSpaceRef> colorSpace = adoptCF(CGColorSpaceCreateDeviceRGB());
+    RetainPtr<CGContextRef> context = adoptCF(CGBitmapContextCreate(NULL, width, height, bitsPerComponent, bytesPerRow, colorSpace.get(), kCGImageAlphaPremultipliedLast));
     if (!context)
         return nil;