Changeset 71006 in webkit


Ignore:
Timestamp:
Oct 31, 2010 7:48:41 PM (13 years ago)
Author:
robert@webkit.org
Message:

2010-10-31 Robert Hogan <robert@webkit.org>

Reviewed by Antonio Gomes.

[Qt] [Gtk] Plug-ins having upper case in mime type are failing to load

Qt and Gtk are case-sensitive when storing the declared mime-type
of plugins. Since plugin mime-types are lowercased prior to searching
for them in the plugin database, ensure they are loaded with the
mime-type in lower case too.

https://bugs.webkit.org/show_bug.cgi?id=36815

  • plugins/gtk/PluginPackageGtk.cpp: (WebCore::PluginPackage::fetchInfo):
  • plugins/qt/PluginPackageQt.cpp: (WebCore::PluginPackage::setMIMEDescription):

2010-10-31 Robert Hogan <robert@webkit.org>

Reviewed by Antonio Gomes.

[Qt] [Gtk] Plug-ins having upper case in mime type are failing to load

Qt and Gtk are case-sensitive when storing the declared mime-type
of plugins. Since plugin mime-types are lowercased prior to searching
for them in the plugin database, ensure they are loaded with the
mime-type in lower case too.

Change the test netscape plugin to declare its mimetype in sentence
case so that the correct behaviour is enforced.

https://bugs.webkit.org/show_bug.cgi?id=36815

  • DumpRenderTree/unix/TestNetscapePlugin/TestNetscapePlugin.cpp: (NP_GetMIMEDescription):
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r71004 r71006  
     12010-10-31  Robert Hogan  <robert@webkit.org>
     2
     3        Reviewed by Antonio Gomes.
     4
     5        [Qt] [Gtk] Plug-ins having upper case in mime type are failing to load
     6
     7        Qt and Gtk are case-sensitive when storing the declared mime-type
     8        of plugins. Since plugin mime-types are lowercased prior to searching
     9        for them in the plugin database, ensure they are loaded with the
     10        mime-type in lower case too.
     11
     12        https://bugs.webkit.org/show_bug.cgi?id=36815
     13
     14        * plugins/gtk/PluginPackageGtk.cpp:
     15        (WebCore::PluginPackage::fetchInfo):
     16        * plugins/qt/PluginPackageQt.cpp:
     17        (WebCore::PluginPackage::setMIMEDescription):
     18
    1192010-10-31  Robert Hogan  <robert@webkit.org>
    220
  • trunk/WebCore/plugins/gtk/PluginPackageGtk.cpp

    r66138 r71006  
    7575    gchar** mimeDescs = g_strsplit(types, ";", -1);
    7676    for (int i = 0; mimeDescs[i] && mimeDescs[i][0]; i++) {
    77         gchar** mimeData = g_strsplit(mimeDescs[i], ":", 3);
     77        gchar** mimeData = g_strsplit(g_strdown(mimeDescs[i]), ":", 3);
    7878        if (g_strv_length(mimeData) < 3) {
    7979            g_strfreev(mimeData);
  • trunk/WebCore/plugins/qt/PluginPackageQt.cpp

    r66297 r71006  
    7070void PluginPackage::setMIMEDescription(const String& mimeDescription)
    7171{
    72     m_fullMIMEDescription = mimeDescription;
     72    m_fullMIMEDescription = mimeDescription.lower();
    7373
    7474    Vector<String> types;
    75     mimeDescription.split(UChar(';'), false, types);
     75    mimeDescription.lower().split(UChar(';'), false, types);
    7676    for (unsigned i = 0; i < types.size(); ++i) {
    7777        Vector<String> mime;
  • trunk/WebKitTools/ChangeLog

    r71004 r71006  
     12010-10-31  Robert Hogan  <robert@webkit.org>
     2
     3        Reviewed by Antonio Gomes.
     4
     5        [Qt] [Gtk] Plug-ins having upper case in mime type are failing to load
     6
     7        Qt and Gtk are case-sensitive when storing the declared mime-type
     8        of plugins. Since plugin mime-types are lowercased prior to searching
     9        for them in the plugin database, ensure they are loaded with the
     10        mime-type in lower case too.
     11
     12        Change the test netscape plugin to declare its mimetype in sentence
     13        case so that the correct behaviour is enforced.
     14
     15        https://bugs.webkit.org/show_bug.cgi?id=36815
     16
     17        * DumpRenderTree/unix/TestNetscapePlugin/TestNetscapePlugin.cpp:
     18        (NP_GetMIMEDescription):
     19
    1202010-10-31  Robert Hogan  <robert@webkit.org>
    221
  • trunk/WebKitTools/DumpRenderTree/unix/TestNetscapePlugin/TestNetscapePlugin.cpp

    r70662 r71006  
    373373NP_GetMIMEDescription(void)
    374374{
    375     return const_cast<char*>("application/x-webkit-test-netscape:testnetscape:test netscape content");
     375    // We sentence-case the mime-type here to ensure that ports are not
     376    // case-sensitive when loading plugins. See https://webkit.org/b/36815
     377    return const_cast<char*>("application/x-Webkit-Test-Netscape:testnetscape:test netscape content");
    376378}
    377379
Note: See TracChangeset for help on using the changeset viewer.