Title: [244247] trunk/Source/WebCore
- Revision
- 244247
- Author
- [email protected]
- Date
- 2019-04-14 13:14:19 -0700 (Sun, 14 Apr 2019)
Log Message
Extract UTI mapping and allow for additions
https://bugs.webkit.org/show_bug.cgi?id=196822
<rdar://problem/49822339>
Reviewed by Darin Adler
Post landing feedback on minimizing String constructors.
* platform/network/mac/UTIUtilities.mm:
(WebCore::MIMETypeFromUTITree):
(WebCore::UTIFromMIMETypeCachePolicy::createValueForKey):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (244246 => 244247)
--- trunk/Source/WebCore/ChangeLog 2019-04-14 16:08:23 UTC (rev 244246)
+++ trunk/Source/WebCore/ChangeLog 2019-04-14 20:14:19 UTC (rev 244247)
@@ -1,3 +1,17 @@
+2019-04-14 Dean Jackson <[email protected]>
+
+ Extract UTI mapping and allow for additions
+ https://bugs.webkit.org/show_bug.cgi?id=196822
+ <rdar://problem/49822339>
+
+ Reviewed by Darin Adler
+
+ Post landing feedback on minimizing String constructors.
+
+ * platform/network/mac/UTIUtilities.mm:
+ (WebCore::MIMETypeFromUTITree):
+ (WebCore::UTIFromMIMETypeCachePolicy::createValueForKey):
+
2019-04-14 Don Olmstead <[email protected]>
[CMake] _javascript_Core derived sources should only be referenced inside _javascript_Core
Modified: trunk/Source/WebCore/platform/network/mac/UTIUtilities.mm (244246 => 244247)
--- trunk/Source/WebCore/platform/network/mac/UTIUtilities.mm 2019-04-14 16:08:23 UTC (rev 244246)
+++ trunk/Source/WebCore/platform/network/mac/UTIUtilities.mm 2019-04-14 20:14:19 UTC (rev 244247)
@@ -58,10 +58,10 @@
// If not, walk the ancestory of this UTI via its "ConformsTo" tags and return the first MIME type we find.
RetainPtr<CFDictionaryRef> decl = adoptCF(UTTypeCopyDeclaration(utiCF.get()));
if (!decl)
- return String();
+ return emptyString();
CFTypeRef value = CFDictionaryGetValue(decl.get(), kUTTypeConformsToKey);
if (!value)
- return String();
+ return emptyString();
CFTypeID typeID = CFGetTypeID(value);
if (typeID == CFStringGetTypeID())
@@ -81,7 +81,7 @@
}
}
- return String();
+ return emptyString();
}
static String UTIFromUnknownMIMEType(const String& mimeType)
@@ -118,7 +118,7 @@
{
auto type = adoptCF(UTTypeCreatePreferredIdentifierForTag(kUTTagClassMIMEType, key.createCFString().get(), 0));
if (type)
- return String(type.get());
+ return type.get();
return UTIFromUnknownMIMEType(key);
}
};
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes