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: http://svn.webkit.org/repository/webkit/trunk@222596 268f45cc-cd09-0410-ab3c-d52691b4dbfc

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

index 80396b9..efadda8 100644 (file)
@@ -1,5 +1,15 @@
 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..."
         https://bugs.webkit.org/show_bug.cgi?id=172526
         <rdar://problem/32396081>
index 77bb7f2..8bdfd57 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()