Changeset 244247 in webkit
- Timestamp:
- Apr 14, 2019 1:14:19 PM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r244245 r244247 1 2019-04-14 Dean Jackson <dino@apple.com> 2 3 Extract UTI mapping and allow for additions 4 https://bugs.webkit.org/show_bug.cgi?id=196822 5 <rdar://problem/49822339> 6 7 Reviewed by Darin Adler 8 9 Post landing feedback on minimizing String constructors. 10 11 * platform/network/mac/UTIUtilities.mm: 12 (WebCore::MIMETypeFromUTITree): 13 (WebCore::UTIFromMIMETypeCachePolicy::createValueForKey): 14 1 15 2019-04-14 Don Olmstead <don.olmstead@sony.com> 2 16 -
trunk/Source/WebCore/platform/network/mac/UTIUtilities.mm
r244201 r244247 59 59 RetainPtr<CFDictionaryRef> decl = adoptCF(UTTypeCopyDeclaration(utiCF.get())); 60 60 if (!decl) 61 return String();61 return emptyString(); 62 62 CFTypeRef value = CFDictionaryGetValue(decl.get(), kUTTypeConformsToKey); 63 63 if (!value) 64 return String();64 return emptyString(); 65 65 CFTypeID typeID = CFGetTypeID(value); 66 66 … … 82 82 } 83 83 84 return String();84 return emptyString(); 85 85 } 86 86 … … 119 119 auto type = adoptCF(UTTypeCreatePreferredIdentifierForTag(kUTTagClassMIMEType, key.createCFString().get(), 0)); 120 120 if (type) 121 return String(type.get());121 return type.get(); 122 122 return UTIFromUnknownMIMEType(key); 123 123 }
Note: See TracChangeset
for help on using the changeset viewer.