iOS: RTFD format is not available in the pasteboard after copy/cut.
authorenrica@apple.com <enrica@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 15 Mar 2016 00:47:11 +0000 (00:47 +0000)
committerenrica@apple.com <enrica@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 15 Mar 2016 00:47:11 +0000 (00:47 +0000)
https://bugs.webkit.org/show_bug.cgi?id=155477
rdar://problem/23500600

Reviewed by Tim Horton.

WebKit is using UTTypeRTFD instead of UTTypeFlatRTFD that is the
proper RTFD format for pastedboard. I also discovered that, when
we create the NSTextAttachment in the NSAttributedString we produce
from the DOM range, we are not generating a file name with the
appropriate extension for the MIME type. The iOS specific implementation
of the MIMETypeRegistry functions were empty.
There is no need to have a differentiation between OS X and iOS, so
we now have only one file called MIMETypeRegistryCocoa.mm.

* WebCore.xcodeproj/project.pbxproj:
* platform/cocoa/MIMETypeRegistryCocoa.mm: Added.
(WebCore::MIMETypeRegistry::getMIMETypeForExtension):
(WebCore::MIMETypeRegistry::getExtensionsForMIMEType):
(WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType):
(WebCore::MIMETypeRegistry::isApplicationPluginMIMEType):
* platform/ios/MIMETypeRegistryIOS.mm: Removed.
* platform/ios/PasteboardIOS.mm:
(WebCore::Pasteboard::read):
(WebCore::Pasteboard::supportedPasteboardTypes):
(WebCore::Pasteboard::hasData):
* platform/ios/PlatformPasteboardIOS.mm:
(WebCore::PlatformPasteboard::write):
* platform/mac/MIMETypeRegistryMac.mm: Removed.

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

Source/WebCore/ChangeLog
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/platform/cocoa/MIMETypeRegistryCocoa.mm [moved from Source/WebCore/platform/mac/MIMETypeRegistryMac.mm with 96% similarity]
Source/WebCore/platform/ios/MIMETypeRegistryIOS.mm [deleted file]
Source/WebCore/platform/ios/PasteboardIOS.mm
Source/WebCore/platform/ios/PlatformPasteboardIOS.mm

index f1e09ea..5cbd6f6 100644 (file)
@@ -1,3 +1,35 @@
+2016-03-14  Enrica Casucci  <enrica@apple.com>
+
+        iOS: RTFD format is not available in the pasteboard after copy/cut.
+        https://bugs.webkit.org/show_bug.cgi?id=155477
+        rdar://problem/23500600
+
+        Reviewed by Tim Horton.
+
+        WebKit is using UTTypeRTFD instead of UTTypeFlatRTFD that is the
+        proper RTFD format for pastedboard. I also discovered that, when
+        we create the NSTextAttachment in the NSAttributedString we produce
+        from the DOM range, we are not generating a file name with the
+        appropriate extension for the MIME type. The iOS specific implementation
+        of the MIMETypeRegistry functions were empty.
+        There is no need to have a differentiation between OS X and iOS, so
+        we now have only one file called MIMETypeRegistryCocoa.mm.
+
+        * WebCore.xcodeproj/project.pbxproj:
+        * platform/cocoa/MIMETypeRegistryCocoa.mm: Added.
+        (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
+        (WebCore::MIMETypeRegistry::getExtensionsForMIMEType):
+        (WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType):
+        (WebCore::MIMETypeRegistry::isApplicationPluginMIMEType):
+        * platform/ios/MIMETypeRegistryIOS.mm: Removed.
+        * platform/ios/PasteboardIOS.mm:
+        (WebCore::Pasteboard::read):
+        (WebCore::Pasteboard::supportedPasteboardTypes):
+        (WebCore::Pasteboard::hasData):
+        * platform/ios/PlatformPasteboardIOS.mm:
+        (WebCore::PlatformPasteboard::write):
+        * platform/mac/MIMETypeRegistryMac.mm: Removed.
+
 2016-03-14  Daniel Bates  <dabates@apple.com>
 
         Web Inspector: Display Content Security Policy hash in details sidebar for script and style elements
index 4b17863..4ac80e6 100644 (file)
                BC772C470C4EB2C60083285F /* XMLHttpRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = BC772C450C4EB2C60083285F /* XMLHttpRequest.h */; };
                BC772C4E0C4EB3040083285F /* MIMETypeRegistry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC772C4C0C4EB3040083285F /* MIMETypeRegistry.cpp */; };
                BC772C4F0C4EB3040083285F /* MIMETypeRegistry.h in Headers */ = {isa = PBXBuildFile; fileRef = BC772C4D0C4EB3040083285F /* MIMETypeRegistry.h */; settings = {ATTRIBUTES = (Private, ); }; };
-               BC772C5E0C4EB3440083285F /* MIMETypeRegistryMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC772C5D0C4EB3440083285F /* MIMETypeRegistryMac.mm */; };
                BC772E131331620C001EC9CE /* CSSLineBoxContainValue.h in Headers */ = {isa = PBXBuildFile; fileRef = BC772E121331620C001EC9CE /* CSSLineBoxContainValue.h */; settings = {ATTRIBUTES = (Private, ); }; };
                BC772E16133162C2001EC9CE /* CSSLineBoxContainValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC772E15133162C2001EC9CE /* CSSLineBoxContainValue.cpp */; };
                BC779E141BB215BB00CAA8BF /* CSSCustomPropertyValue.h in Headers */ = {isa = PBXBuildFile; fileRef = BC779E131BB215BB00CAA8BF /* CSSCustomPropertyValue.h */; settings = {ATTRIBUTES = (Private, ); }; };
                C5227DF11C3C6DF100F5ED54 /* DataDetection.h in Headers */ = {isa = PBXBuildFile; fileRef = C5227DEF1C3C6DD700F5ED54 /* DataDetection.h */; settings = {ATTRIBUTES = (Private, ); }; };
                C5227DF21C3C6DF900F5ED54 /* DataDetection.mm in Sources */ = {isa = PBXBuildFile; fileRef = C5227DF01C3C6DD700F5ED54 /* DataDetection.mm */; };
                C5278B0C17F212EA003A2998 /* PlatformPasteboardIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = C5278B0B17F212EA003A2998 /* PlatformPasteboardIOS.mm */; };
+               C53D39341C978A45007F3AE9 /* MIMETypeRegistryCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = C53D39331C97892D007F3AE9 /* MIMETypeRegistryCocoa.mm */; };
                C544274B11A57E7A0063A749 /* DOMStringList.h in Headers */ = {isa = PBXBuildFile; fileRef = C544274911A57E7A0063A749 /* DOMStringList.h */; settings = {ATTRIBUTES = (Private, ); }; };
                C55610F111A704EB00B82D27 /* DOMStringList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C55610F011A704EB00B82D27 /* DOMStringList.cpp */; };
                C5592F781A92AA28001F8862 /* CharacterProperties.h in Headers */ = {isa = PBXBuildFile; fileRef = C5592F771A92AA28001F8862 /* CharacterProperties.h */; };
                E44FA1871BCA91560091B6EF /* ComposedTreeIterator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E44FA1861BCA91560091B6EF /* ComposedTreeIterator.cpp */; };
                E45322AB140CE267005A0F92 /* SelectorQuery.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E45322A9140CE267005A0F92 /* SelectorQuery.cpp */; };
                E45322AC140CE267005A0F92 /* SelectorQuery.h in Headers */ = {isa = PBXBuildFile; fileRef = E45322AA140CE267005A0F92 /* SelectorQuery.h */; };
-               E453901D0EAFCACA003695C8 /* MIMETypeRegistryIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = E45390180EAFCACA003695C8 /* MIMETypeRegistryIOS.mm */; };
                E453901E0EAFCACA003695C8 /* PasteboardIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = E45390190EAFCACA003695C8 /* PasteboardIOS.mm */; };
                E45390430EAFD637003695C8 /* PlatformScreenIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = E45390320EAFD637003695C8 /* PlatformScreenIOS.mm */; };
                E45390450EAFD637003695C8 /* ScrollViewIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = E45390340EAFD637003695C8 /* ScrollViewIOS.mm */; };
                BC772C450C4EB2C60083285F /* XMLHttpRequest.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = XMLHttpRequest.h; sourceTree = "<group>"; };
                BC772C4C0C4EB3040083285F /* MIMETypeRegistry.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = MIMETypeRegistry.cpp; sourceTree = "<group>"; };
                BC772C4D0C4EB3040083285F /* MIMETypeRegistry.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MIMETypeRegistry.h; sourceTree = "<group>"; };
-               BC772C5D0C4EB3440083285F /* MIMETypeRegistryMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = MIMETypeRegistryMac.mm; sourceTree = "<group>"; };
                BC772E121331620C001EC9CE /* CSSLineBoxContainValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSLineBoxContainValue.h; sourceTree = "<group>"; };
                BC772E15133162C2001EC9CE /* CSSLineBoxContainValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CSSLineBoxContainValue.cpp; sourceTree = "<group>"; };
                BC779E131BB215BB00CAA8BF /* CSSCustomPropertyValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSCustomPropertyValue.h; sourceTree = "<group>"; };
                C5227DEF1C3C6DD700F5ED54 /* DataDetection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DataDetection.h; sourceTree = "<group>"; };
                C5227DF01C3C6DD700F5ED54 /* DataDetection.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DataDetection.mm; sourceTree = "<group>"; };
                C5278B0B17F212EA003A2998 /* PlatformPasteboardIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PlatformPasteboardIOS.mm; sourceTree = "<group>"; };
+               C53D39331C97892D007F3AE9 /* MIMETypeRegistryCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MIMETypeRegistryCocoa.mm; sourceTree = "<group>"; };
                C544274911A57E7A0063A749 /* DOMStringList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMStringList.h; sourceTree = "<group>"; };
                C544274A11A57E7A0063A749 /* DOMStringList.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DOMStringList.idl; sourceTree = "<group>"; };
                C55610F011A704EB00B82D27 /* DOMStringList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DOMStringList.cpp; sourceTree = "<group>"; };
                E44FA1861BCA91560091B6EF /* ComposedTreeIterator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ComposedTreeIterator.cpp; sourceTree = "<group>"; };
                E45322A9140CE267005A0F92 /* SelectorQuery.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SelectorQuery.cpp; sourceTree = "<group>"; };
                E45322AA140CE267005A0F92 /* SelectorQuery.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SelectorQuery.h; sourceTree = "<group>"; };
-               E45390180EAFCACA003695C8 /* MIMETypeRegistryIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MIMETypeRegistryIOS.mm; sourceTree = "<group>"; };
                E45390190EAFCACA003695C8 /* PasteboardIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PasteboardIOS.mm; sourceTree = "<group>"; };
                E45390320EAFD637003695C8 /* PlatformScreenIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PlatformScreenIOS.mm; sourceTree = "<group>"; };
                E45390340EAFD637003695C8 /* ScrollViewIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ScrollViewIOS.mm; sourceTree = "<group>"; };
                                06E81ED60AB5D5E900C87837 /* LocalCurrentGraphicsContext.h */,
                                06E81EEB0AB5DA9700C87837 /* LocalCurrentGraphicsContext.mm */,
                                1402645D0AFDC19B005919E2 /* LoggingMac.mm */,
-                               BC772C5D0C4EB3440083285F /* MIMETypeRegistryMac.mm */,
                                93500F3113FDE3BE0099EC24 /* NSScrollerImpDetails.h */,
                                52F52E1014A0134F00ACC397 /* NSScrollerImpDetails.mm */,
                                4B2709810AF2E5E00065127F /* PasteboardMac.mm */,
                                E4B65A5D132FADB60070E7BE /* LegacyTileLayer.mm */,
                                E4E39AFA1330EFA8003AB274 /* LegacyTileLayerPool.h */,
                                E4E39AFC1330EFC5003AB274 /* LegacyTileLayerPool.mm */,
-                               E45390180EAFCACA003695C8 /* MIMETypeRegistryIOS.mm */,
                                E45390190EAFCACA003695C8 /* PasteboardIOS.mm */,
                                26601EBD14B3B9AD0012C0FE /* PlatformEventFactoryIOS.h */,
                                26601EBE14B3B9AD0012C0FE /* PlatformEventFactoryIOS.mm */,
                                1A0409F21A43675C009E47F3 /* MachSendRight.cpp */,
                                1A0409DB1A4360B5009E47F3 /* MachSendRight.h */,
                                ADB6B29718FB90240081963E /* MemoryPressureHandlerCocoa.mm */,
+                               C53D39331C97892D007F3AE9 /* MIMETypeRegistryCocoa.mm */,
                                A19D93491AA11B1E00B46C24 /* NetworkExtensionContentFilter.h */,
                                A19D93481AA11B1E00B46C24 /* NetworkExtensionContentFilter.mm */,
                                A18890AD1AA13F250026C301 /* ParentalControlsContentFilter.h */,
                                A81369D7097374F600D74463 /* HTMLTextAreaElement.cpp in Sources */,
                                9BC6C21C13CCC97B008E0337 /* HTMLTextFormControlElement.cpp in Sources */,
                                830519951BB0F11000F3772E /* HTMLTimeElement.cpp in Sources */,
+                               C53D39341C978A45007F3AE9 /* MIMETypeRegistryCocoa.mm in Sources */,
                                A871DC290A15205700B12A68 /* HTMLTitleElement.cpp in Sources */,
                                977B3877122883E900B81FF8 /* HTMLTokenizer.cpp in Sources */,
                                0707568B142262D600414161 /* HTMLTrackElement.cpp in Sources */,
                                CB8CF0181A9358D4000D510B /* Microtasks.cpp in Sources */,
                                37DDCD9413844FD50008B793 /* MIMEHeader.cpp in Sources */,
                                BC772C4E0C4EB3040083285F /* MIMETypeRegistry.cpp in Sources */,
-                               E453901D0EAFCACA003695C8 /* MIMETypeRegistryIOS.mm in Sources */,
-                               BC772C5E0C4EB3440083285F /* MIMETypeRegistryMac.mm in Sources */,
                                52F10865162B6DA4009AC81E /* MixedContentChecker.cpp in Sources */,
                                CDF2B0101820540600F2B424 /* MockBox.cpp in Sources */,
                                CDF2B0121820540600F2B424 /* MockMediaPlayerMediaSource.cpp in Sources */,
 #include "MIMETypeRegistry.h"
 
 #include "NSURLFileTypeMappingsSPI.h"
-#include <wtf/Assertions.h>
-#include <wtf/MainThread.h>
 
-namespace WebCore 
-{
+namespace WebCore {
 
 String MIMETypeRegistry::getMIMETypeForExtension(const String& extension)
 {
-    ASSERT(isMainThread());
     return [[NSURLFileTypeMappings sharedMappings] MIMETypeForExtension:(NSString *)extension];
 }
 
@@ -68,6 +64,8 @@ bool MIMETypeRegistry::isApplicationPluginMIMEType(const String& MIMEType)
     // plugin, there won't exist an application plugin supporting these MIME types.
     if (isPDFOrPostScriptMIMEType(MIMEType))
         return true;
+#else
+    UNUSED_PARAM(MIMEType);
 #endif
 
     return false;
diff --git a/Source/WebCore/platform/ios/MIMETypeRegistryIOS.mm b/Source/WebCore/platform/ios/MIMETypeRegistryIOS.mm
deleted file mode 100644 (file)
index 3f75f7f..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "MIMETypeRegistry.h"
-
-#include "NSURLFileTypeMappingsSPI.h"
-
-namespace WebCore 
-{
-String MIMETypeRegistry::getMIMETypeForExtension(const String& extension)
-{
-    return [[NSURLFileTypeMappings sharedMappings] MIMETypeForExtension:(NSString *)extension];
-}
-
-Vector<String> MIMETypeRegistry::getExtensionsForMIMEType(const String& /*type*/)
-{
-    return Vector<String>();
-}
-
-String MIMETypeRegistry::getPreferredExtensionForMIMEType(const String& /*type*/)
-{
-    return String();
-}
-
-bool MIMETypeRegistry::isApplicationPluginMIMEType(const String&)
-{
-    return false;
-}
-
-} // namespace WebCore
index fdcc3b3..adcd036 100644 (file)
@@ -78,7 +78,7 @@ SOFT_LINK_CONSTANT(MobileCoreServices, kUTTypeGIF, CFStringRef)
 SOFT_LINK_CONSTANT(MobileCoreServices, kUTTagClassMIMEType, CFStringRef)
 SOFT_LINK_CONSTANT(MobileCoreServices, kUTTagClassFilenameExtension, CFStringRef)
 SOFT_LINK_CONSTANT(MobileCoreServices, kUTTypeHTML, CFStringRef)
-SOFT_LINK_CONSTANT(MobileCoreServices, kUTTypeRTFD, CFStringRef)
+SOFT_LINK_CONSTANT(MobileCoreServices, kUTTypeFlatRTFD, CFStringRef)
 SOFT_LINK_CONSTANT(MobileCoreServices, kUTTypeRTF, CFStringRef)
 
 #define kUTTypeText getkUTTypeText()
@@ -90,7 +90,7 @@ SOFT_LINK_CONSTANT(MobileCoreServices, kUTTypeRTF, CFStringRef)
 #define kUTTagClassMIMEType getkUTTagClassMIMEType()
 #define kUTTagClassFilenameExtension getkUTTagClassFilenameExtension()
 #define kUTTypeHTML getkUTTypeHTML()
-#define kUTTypeRTFD getkUTTypeRTFD()
+#define kUTTypeFlatRTFD getkUTTypeFlatRTFD()
 #define kUTTypeRTF getkUTTypeRTF()
 
 namespace WebCore {
@@ -207,8 +207,8 @@ void Pasteboard::read(PasteboardWebContentReader& reader)
                     break;
             }
 
-             if ([type isEqualToString:(NSString *)kUTTypeRTFD]) {
-                if (RefPtr<SharedBuffer> buffer = strategy.readBufferFromPasteboard(i, kUTTypeRTFD)) {
+            if ([type isEqualToString:(NSString *)kUTTypeFlatRTFD]) {
+                if (RefPtr<SharedBuffer> buffer = strategy.readBufferFromPasteboard(i, kUTTypeFlatRTFD)) {
                     if (reader.readRTFD(*buffer))
                         break;
                 }
@@ -246,7 +246,7 @@ void Pasteboard::read(PasteboardWebContentReader& reader)
 
 NSArray* Pasteboard::supportedPasteboardTypes()
 {
-    return @[(id)WebArchivePboardType, (id)kUTTypeRTFD, (id)kUTTypeRTF, (id)kUTTypeHTML, (id)kUTTypePNG, (id)kUTTypeTIFF, (id)kUTTypeJPEG, (id)kUTTypeGIF, (id)kUTTypeURL, (id)kUTTypeText];
+    return @[(id)WebArchivePboardType, (id)kUTTypeFlatRTFD, (id)kUTTypeRTF, (id)kUTTypeHTML, (id)kUTTypePNG, (id)kUTTypeTIFF, (id)kUTTypeJPEG, (id)kUTTypeGIF, (id)kUTTypeURL, (id)kUTTypeText];
 }
 
 bool Pasteboard::hasData()
index 8a5d55f..1563a12 100644 (file)
@@ -56,7 +56,7 @@ SOFT_LINK_CONSTANT(MobileCoreServices, kUTTypeTIFF, CFStringRef)
 SOFT_LINK_CONSTANT(MobileCoreServices, kUTTypeGIF, CFStringRef)
 SOFT_LINK_CONSTANT(MobileCoreServices, kUTTagClassMIMEType, CFStringRef)
 SOFT_LINK_CONSTANT(MobileCoreServices, kUTTagClassFilenameExtension, CFStringRef)
-SOFT_LINK_CONSTANT(MobileCoreServices, kUTTypeRTFD, CFStringRef)
+SOFT_LINK_CONSTANT(MobileCoreServices, kUTTypeFlatRTFD, CFStringRef)
 SOFT_LINK_CONSTANT(MobileCoreServices, kUTTypeRTF, CFStringRef)
 
 #define kUTTypeText getkUTTypeText()
@@ -67,7 +67,7 @@ SOFT_LINK_CONSTANT(MobileCoreServices, kUTTypeRTF, CFStringRef)
 #define kUTTypeGIF  getkUTTypeGIF()
 #define kUTTagClassMIMEType getkUTTagClassMIMEType()
 #define kUTTagClassFilenameExtension getkUTTagClassFilenameExtension()
-#define kUTTypeRTFD getkUTTypeRTFD()
+#define kUTTypeFlatRTFD getkUTTypeFlatRTFD()
 #define kUTTypeRTF getkUTTypeRTF()
 
 namespace WebCore {
@@ -162,7 +162,7 @@ void PlatformPasteboard::write(const PasteboardWebContent& content)
     }
 
     if (content.dataInRTFDFormat)
-        [representations setValue:content.dataInRTFDFormat->createNSData().get() forKey:(NSString *)kUTTypeRTFD];
+        [representations setValue:content.dataInRTFDFormat->createNSData().get() forKey:(NSString *)kUTTypeFlatRTFD];
     if (content.dataInRTFFormat)
         [representations setValue:content.dataInRTFFormat->createNSData().get() forKey:(NSString *)kUTTypeRTF];
     [representations setValue:content.dataInStringFormat forKey:(NSString *)kUTTypeText];