Build fix for iOS
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Aug 2014 18:16:19 +0000 (18:16 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Aug 2014 18:16:19 +0000 (18:16 +0000)
* bindings/objc/DOM.mm:
(-[DOMRange renderedImageForcingBlackText:renderedImageForcingBlackText:]):
We use CGImageRef instead of NSImage here on iOS.

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

Source/WebCore/ChangeLog
Source/WebCore/bindings/objc/DOM.mm

index dde4a5ee12dfe7eff615d74416316f545437a1fe..6f7f1b76ee8eda3420bacbc0c6d060802befa497 100644 (file)
@@ -1,3 +1,11 @@
+2014-08-01  Tim Horton  <timothy_horton@apple.com>
+
+        Build fix for iOS
+
+        * bindings/objc/DOM.mm:
+        (-[DOMRange renderedImageForcingBlackText:renderedImageForcingBlackText:]):
+        We use CGImageRef instead of NSImage here on iOS.
+
 2014-08-01  Renato Nagy  <nagy.renato@stud.u-szeged.hu>
 
         ASSERTION FAILED: listNode in WebCore::RenderListItem::updateListMarkerNumbers
index 12b187f9701e840c0646ca311c19d66013d41a6f..780940cc623d493c62df59190397348b9ec67221 100644 (file)
@@ -610,6 +610,8 @@ id <DOMEventTarget> kit(WebCore::EventTarget* eventTarget)
     if (!frame)
         return nil;
 
+    // iOS uses CGImageRef for drag images, which doesn't support separate logical/physical sizes.
+#if PLATFORM(MAC)
     RetainPtr<NSImage> renderedImage = createDragImageForRange(*frame, *range, forceBlackText);
 
     IntSize size([renderedImage size]);
@@ -617,6 +619,9 @@ id <DOMEventTarget> kit(WebCore::EventTarget* eventTarget)
     [renderedImage setSize:size];
 
     return renderedImage.autorelease();
+#else
+    return createDragImageForRange(*frame, *range, forceBlackText).autorelease();
+#endif
 }
 
 - (NSArray *)textRects