Changeset 198179 in webkit
- Timestamp:
- Mar 14, 2016, 5:47:11 PM (9 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 1 added
- 2 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r198178 r198179 1 2016-03-14 Enrica Casucci <enrica@apple.com> 2 3 iOS: RTFD format is not available in the pasteboard after copy/cut. 4 https://bugs.webkit.org/show_bug.cgi?id=155477 5 rdar://problem/23500600 6 7 Reviewed by Tim Horton. 8 9 WebKit is using UTTypeRTFD instead of UTTypeFlatRTFD that is the 10 proper RTFD format for pastedboard. I also discovered that, when 11 we create the NSTextAttachment in the NSAttributedString we produce 12 from the DOM range, we are not generating a file name with the 13 appropriate extension for the MIME type. The iOS specific implementation 14 of the MIMETypeRegistry functions were empty. 15 There is no need to have a differentiation between OS X and iOS, so 16 we now have only one file called MIMETypeRegistryCocoa.mm. 17 18 * WebCore.xcodeproj/project.pbxproj: 19 * platform/cocoa/MIMETypeRegistryCocoa.mm: Added. 20 (WebCore::MIMETypeRegistry::getMIMETypeForExtension): 21 (WebCore::MIMETypeRegistry::getExtensionsForMIMEType): 22 (WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType): 23 (WebCore::MIMETypeRegistry::isApplicationPluginMIMEType): 24 * platform/ios/MIMETypeRegistryIOS.mm: Removed. 25 * platform/ios/PasteboardIOS.mm: 26 (WebCore::Pasteboard::read): 27 (WebCore::Pasteboard::supportedPasteboardTypes): 28 (WebCore::Pasteboard::hasData): 29 * platform/ios/PlatformPasteboardIOS.mm: 30 (WebCore::PlatformPasteboard::write): 31 * platform/mac/MIMETypeRegistryMac.mm: Removed. 32 1 33 2016-03-14 Daniel Bates <dabates@apple.com> 2 34 -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r198133 r198179 5630 5630 BC772C4E0C4EB3040083285F /* MIMETypeRegistry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC772C4C0C4EB3040083285F /* MIMETypeRegistry.cpp */; }; 5631 5631 BC772C4F0C4EB3040083285F /* MIMETypeRegistry.h in Headers */ = {isa = PBXBuildFile; fileRef = BC772C4D0C4EB3040083285F /* MIMETypeRegistry.h */; settings = {ATTRIBUTES = (Private, ); }; }; 5632 BC772C5E0C4EB3440083285F /* MIMETypeRegistryMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC772C5D0C4EB3440083285F /* MIMETypeRegistryMac.mm */; };5633 5632 BC772E131331620C001EC9CE /* CSSLineBoxContainValue.h in Headers */ = {isa = PBXBuildFile; fileRef = BC772E121331620C001EC9CE /* CSSLineBoxContainValue.h */; settings = {ATTRIBUTES = (Private, ); }; }; 5634 5633 BC772E16133162C2001EC9CE /* CSSLineBoxContainValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC772E15133162C2001EC9CE /* CSSLineBoxContainValue.cpp */; }; … … 5944 5943 C5227DF21C3C6DF900F5ED54 /* DataDetection.mm in Sources */ = {isa = PBXBuildFile; fileRef = C5227DF01C3C6DD700F5ED54 /* DataDetection.mm */; }; 5945 5944 C5278B0C17F212EA003A2998 /* PlatformPasteboardIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = C5278B0B17F212EA003A2998 /* PlatformPasteboardIOS.mm */; }; 5945 C53D39341C978A45007F3AE9 /* MIMETypeRegistryCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = C53D39331C97892D007F3AE9 /* MIMETypeRegistryCocoa.mm */; }; 5946 5946 C544274B11A57E7A0063A749 /* DOMStringList.h in Headers */ = {isa = PBXBuildFile; fileRef = C544274911A57E7A0063A749 /* DOMStringList.h */; settings = {ATTRIBUTES = (Private, ); }; }; 5947 5947 C55610F111A704EB00B82D27 /* DOMStringList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C55610F011A704EB00B82D27 /* DOMStringList.cpp */; }; … … 6621 6621 E45322AB140CE267005A0F92 /* SelectorQuery.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E45322A9140CE267005A0F92 /* SelectorQuery.cpp */; }; 6622 6622 E45322AC140CE267005A0F92 /* SelectorQuery.h in Headers */ = {isa = PBXBuildFile; fileRef = E45322AA140CE267005A0F92 /* SelectorQuery.h */; }; 6623 E453901D0EAFCACA003695C8 /* MIMETypeRegistryIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = E45390180EAFCACA003695C8 /* MIMETypeRegistryIOS.mm */; };6624 6623 E453901E0EAFCACA003695C8 /* PasteboardIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = E45390190EAFCACA003695C8 /* PasteboardIOS.mm */; }; 6625 6624 E45390430EAFD637003695C8 /* PlatformScreenIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = E45390320EAFD637003695C8 /* PlatformScreenIOS.mm */; }; … … 13547 13546 BC772C4C0C4EB3040083285F /* MIMETypeRegistry.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = MIMETypeRegistry.cpp; sourceTree = "<group>"; }; 13548 13547 BC772C4D0C4EB3040083285F /* MIMETypeRegistry.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MIMETypeRegistry.h; sourceTree = "<group>"; }; 13549 BC772C5D0C4EB3440083285F /* MIMETypeRegistryMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = MIMETypeRegistryMac.mm; sourceTree = "<group>"; };13550 13548 BC772E121331620C001EC9CE /* CSSLineBoxContainValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSLineBoxContainValue.h; sourceTree = "<group>"; }; 13551 13549 BC772E15133162C2001EC9CE /* CSSLineBoxContainValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CSSLineBoxContainValue.cpp; sourceTree = "<group>"; }; … … 13899 13897 C5227DF01C3C6DD700F5ED54 /* DataDetection.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DataDetection.mm; sourceTree = "<group>"; }; 13900 13898 C5278B0B17F212EA003A2998 /* PlatformPasteboardIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PlatformPasteboardIOS.mm; sourceTree = "<group>"; }; 13899 C53D39331C97892D007F3AE9 /* MIMETypeRegistryCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MIMETypeRegistryCocoa.mm; sourceTree = "<group>"; }; 13901 13900 C544274911A57E7A0063A749 /* DOMStringList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMStringList.h; sourceTree = "<group>"; }; 13902 13901 C544274A11A57E7A0063A749 /* DOMStringList.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DOMStringList.idl; sourceTree = "<group>"; }; … … 14663 14662 E45322A9140CE267005A0F92 /* SelectorQuery.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SelectorQuery.cpp; sourceTree = "<group>"; }; 14664 14663 E45322AA140CE267005A0F92 /* SelectorQuery.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SelectorQuery.h; sourceTree = "<group>"; }; 14665 E45390180EAFCACA003695C8 /* MIMETypeRegistryIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MIMETypeRegistryIOS.mm; sourceTree = "<group>"; };14666 14664 E45390190EAFCACA003695C8 /* PasteboardIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PasteboardIOS.mm; sourceTree = "<group>"; }; 14667 14665 E45390320EAFD637003695C8 /* PlatformScreenIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PlatformScreenIOS.mm; sourceTree = "<group>"; }; … … 17866 17864 06E81EEB0AB5DA9700C87837 /* LocalCurrentGraphicsContext.mm */, 17867 17865 1402645D0AFDC19B005919E2 /* LoggingMac.mm */, 17868 BC772C5D0C4EB3440083285F /* MIMETypeRegistryMac.mm */,17869 17866 93500F3113FDE3BE0099EC24 /* NSScrollerImpDetails.h */, 17870 17867 52F52E1014A0134F00ACC397 /* NSScrollerImpDetails.mm */, … … 19978 19975 E4E39AFA1330EFA8003AB274 /* LegacyTileLayerPool.h */, 19979 19976 E4E39AFC1330EFC5003AB274 /* LegacyTileLayerPool.mm */, 19980 E45390180EAFCACA003695C8 /* MIMETypeRegistryIOS.mm */,19981 19977 E45390190EAFCACA003695C8 /* PasteboardIOS.mm */, 19982 19978 26601EBD14B3B9AD0012C0FE /* PlatformEventFactoryIOS.h */, … … 20036 20032 1A0409DB1A4360B5009E47F3 /* MachSendRight.h */, 20037 20033 ADB6B29718FB90240081963E /* MemoryPressureHandlerCocoa.mm */, 20034 C53D39331C97892D007F3AE9 /* MIMETypeRegistryCocoa.mm */, 20038 20035 A19D93491AA11B1E00B46C24 /* NetworkExtensionContentFilter.h */, 20039 20036 A19D93481AA11B1E00B46C24 /* NetworkExtensionContentFilter.mm */, … … 29967 29964 9BC6C21C13CCC97B008E0337 /* HTMLTextFormControlElement.cpp in Sources */, 29968 29965 830519951BB0F11000F3772E /* HTMLTimeElement.cpp in Sources */, 29966 C53D39341C978A45007F3AE9 /* MIMETypeRegistryCocoa.mm in Sources */, 29969 29967 A871DC290A15205700B12A68 /* HTMLTitleElement.cpp in Sources */, 29970 29968 977B3877122883E900B81FF8 /* HTMLTokenizer.cpp in Sources */, … … 31003 31001 37DDCD9413844FD50008B793 /* MIMEHeader.cpp in Sources */, 31004 31002 BC772C4E0C4EB3040083285F /* MIMETypeRegistry.cpp in Sources */, 31005 E453901D0EAFCACA003695C8 /* MIMETypeRegistryIOS.mm in Sources */,31006 BC772C5E0C4EB3440083285F /* MIMETypeRegistryMac.mm in Sources */,31007 31003 52F10865162B6DA4009AC81E /* MixedContentChecker.cpp in Sources */, 31008 31004 CDF2B0101820540600F2B424 /* MockBox.cpp in Sources */, -
trunk/Source/WebCore/platform/ios/PasteboardIOS.mm
r198177 r198179 79 79 SOFT_LINK_CONSTANT(MobileCoreServices, kUTTagClassFilenameExtension, CFStringRef) 80 80 SOFT_LINK_CONSTANT(MobileCoreServices, kUTTypeHTML, CFStringRef) 81 SOFT_LINK_CONSTANT(MobileCoreServices, kUTType RTFD, CFStringRef)81 SOFT_LINK_CONSTANT(MobileCoreServices, kUTTypeFlatRTFD, CFStringRef) 82 82 SOFT_LINK_CONSTANT(MobileCoreServices, kUTTypeRTF, CFStringRef) 83 83 … … 91 91 #define kUTTagClassFilenameExtension getkUTTagClassFilenameExtension() 92 92 #define kUTTypeHTML getkUTTypeHTML() 93 #define kUTType RTFD getkUTTypeRTFD()93 #define kUTTypeFlatRTFD getkUTTypeFlatRTFD() 94 94 #define kUTTypeRTF getkUTTypeRTF() 95 95 … … 208 208 } 209 209 210 if ([type isEqualToString:(NSString *)kUTTypeRTFD]) {211 if (RefPtr<SharedBuffer> buffer = strategy.readBufferFromPasteboard(i, kUTType RTFD)) {210 if ([type isEqualToString:(NSString *)kUTTypeFlatRTFD]) { 211 if (RefPtr<SharedBuffer> buffer = strategy.readBufferFromPasteboard(i, kUTTypeFlatRTFD)) { 212 212 if (reader.readRTFD(*buffer)) 213 213 break; … … 247 247 NSArray* Pasteboard::supportedPasteboardTypes() 248 248 { 249 return @[(id)WebArchivePboardType, (id)kUTType RTFD, (id)kUTTypeRTF, (id)kUTTypeHTML, (id)kUTTypePNG, (id)kUTTypeTIFF, (id)kUTTypeJPEG, (id)kUTTypeGIF, (id)kUTTypeURL, (id)kUTTypeText];249 return @[(id)WebArchivePboardType, (id)kUTTypeFlatRTFD, (id)kUTTypeRTF, (id)kUTTypeHTML, (id)kUTTypePNG, (id)kUTTypeTIFF, (id)kUTTypeJPEG, (id)kUTTypeGIF, (id)kUTTypeURL, (id)kUTTypeText]; 250 250 } 251 251 -
trunk/Source/WebCore/platform/ios/PlatformPasteboardIOS.mm
r198177 r198179 57 57 SOFT_LINK_CONSTANT(MobileCoreServices, kUTTagClassMIMEType, CFStringRef) 58 58 SOFT_LINK_CONSTANT(MobileCoreServices, kUTTagClassFilenameExtension, CFStringRef) 59 SOFT_LINK_CONSTANT(MobileCoreServices, kUTType RTFD, CFStringRef)59 SOFT_LINK_CONSTANT(MobileCoreServices, kUTTypeFlatRTFD, CFStringRef) 60 60 SOFT_LINK_CONSTANT(MobileCoreServices, kUTTypeRTF, CFStringRef) 61 61 … … 68 68 #define kUTTagClassMIMEType getkUTTagClassMIMEType() 69 69 #define kUTTagClassFilenameExtension getkUTTagClassFilenameExtension() 70 #define kUTType RTFD getkUTTypeRTFD()70 #define kUTTypeFlatRTFD getkUTTypeFlatRTFD() 71 71 #define kUTTypeRTF getkUTTypeRTF() 72 72 … … 163 163 164 164 if (content.dataInRTFDFormat) 165 [representations setValue:content.dataInRTFDFormat->createNSData().get() forKey:(NSString *)kUTType RTFD];165 [representations setValue:content.dataInRTFDFormat->createNSData().get() forKey:(NSString *)kUTTypeFlatRTFD]; 166 166 if (content.dataInRTFFormat) 167 167 [representations setValue:content.dataInRTFFormat->createNSData().get() forKey:(NSString *)kUTTypeRTF];
Note:
See TracChangeset
for help on using the changeset viewer.