[iOS] Adopt UIPreviewDataAttachmentListIsContentManaged
authoraestes@apple.com <aestes@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Nov 2017 17:20:27 +0000 (17:20 +0000)
committeraestes@apple.com <aestes@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Nov 2017 17:20:27 +0000 (17:20 +0000)
https://bugs.webkit.org/show_bug.cgi?id=179458
<rdar://problem/35034691>

Reviewed by Dan Bernstein.

* Platform/spi/ios/UIKitSPI.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _dataForPreviewItemController:atPosition:type:]):

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

Source/WebKit/ChangeLog
Source/WebKit/Platform/spi/ios/UIKitSPI.h
Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm

index 86b3f8e..ec04b3c 100644 (file)
@@ -1,3 +1,15 @@
+2017-11-09  Andy Estes  <aestes@apple.com>
+
+        [iOS] Adopt UIPreviewDataAttachmentListIsContentManaged
+        https://bugs.webkit.org/show_bug.cgi?id=179458
+        <rdar://problem/35034691>
+
+        Reviewed by Dan Bernstein.
+
+        * Platform/spi/ios/UIKitSPI.h:
+        * UIProcess/ios/WKContentViewInteraction.mm:
+        (-[WKContentView _dataForPreviewItemController:atPosition:type:]):
+
 2017-11-08  Joseph Pecoraro  <pecoraro@apple.com>
 
         Include a more complete block signature in public headers to avoid potential -Wstrict-prototypes warnings
index 5375211..8f10e11 100644 (file)
@@ -1029,6 +1029,8 @@ extern const NSString *UIPreviewDataDDContext;
 extern const NSString *UIPreviewDataAttachmentList;
 extern const NSString *UIPreviewDataAttachmentIndex;
 
+extern NSString * const UIPreviewDataAttachmentListSourceIsManaged;
+
 UIEdgeInsets UIEdgeInsetsAdd(UIEdgeInsets lhs, UIEdgeInsets rhs, UIRectEdge);
 
 WTF_EXTERN_C_END
index 052d705..e3621ca 100644 (file)
@@ -4998,11 +4998,15 @@ static NSArray<UIItemProvider *> *extractItemProvidersFromDropSession(id <UIDrop
                 dataForPreview[UIPreviewDataAttachmentList] = [uiDelegate _attachmentListForWebView:_webView];
             dataForPreview[UIPreviewDataAttachmentIndex] = [NSNumber numberWithUnsignedInteger:index];
 
+#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 120000
             // FIXME: Replace the following NSString literal with a UIKit NSString constant.
-            dataForPreview[@"UIPreviewDataAttachmentListSourceIsManaged"] = [NSNumber numberWithBool:sourceIsManaged];
+            dataForPreview[@"UIPreviewDataAttachmentListIsContentManaged"] = [NSNumber numberWithBool:sourceIsManaged];
+#else
+            dataForPreview[UIPreviewDataAttachmentListSourceIsManaged] = [NSNumber numberWithBool:sourceIsManaged];
+#endif
         }
     }
-    
+
     return dataForPreview;
 }