Title: [223410] trunk/Source/WebCore
Revision
223410
Author
wenson_hs...@apple.com
Date
2017-10-16 09:21:09 -0700 (Mon, 16 Oct 2017)

Log Message

Unreviewed, fix the tvOS build after r223340.

Add a new #define in PlatformPasteboardIOS.mm for item provider support, and guard usages of
WebItemProviderPasteboard using it.

* platform/ios/PlatformPasteboardIOS.mm:
(WebCore::pasteboardMayContainFilePaths):
(WebCore::PlatformPasteboard::readURL):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (223409 => 223410)


--- trunk/Source/WebCore/ChangeLog	2017-10-16 16:19:29 UTC (rev 223409)
+++ trunk/Source/WebCore/ChangeLog	2017-10-16 16:21:09 UTC (rev 223410)
@@ -1,3 +1,14 @@
+2017-10-16  Wenson Hsieh  <wenson_hs...@apple.com>
+
+        Unreviewed, fix the tvOS build after r223340.
+
+        Add a new #define in PlatformPasteboardIOS.mm for item provider support, and guard usages of
+        WebItemProviderPasteboard using it.
+
+        * platform/ios/PlatformPasteboardIOS.mm:
+        (WebCore::pasteboardMayContainFilePaths):
+        (WebCore::PlatformPasteboard::readURL):
+
 2017-10-16  Ryan Haddad  <ryanhad...@apple.com>
 
         Unreviewed, rolling out r223271.

Modified: trunk/Source/WebCore/platform/ios/PlatformPasteboardIOS.mm (223409 => 223410)


--- trunk/Source/WebCore/platform/ios/PlatformPasteboardIOS.mm	2017-10-16 16:19:29 UTC (rev 223409)
+++ trunk/Source/WebCore/platform/ios/PlatformPasteboardIOS.mm	2017-10-16 16:21:09 UTC (rev 223410)
@@ -41,6 +41,8 @@
 #import <wtf/SoftLinking.h>
 #import <wtf/text/StringHash.h>
 
+#define PASTEBOARD_SUPPORTS_ITEM_PROVIDERS (PLATFORM(IOS) && !(PLATFORM(WATCHOS) || PLATFORM(APPLETV)))
+
 SOFT_LINK_FRAMEWORK(UIKit)
 SOFT_LINK_CLASS(UIKit, UIImage)
 SOFT_LINK_CLASS(UIKit, UIPasteboard)
@@ -52,7 +54,7 @@
 {
 }
 
-#if PLATFORM(IOS) && !(PLATFORM(WATCHOS) || PLATFORM(APPLETV))
+#if PASTEBOARD_SUPPORTS_ITEM_PROVIDERS
 PlatformPasteboard::PlatformPasteboard(const String& name)
 {
     if (name == "data interaction pasteboard")
@@ -113,8 +115,10 @@
 
 static bool pasteboardMayContainFilePaths(id<AbstractPasteboard> pasteboard)
 {
+#if PASTEBOARD_SUPPORTS_ITEM_PROVIDERS
     if ([pasteboard isKindOfClass:[WebItemProviderPasteboard class]])
         return false;
+#endif
 
     for (NSString *type in pasteboard.pasteboardTypes) {
         if (Pasteboard::shouldTreatCocoaTypeAsFile(type))
@@ -208,7 +212,7 @@
     return { };
 }
 
-#if PLATFORM(IOS) && !(PLATFORM(WATCHOS) || PLATFORM(APPLETV))
+#if PASTEBOARD_SUPPORTS_ITEM_PROVIDERS
 
 static NSString *webIOSPastePboardType = @"iOS rich content paste pasteboard type";
 
@@ -578,7 +582,7 @@
     if (!allowReadingURLAtIndex(url, index))
         return { };
 
-#if PLATFORM(IOS) && !(PLATFORM(WATCHOS) || PLATFORM(APPLETV))
+#if PASTEBOARD_SUPPORTS_ITEM_PROVIDERS
     title = [url _title];
 #else
     UNUSED_PARAM(title);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to