Changeset 91188 in webkit


Ignore:
Timestamp:
Jul 18, 2011 9:43:27 AM (13 years ago)
Author:
andersca@apple.com
Message:

Make using lowercase parameter names for AppleConnect be a plug-in quirk
https://bugs.webkit.org/show_bug.cgi?id=64638

Reviewed by Sam Weinig.

  • Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:

(WebKit::NetscapePluginModule::determineQuirks):
Set the WantsLowercaseParameterNames quirk for the AppleConnect plug-in.

  • Shared/Plugins/PluginQuirks.h:

Add WantsLowercaseParameterNames quirk.

  • WebProcess/Plugins/Netscape/NetscapePlugin.cpp:

(WebKit::NetscapePlugin::initialize):
If the plug-in has the WantsLowercaseParameterNames quirk, convert the parameter
names to lowercase.

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::createPlugin):
Remove the code that would convert the parameters here. Also remove the FIXME; plug-in quirks
aren't really the same thing as site-specific quirks.

Location:
trunk/Source/WebKit2
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r91183 r91188  
     12011-07-18  Anders Carlsson  <andersca@apple.com>
     2
     3        Make using lowercase parameter names for AppleConnect be a plug-in quirk
     4        https://bugs.webkit.org/show_bug.cgi?id=64638
     5
     6        Reviewed by Sam Weinig.
     7
     8        * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
     9        (WebKit::NetscapePluginModule::determineQuirks):
     10        Set the WantsLowercaseParameterNames quirk for the AppleConnect plug-in.
     11
     12        * Shared/Plugins/PluginQuirks.h:
     13        Add WantsLowercaseParameterNames quirk.
     14
     15        * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
     16        (WebKit::NetscapePlugin::initialize):
     17        If the plug-in has the WantsLowercaseParameterNames quirk, convert the parameter
     18        names to lowercase.
     19
     20        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
     21        (WebKit::WebFrameLoaderClient::createPlugin):
     22        Remove the code that would convert the parameters here. Also remove the FIXME; plug-in quirks
     23        aren't really the same thing as site-specific quirks.
     24
    1252011-07-15  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
    226
  • trunk/Source/WebKit2/Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm

    r88819 r91188  
    482482    }
    483483
     484    if (plugin.bundleIdentifier == "com.apple.ist.ds.appleconnect.webplugin") {
     485        // <rdar://problem/8440903>: AppleConnect has a bug where it does not
     486        // understand the parameter names specified in the <object> element that
     487        // embeds its plug-in.
     488        m_pluginQuirks.add(PluginQuirks::WantsLowercaseParameterNames);
     489
    484490#ifndef NP_NO_QUICKDRAW
    485     if (plugin.bundleIdentifier == "com.apple.ist.ds.appleconnect.webplugin") {
    486491        // The AppleConnect plug-in uses QuickDraw but doesn't paint or receive events
    487492        // so we'll allow it to be instantiated even though we don't support QuickDraw.
    488493        m_pluginQuirks.add(PluginQuirks::AllowHalfBakedQuickDrawSupport);
    489     }
    490 
     494#endif
     495    }
     496
     497#ifndef NP_NO_QUICKDRAW
    491498    if (plugin.bundleIdentifier == "com.microsoft.sharepoint.browserplugin") {
    492499        // The Microsoft SharePoint plug-in uses QuickDraw but doesn't paint or receive events
  • trunk/Source/WebKit2/Shared/Plugins/PluginQuirks.h

    r88735 r91188  
    6464        ReturnsNonRetainedScriptableNPObject,
    6565
     66        // Whether the plug-in wants parameter names to be lowercase.
     67        // <rdar://problem/8440903>: AppleConnect has a bug where it does not
     68        // understand the parameter names specified in the <object> element that
     69        // embeds its plug-in.
     70        WantsLowercaseParameterNames,
     71
    6672#ifndef NP_NO_QUICKDRAW
    6773        // Allow the plug-in to use the QuickDraw drawing model, since we know that the plug-in
  • trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp

    r90764 r91188  
    461461    Vector<CString> paramValues;
    462462    for (size_t i = 0; i < parameters.names.size(); ++i) {
    463         paramNames.append(parameters.names[i].utf8());
     463        String parameterName = parameters.names[i];
     464
     465#if PLUGIN_ARCHITECTURE(MAC)
     466        if (m_pluginModule->pluginQuirks().contains(PluginQuirks::WantsLowercaseParameterNames))
     467            parameterName = parameterName.lower();
     468#endif
     469
     470        paramNames.append(parameterName.utf8());
    464471        paramValues.append(parameters.values[i].utf8());
    465472    }
     
    473480    }
    474481
    475 #if PLATFORM(MAC)
     482#if PLUGIN_ARCHITECTURE(MAC)
    476483    if (m_pluginModule->pluginQuirks().contains(PluginQuirks::MakeTransparentIfBackgroundAttributeExists)) {
    477484        for (size_t i = 0; i < parameters.names.size(); ++i) {
  • trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp

    r91064 r91188  
    12601260    }
    12611261
    1262     // <rdar://problem/8440903>: AppleConnect has a bug where it does not
    1263     // understand the parameter names specified in the <object> element that
    1264     // embeds its plug-in. This hack works around the issue by converting the
    1265     // parameter names to lowercase before passing them to the plug-in.
    1266     // FIXME: This workaround should be dependent on site-specific quirks being
    1267     // enabled. This requires adding this setting to WebKit2's WebPreferences
    1268     // implementation. See <https://bugs.webkit.org/show_bug.cgi?id=46076>.
    1269     if (equalIgnoringCase(mimeType, "application/x-snkp")) {
    1270         for (size_t i = 0; i < paramNames.size(); ++i)
    1271             parameters.names[i] = paramNames[i].lower();
    1272     }
    1273 
    12741262#if PLUGIN_ARCHITECTURE(X11)
     1263    // FIXME: This should really be X11-specific plug-in quirks.
    12751264    if (equalIgnoringCase(mimeType, "application/x-shockwave-flash")) {
    12761265        // Currently we don't support transparency and windowed mode.
Note: See TracChangeset for help on using the changeset viewer.