Changeset 263880 in webkit
- Timestamp:
- Jul 2, 2020, 8:19:55 PM (6 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
platform/cocoa/MIMETypeRegistryCocoa.mm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r263878 r263880 1 2020-07-02 Said Abou-Hallawa <sabouhallawa@apple.com> 2 3 MIMETypeRegistry::getExtensionsForMIMEType() needs to handle wildcard MIME types 4 https://bugs.webkit.org/show_bug.cgi?id=213826 5 6 Reviewed by Darin Adler. 7 8 Addressing post commit review comments for r263832. 9 10 * platform/cocoa/MIMETypeRegistryCocoa.mm: 11 (WebCore::extensionsForMIMETypeMap): 12 1 13 2020-07-02 Brady Eidson <beidson@apple.com> 2 14 -
trunk/Source/WebCore/platform/cocoa/MIMETypeRegistryCocoa.mm
r263832 r263880 47 47 48 48 ASSERT(pos != notFound); 49 auto wildcardMIMEType = makeString( type.left(pos), "/*"_s);49 auto wildcardMIMEType = makeString(StringView(type).left(pos), "/*"_s); 50 50 51 51 for (NSString *extension in extensions) { 52 if (!extension)53 continue;54 55 52 // Add extension to wildcardMIMEType, for example add "png" to "image/*" 56 53 addExtension(wildcardMIMEType, extension); … … 60 57 }; 61 58 62 auto allUTIs = adopt NS((__bridge NSArray<NSString *> *)_UTCopyDeclaredTypeIdentifiers());59 auto allUTIs = adoptCF(_UTCopyDeclaredTypeIdentifiers()); 63 60 64 for (NSString *uti in allUTIs.get()) {61 for (NSString *uti in (__bridge NSArray<NSString *> *)allUTIs.get()) { 65 62 auto type = adoptCF(UTTypeCopyPreferredTagWithClass((__bridge CFStringRef)uti, kUTTagClassMIMEType)); 66 63 if (!type)
Note:
See TracChangeset
for help on using the changeset viewer.