Unreviewed, fix the internal build after r222595.
authorwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 Sep 2017 03:18:50 +0000 (03:18 +0000)
committerwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 Sep 2017 03:18:50 +0000 (03:18 +0000)
Add missing iOS compiler guards.

* platform/ios/PlatformPasteboardIOS.mm:
(WebCore::PlatformPasteboard::typesSafeForDOMToReadAndWrite const):
(WebCore::PlatformPasteboard::write):

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

Source/WebCore/ChangeLog
Source/WebCore/platform/ios/PlatformPasteboardIOS.mm

index 80396b90cfac28036eddb1f18dbe2efcb19fa9bd..efadda86299353f8227b6fcccbd3023a9f1b51aa 100644 (file)
@@ -1,3 +1,13 @@
+2017-09-27  Wenson Hsieh  <wenson_hsieh@apple.com>
+
+        Unreviewed, fix the internal build after r222595.
+
+        Add missing iOS compiler guards.
+
+        * platform/ios/PlatformPasteboardIOS.mm:
+        (WebCore::PlatformPasteboard::typesSafeForDOMToReadAndWrite const):
+        (WebCore::PlatformPasteboard::write):
+
 2017-09-27  Wenson Hsieh  <wenson_hsieh@apple.com>
 
         Drag event DataTransfer has unexpected types "dyn.ah62d4..."
index 77bb7f26393dbceb301748a2ed923166d8abc828..8bdfd5728c8cc7d82e68b5bd6c4fb2ccc92f5119 100644 (file)
@@ -436,6 +436,7 @@ static const char *safeTypeForDOMToReadAndWriteForPlatformType(const String& pla
 
 Vector<String> PlatformPasteboard::typesSafeForDOMToReadAndWrite() const
 {
+#if TARGET_OS_IPHONE
     ListHashSet<String> domPasteboardTypes;
     for (NSItemProvider *provider in [m_pasteboard itemProviders]) {
         if (!provider.teamData.length)
@@ -475,10 +476,14 @@ Vector<String> PlatformPasteboard::typesSafeForDOMToReadAndWrite() const
     Vector<String> result;
     copyToVector(domPasteboardTypes, result);
     return result;
+#else
+    return { };
+#endif
 }
 
 long PlatformPasteboard::write(const PasteboardCustomData& data)
 {
+#if TARGET_OS_IPHONE
     auto representationsToRegister = adoptNS([[WebItemProviderRegistrationInfoList alloc] init]);
     [representationsToRegister setPreferredPresentationStyle:WebPreferredPresentationStyleInline];
 
@@ -514,6 +519,9 @@ long PlatformPasteboard::write(const PasteboardCustomData& data)
 
     registerItemToPasteboard(representationsToRegister.get(), m_pasteboard.get());
     return [m_pasteboard changeCount];
+#else
+    UNUSED_PARAM(data);
+#endif
 }
 
 int PlatformPasteboard::count()