Fix iOS build.
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 11 Jan 2014 04:41:33 +0000 (04:41 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 11 Jan 2014 04:41:33 +0000 (04:41 +0000)
* bindings/objc/DOM.mm:
(-[DOMRange renderedImageForcingBlackText:renderedImageForcingBlackText:]):
* bindings/objc/DOMExtensions.h:
* platform/DragImage.h:

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

Source/WebCore/ChangeLog
Source/WebCore/bindings/objc/DOM.mm
Source/WebCore/bindings/objc/DOMExtensions.h
Source/WebCore/platform/DragImage.h

index aa96d9f..cb9c462 100644 (file)
@@ -1,6 +1,15 @@
 2014-01-10  Simon Fraser  <simon.fraser@apple.com>
 
         Fix iOS build.
+
+        * bindings/objc/DOM.mm:
+        (-[DOMRange renderedImageForcingBlackText:renderedImageForcingBlackText:]):
+        * bindings/objc/DOMExtensions.h:
+        * platform/DragImage.h:
+
+2014-01-10  Simon Fraser  <simon.fraser@apple.com>
+
+        Fix iOS build.
         
         Generated DOMTouch* and DOMGesture* files need to be in the project.
         Exclude them on Mac via EXCLUDED_SOURCE_FILE_NAMES_macosx.
index 22bd9d3..df24046 100644 (file)
@@ -610,7 +610,11 @@ id <DOMEventTarget> kit(WebCore::EventTarget* eventTarget)
     if (!frame)
         return nil;
 
+#if PLATFORM(IOS)
+    return createDragImageForRange(*frame, *range, forceBlackText).leakRef();
+#else
     return [createDragImageForRange(*frame, *range, forceBlackText).leakRef() autorelease];
+#endif
 }
 
 - (NSArray *)textRects
index 634fa79..2ab7875 100644 (file)
@@ -48,7 +48,9 @@
 #endif
 
 @class NSArray;
+#if !TARGET_OS_IPHONE
 @class NSImage;
+#endif
 @class NSURL;
 
 
@@ -110,7 +112,7 @@ typedef struct _WKQuad {
 @end
 
 @interface DOMElement (DOMElementAppKitExtensions)
-#if TARGET_OS_MAC
+#if !TARGET_OS_IPHONE
 - (NSImage *)image WEBKIT_AVAILABLE_MAC(10_5);
 #endif
 @end
index c37a47c..22a1a05 100644 (file)
 #include "IntSize.h"
 #include <wtf/Forward.h>
 
-#if PLATFORM(MAC)
+#if PLATFORM(IOS)
+#include <wtf/RetainPtr.h>
+typedef struct CGImage *CGImageRef;
+#elif PLATFORM(MAC)
 #include <wtf/RetainPtr.h>
 OBJC_CLASS NSImage;
 #elif PLATFORM(WIN)
@@ -54,7 +57,9 @@ class Node;
 class Range;
 class URL;
 
-#if PLATFORM(MAC)
+#if PLATFORM(IOS)
+typedef RetainPtr<CGImageRef> DragImageRef;
+#elif PLATFORM(MAC)
 typedef RetainPtr<NSImage> DragImageRef;
 #elif PLATFORM(WIN)
 typedef HBITMAP DragImageRef;