Skip to content
Permalink
Browse files
2011-04-12 Anders Carlsson <andersca@apple.com>
        Reviewed by Sam Weinig.

        Cisco Meeting Center will not download or launch from Safari
        https://bugs.webkit.org/show_bug.cgi?id=58366
        <rdar://problem/8987139>

        It's OK if a plug-in has less (or more) MIME type descriptions than actual MIME types.

        * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
        (WebKit::getPluginInfoFromCarbonResources):


Canonical link: https://commits.webkit.org/73385@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@83625 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Anders Carlsson committed Apr 12, 2011
1 parent a69ea46 commit d083485c33248a88400f21c72561cafccddd6493
Showing 2 changed files with 16 additions and 6 deletions.
@@ -1,3 +1,16 @@
2011-04-12 Anders Carlsson <andersca@apple.com>

Reviewed by Sam Weinig.

Cisco Meeting Center will not download or launch from Safari
https://bugs.webkit.org/show_bug.cgi?id=58366
<rdar://problem/8987139>

It's OK if a plug-in has less (or more) MIME type descriptions than actual MIME types.

* Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
(WebKit::getPluginInfoFromCarbonResources):

2011-04-12 Anders Carlsson <andersca@apple.com>

Reviewed by Sam Weinig.
@@ -273,22 +273,19 @@ static bool getPluginInfoFromCarbonResources(CFBundleRef bundle, PluginInfo& plu
if (mimeTypesAndExtensions.size() % 2)
return false;

size_t numMimeTypes = mimeTypesAndExtensions.size() / 2;

// Now get the MIME type descriptions string list. This string list needs to be the same length as the number of MIME types.
Vector<String> mimeTypeDescriptions;
if (!getStringListResource(MIMEDescriptionStringNumber, mimeTypeDescriptions))
return false;

if (mimeTypeDescriptions.size() != numMimeTypes)
return false;

// Add all MIME types.
for (size_t i = 0; i < mimeTypesAndExtensions.size() / 2; ++i) {
MimeClassInfo mimeClassInfo;

const String& mimeType = mimeTypesAndExtensions[i * 2];
const String& description = mimeTypeDescriptions[i];
String description;
if (i < mimeTypeDescriptions.size())
description = mimeTypeDescriptions[i];

mimeClassInfo.type = mimeType.lower();
mimeClassInfo.desc = description;

0 comments on commit d083485

Please sign in to comment.