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)
commitb7afbc7fd9cc069806439a93db0d78126599f5c6
treefe3c4b3ad43dc031e1207c195f228a8f43bb2cad
parent8c569c88eacef77964cfd16dc19a13407eaf5e22
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.

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