+2007-11-15 Antti Koivisto <antti@apple.com>
+
+ Reviewed by Adele.
+
+ Fix <rdar://problem/5601598>
+ The movie tag should do initialization on need and not during startup.
+
+ Initialize Movie MIME type hash on demand
+
+ * platform/MIMETypeRegistry.cpp:
+ (WebCore::initialiseSupportedMovieMIMETypes):
+ (WebCore::initialiseMIMETypeRegistry):
+ (WebCore::MIMETypeRegistry::isSupportedMovieMIMEType):
+ (WebCore::MIMETypeRegistry::getSupportedMovieMIMETypes):
+
2007-11-15 Mark Rowe <mrowe@apple.com>
Build fix for Qt on Windows.
static void initialiseSupportedMovieMIMETypes()
{
+ supportedMovieMIMETypes = new WTF::HashSet<String>();
#if ENABLE(VIDEO)
Movie::getSupportedTypes(*supportedMovieMIMETypes);
#endif
supportedImageResourceMIMETypes = new WTF::HashSet<String>();
supportedImageMIMETypes = new WTF::HashSet<String>();
supportedNonImageMIMETypes = new WTF::HashSet<String>();
- supportedMovieMIMETypes = new WTF::HashSet<String>();
initialiseSupportedNonImageMimeTypes();
initialiseSupportedImageMIMETypes();
- initialiseSupportedMovieMIMETypes();
}
String MIMETypeRegistry::getMIMETypeForPath(const String& path)
bool MIMETypeRegistry::isSupportedMovieMIMEType(const String& mimeType)
{
if (!supportedMovieMIMETypes)
- initialiseMIMETypeRegistry();
+ initialiseSupportedMovieMIMETypes();
return !mimeType.isEmpty() && supportedMovieMIMETypes->contains(mimeType);
}
HashSet<String> &MIMETypeRegistry::getSupportedMovieMIMETypes()
{
if (!supportedMovieMIMETypes)
- initialiseMIMETypeRegistry();
+ initialiseSupportedMovieMIMETypes();
return *supportedMovieMIMETypes;
}