Diff
Modified: trunk/Source/WebCore/ChangeLog (198178 => 198179)
--- trunk/Source/WebCore/ChangeLog 2016-03-15 00:39:59 UTC (rev 198178)
+++ trunk/Source/WebCore/ChangeLog 2016-03-15 00:47:11 UTC (rev 198179)
@@ -1,3 +1,35 @@
+2016-03-14 Enrica Casucci <[email protected]>
+
+ 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 <[email protected]>
Web Inspector: Display Content Security Policy hash in details sidebar for script and style elements
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (198178 => 198179)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2016-03-15 00:39:59 UTC (rev 198178)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2016-03-15 00:47:11 UTC (rev 198179)
@@ -5629,7 +5629,6 @@
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, ); }; };
@@ -5943,6 +5942,7 @@
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 */; };
@@ -6620,7 +6620,6 @@
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 */; };
@@ -13546,7 +13545,6 @@
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>"; };
@@ -13898,6 +13896,7 @@
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>"; };
@@ -14662,7 +14661,6 @@
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>"; };
@@ -17865,7 +17863,6 @@
06E81ED60AB5D5E900C87837 /* LocalCurrentGraphicsContext.h */,
06E81EEB0AB5DA9700C87837 /* LocalCurrentGraphicsContext.mm */,
1402645D0AFDC19B005919E2 /* LoggingMac.mm */,
- BC772C5D0C4EB3440083285F /* MIMETypeRegistryMac.mm */,
93500F3113FDE3BE0099EC24 /* NSScrollerImpDetails.h */,
52F52E1014A0134F00ACC397 /* NSScrollerImpDetails.mm */,
4B2709810AF2E5E00065127F /* PasteboardMac.mm */,
@@ -19977,7 +19974,6 @@
E4B65A5D132FADB60070E7BE /* LegacyTileLayer.mm */,
E4E39AFA1330EFA8003AB274 /* LegacyTileLayerPool.h */,
E4E39AFC1330EFC5003AB274 /* LegacyTileLayerPool.mm */,
- E45390180EAFCACA003695C8 /* MIMETypeRegistryIOS.mm */,
E45390190EAFCACA003695C8 /* PasteboardIOS.mm */,
26601EBD14B3B9AD0012C0FE /* PlatformEventFactoryIOS.h */,
26601EBE14B3B9AD0012C0FE /* PlatformEventFactoryIOS.mm */,
@@ -20035,6 +20031,7 @@
1A0409F21A43675C009E47F3 /* MachSendRight.cpp */,
1A0409DB1A4360B5009E47F3 /* MachSendRight.h */,
ADB6B29718FB90240081963E /* MemoryPressureHandlerCocoa.mm */,
+ C53D39331C97892D007F3AE9 /* MIMETypeRegistryCocoa.mm */,
A19D93491AA11B1E00B46C24 /* NetworkExtensionContentFilter.h */,
A19D93481AA11B1E00B46C24 /* NetworkExtensionContentFilter.mm */,
A18890AD1AA13F250026C301 /* ParentalControlsContentFilter.h */,
@@ -29966,6 +29963,7 @@
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 */,
@@ -31002,8 +31000,6 @@
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 */,
Added: trunk/Source/WebCore/platform/cocoa/MIMETypeRegistryCocoa.mm (0 => 198179)
--- trunk/Source/WebCore/platform/cocoa/MIMETypeRegistryCocoa.mm (rev 0)
+++ trunk/Source/WebCore/platform/cocoa/MIMETypeRegistryCocoa.mm 2016-03-15 00:47:11 UTC (rev 198179)
@@ -0,0 +1,74 @@
+/*
+ * Copyright (C) 2006 Apple Inc. All rights reserved.
+ * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * 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. ``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
+ * 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)
+{
+ NSArray *stringsArray = [[NSURLFileTypeMappings sharedMappings] extensionsForMIMEType:(NSString *)type];
+ Vector<String> stringsVector = Vector<String>();
+ unsigned count = [stringsArray count];
+ if (count > 0) {
+ NSEnumerator* enumerator = [stringsArray objectEnumerator];
+ NSString* string;
+ while ((string = [enumerator nextObject]) != nil)
+ stringsVector.append(string);
+ }
+ return stringsVector;
+}
+
+String MIMETypeRegistry::getPreferredExtensionForMIMEType(const String& type)
+{
+ return [[NSURLFileTypeMappings sharedMappings] preferredExtensionForMIMEType:(NSString *)type];
+}
+
+bool MIMETypeRegistry::isApplicationPluginMIMEType(const String& MIMEType)
+{
+#if ENABLE(PDFKIT_PLUGIN)
+ // FIXME: This should test if we're actually going to use PDFPlugin,
+ // but we only know that in WebKit2 at the moment. This is not a problem
+ // in practice because if we don't have PDFPlugin and we go to instantiate the
+ // plugin, there won't exist an application plugin supporting these MIME types.
+ if (isPDFOrPostScriptMIMEType(MIMEType))
+ return true;
+#else
+ UNUSED_PARAM(MIMEType);
+#endif
+
+ return false;
+}
+
+}
Deleted: trunk/Source/WebCore/platform/ios/MIMETypeRegistryIOS.mm (198178 => 198179)
--- trunk/Source/WebCore/platform/ios/MIMETypeRegistryIOS.mm 2016-03-15 00:39:59 UTC (rev 198178)
+++ trunk/Source/WebCore/platform/ios/MIMETypeRegistryIOS.mm 2016-03-15 00:47:11 UTC (rev 198179)
@@ -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
Modified: trunk/Source/WebCore/platform/ios/PasteboardIOS.mm (198178 => 198179)
--- trunk/Source/WebCore/platform/ios/PasteboardIOS.mm 2016-03-15 00:39:59 UTC (rev 198178)
+++ trunk/Source/WebCore/platform/ios/PasteboardIOS.mm 2016-03-15 00:47:11 UTC (rev 198179)
@@ -78,7 +78,7 @@
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 @@
#define kUTTagClassMIMEType getkUTTagClassMIMEType()
#define kUTTagClassFilenameExtension getkUTTagClassFilenameExtension()
#define kUTTypeHTML getkUTTypeHTML()
-#define kUTTypeRTFD getkUTTypeRTFD()
+#define kUTTypeFlatRTFD getkUTTypeFlatRTFD()
#define kUTTypeRTF getkUTTypeRTF()
namespace WebCore {
@@ -207,8 +207,8 @@
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 @@
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()
Modified: trunk/Source/WebCore/platform/ios/PlatformPasteboardIOS.mm (198178 => 198179)
--- trunk/Source/WebCore/platform/ios/PlatformPasteboardIOS.mm 2016-03-15 00:39:59 UTC (rev 198178)
+++ trunk/Source/WebCore/platform/ios/PlatformPasteboardIOS.mm 2016-03-15 00:47:11 UTC (rev 198179)
@@ -56,7 +56,7 @@
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 @@
#define kUTTypeGIF getkUTTypeGIF()
#define kUTTagClassMIMEType getkUTTagClassMIMEType()
#define kUTTagClassFilenameExtension getkUTTagClassFilenameExtension()
-#define kUTTypeRTFD getkUTTypeRTFD()
+#define kUTTypeFlatRTFD getkUTTypeFlatRTFD()
#define kUTTypeRTF getkUTTypeRTF()
namespace WebCore {
@@ -162,7 +162,7 @@
}
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];
Deleted: trunk/Source/WebCore/platform/mac/MIMETypeRegistryMac.mm (198178 => 198179)
--- trunk/Source/WebCore/platform/mac/MIMETypeRegistryMac.mm 2016-03-15 00:39:59 UTC (rev 198178)
+++ trunk/Source/WebCore/platform/mac/MIMETypeRegistryMac.mm 2016-03-15 00:47:11 UTC (rev 198179)
@@ -1,76 +0,0 @@
-/*
- * Copyright (C) 2006 Apple Inc. All rights reserved.
- * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
- *
- * 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. ``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
- * 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"
-#include <wtf/Assertions.h>
-#include <wtf/MainThread.h>
-
-namespace WebCore
-{
-
-String MIMETypeRegistry::getMIMETypeForExtension(const String& extension)
-{
- ASSERT(isMainThread());
- return [[NSURLFileTypeMappings sharedMappings] MIMETypeForExtension:(NSString *)extension];
-}
-
-Vector<String> MIMETypeRegistry::getExtensionsForMIMEType(const String& type)
-{
- NSArray *stringsArray = [[NSURLFileTypeMappings sharedMappings] extensionsForMIMEType:(NSString *)type];
- Vector<String> stringsVector = Vector<String>();
- unsigned count = [stringsArray count];
- if (count > 0) {
- NSEnumerator* enumerator = [stringsArray objectEnumerator];
- NSString* string;
- while ((string = [enumerator nextObject]) != nil)
- stringsVector.append(string);
- }
- return stringsVector;
-}
-
-String MIMETypeRegistry::getPreferredExtensionForMIMEType(const String& type)
-{
- return [[NSURLFileTypeMappings sharedMappings] preferredExtensionForMIMEType:(NSString *)type];
-}
-
-bool MIMETypeRegistry::isApplicationPluginMIMEType(const String& MIMEType)
-{
-#if ENABLE(PDFKIT_PLUGIN)
- // FIXME: This should test if we're actually going to use PDFPlugin,
- // but we only know that in WebKit2 at the moment. This is not a problem
- // in practice because if we don't have PDFPlugin and we go to instantiate the
- // plugin, there won't exist an application plugin supporting these MIME types.
- if (isPDFOrPostScriptMIMEType(MIMEType))
- return true;
-#endif
-
- return false;
-}
-
-}