Title: [91188] trunk/Source/WebKit2
- Revision
- 91188
- Author
- [email protected]
- Date
- 2011-07-18 09:43:27 -0700 (Mon, 18 Jul 2011)
Log 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.
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (91187 => 91188)
--- trunk/Source/WebKit2/ChangeLog 2011-07-18 16:16:17 UTC (rev 91187)
+++ trunk/Source/WebKit2/ChangeLog 2011-07-18 16:43:27 UTC (rev 91188)
@@ -1,3 +1,27 @@
+2011-07-18 Anders Carlsson <[email protected]>
+
+ 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.
+
2011-07-15 Jocelyn Turcotte <[email protected]>
[Qt] Consider QTouchWebPage's transform when scrolling the viewport.
Modified: trunk/Source/WebKit2/Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm (91187 => 91188)
--- trunk/Source/WebKit2/Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm 2011-07-18 16:16:17 UTC (rev 91187)
+++ trunk/Source/WebKit2/Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm 2011-07-18 16:43:27 UTC (rev 91188)
@@ -481,13 +481,20 @@
}
}
+ if (plugin.bundleIdentifier == "com.apple.ist.ds.appleconnect.webplugin") {
+ // <rdar://problem/8440903>: AppleConnect has a bug where it does not
+ // understand the parameter names specified in the <object> element that
+ // embeds its plug-in.
+ m_pluginQuirks.add(PluginQuirks::WantsLowercaseParameterNames);
+
#ifndef NP_NO_QUICKDRAW
- if (plugin.bundleIdentifier == "com.apple.ist.ds.appleconnect.webplugin") {
// The AppleConnect plug-in uses QuickDraw but doesn't paint or receive events
// so we'll allow it to be instantiated even though we don't support QuickDraw.
m_pluginQuirks.add(PluginQuirks::AllowHalfBakedQuickDrawSupport);
+#endif
}
+#ifndef NP_NO_QUICKDRAW
if (plugin.bundleIdentifier == "com.microsoft.sharepoint.browserplugin") {
// The Microsoft SharePoint plug-in uses QuickDraw but doesn't paint or receive events
// so we'll allow it to be instantiated even though we don't support QuickDraw.
Modified: trunk/Source/WebKit2/Shared/Plugins/PluginQuirks.h (91187 => 91188)
--- trunk/Source/WebKit2/Shared/Plugins/PluginQuirks.h 2011-07-18 16:16:17 UTC (rev 91187)
+++ trunk/Source/WebKit2/Shared/Plugins/PluginQuirks.h 2011-07-18 16:43:27 UTC (rev 91188)
@@ -63,6 +63,12 @@
// Versions of Silverlight prior to 4 never retained the returned NPObject.
ReturnsNonRetainedScriptableNPObject,
+ // Whether the plug-in wants parameter names to be lowercase.
+ // <rdar://problem/8440903>: AppleConnect has a bug where it does not
+ // understand the parameter names specified in the <object> element that
+ // embeds its plug-in.
+ WantsLowercaseParameterNames,
+
#ifndef NP_NO_QUICKDRAW
// Allow the plug-in to use the QuickDraw drawing model, since we know that the plug-in
// will never paint or receive events. Used by the AppleConnect plug-in.
Modified: trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp (91187 => 91188)
--- trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp 2011-07-18 16:16:17 UTC (rev 91187)
+++ trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp 2011-07-18 16:43:27 UTC (rev 91188)
@@ -460,7 +460,14 @@
Vector<CString> paramNames;
Vector<CString> paramValues;
for (size_t i = 0; i < parameters.names.size(); ++i) {
- paramNames.append(parameters.names[i].utf8());
+ String parameterName = parameters.names[i];
+
+#if PLUGIN_ARCHITECTURE(MAC)
+ if (m_pluginModule->pluginQuirks().contains(PluginQuirks::WantsLowercaseParameterNames))
+ parameterName = parameterName.lower();
+#endif
+
+ paramNames.append(parameterName.utf8());
paramValues.append(parameters.values[i].utf8());
}
@@ -472,7 +479,7 @@
values.append(paramValues[i].data());
}
-#if PLATFORM(MAC)
+#if PLUGIN_ARCHITECTURE(MAC)
if (m_pluginModule->pluginQuirks().contains(PluginQuirks::MakeTransparentIfBackgroundAttributeExists)) {
for (size_t i = 0; i < parameters.names.size(); ++i) {
if (equalIgnoringCase(parameters.names[i], "background")) {
Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp (91187 => 91188)
--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp 2011-07-18 16:16:17 UTC (rev 91187)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp 2011-07-18 16:43:27 UTC (rev 91188)
@@ -1259,19 +1259,8 @@
parameters.toplevelDocumentURL = mainFrame->document()->url().string();
}
- // <rdar://problem/8440903>: AppleConnect has a bug where it does not
- // understand the parameter names specified in the <object> element that
- // embeds its plug-in. This hack works around the issue by converting the
- // parameter names to lowercase before passing them to the plug-in.
- // FIXME: This workaround should be dependent on site-specific quirks being
- // enabled. This requires adding this setting to WebKit2's WebPreferences
- // implementation. See <https://bugs.webkit.org/show_bug.cgi?id=46076>.
- if (equalIgnoringCase(mimeType, "application/x-snkp")) {
- for (size_t i = 0; i < paramNames.size(); ++i)
- parameters.names[i] = paramNames[i].lower();
- }
-
#if PLUGIN_ARCHITECTURE(X11)
+ // FIXME: This should really be X11-specific plug-in quirks.
if (equalIgnoringCase(mimeType, "application/x-shockwave-flash")) {
// Currently we don't support transparency and windowed mode.
// Inject wmode=opaque to make Flash work in these conditions.
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes