Unreviewed, fix watchOS and tvOS builds after r251224
* platform/ios/PlatformPasteboardIOS.mm:
(WebCore::shouldTreatAtLeastOneTypeAsFile):
Move the `shouldTreatAtLeastOneTypeAsFile` helper function out of the `PASTEBOARD_SUPPORTS_ITEM_PROVIDERS`
section, and into generic iOS-family code so that it can be used in `pasteboardMayContainFilePaths`.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@251236 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 71c789f..fce52eb 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,13 @@
+2019-10-17 Wenson Hsieh <wenson_hsieh@apple.com>
+
+ Unreviewed, fix watchOS and tvOS builds after r251224
+
+ * platform/ios/PlatformPasteboardIOS.mm:
+ (WebCore::shouldTreatAtLeastOneTypeAsFile):
+
+ Move the `shouldTreatAtLeastOneTypeAsFile` helper function out of the `PASTEBOARD_SUPPORTS_ITEM_PROVIDERS`
+ section, and into generic iOS-family code so that it can be used in `pasteboardMayContainFilePaths`.
+
2019-10-17 Youenn Fablet <youenn@apple.com>
MultiChannelResampler does not need to recreate a ChannelProvider for every process call
diff --git a/Source/WebCore/platform/ios/PlatformPasteboardIOS.mm b/Source/WebCore/platform/ios/PlatformPasteboardIOS.mm
index b356525..8cb3b60 100644
--- a/Source/WebCore/platform/ios/PlatformPasteboardIOS.mm
+++ b/Source/WebCore/platform/ios/PlatformPasteboardIOS.mm
@@ -95,6 +95,15 @@
return [m_pasteboard respondsToSelector:@selector(numberOfFiles)] ? [m_pasteboard numberOfFiles] : 0;
}
+static bool shouldTreatAtLeastOneTypeAsFile(NSArray<NSString *> *platformTypes)
+{
+ for (NSString *type in platformTypes) {
+ if (Pasteboard::shouldTreatCocoaTypeAsFile(type))
+ return true;
+ }
+ return false;
+}
+
#if PASTEBOARD_SUPPORTS_ITEM_PROVIDERS
static const char *safeTypeForDOMToReadAndWriteForPlatformType(const String& platformType)
@@ -155,15 +164,6 @@
#endif // PASTEBOARD_SUPPORTS_PRESENTATION_STYLE_AND_TEAM_DATA
-static bool shouldTreatAtLeastOneTypeAsFile(NSArray <NSString *> *platformTypes)
-{
- for (NSString *type in platformTypes) {
- if (Pasteboard::shouldTreatCocoaTypeAsFile(type))
- return true;
- }
- return false;
-}
-
PasteboardItemInfo PlatformPasteboard::informationForItemAtIndex(size_t index)
{
if (index >= static_cast<NSUInteger>([m_pasteboard numberOfItems]))