Skip to content
Permalink
Browse files
[GTK] The process freezes when you right click on windowless Flash
https://bugs.webkit.org/show_bug.cgi?id=69123

Reviewed by Xan Lopez.

Source/WebCore:

No new tests. I tried to create a layout test that exercised this
issue, but it appears that EventSender clicks do not trigger
it. This is covered by the manual tests containing Flash.

* plugins/PluginPackage.cpp:
(WebCore::PluginPackage::determineQuirks): Always activate the
windowless Flash quirk if on x86_64 and X11.
* plugins/gtk/PluginViewGtk.cpp:
(WebCore::PluginView::handleMouseEvent): Avoid sending right-click
events if we have the quirk.

Source/WebKit2:

Add a new plugin quirk for dealing with right-clicking on
windowless Flash on x86_64 machines. This already exists for
WebKit1.

* Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
(WebKit::NetscapePluginModule::determineQuirks): If the plugin is
Flash and we are on x86_64, then disable sending right-clicking
events while in windowless mode.
* Shared/Plugins/PluginQuirks.h: Add the new quirk.
* WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
(WebKit::NetscapePlugin::platformHandleMouseEvent): If the quirk
is active  don't send right click events.

Canonical link: https://commits.webkit.org/89224@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@100725 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
mrobinson committed Nov 18, 2011
1 parent 5da7bca commit 24d7412c71e9ab17a4c8bcaaf16358785ceb1cf0
@@ -1,3 +1,21 @@
2011-11-17 Martin Robinson <mrobinson@igalia.com>

[GTK] The process freezes when you right click on windowless Flash
https://bugs.webkit.org/show_bug.cgi?id=69123

Reviewed by Xan Lopez.

No new tests. I tried to create a layout test that exercised this
issue, but it appears that EventSender clicks do not trigger
it. This is covered by the manual tests containing Flash.

* plugins/PluginPackage.cpp:
(WebCore::PluginPackage::determineQuirks): Always activate the
windowless Flash quirk if on x86_64 and X11.
* plugins/gtk/PluginViewGtk.cpp:
(WebCore::PluginView::handleMouseEvent): Avoid sending right-click
events if we have the quirk.

2011-11-17 Peter Rybin <peter.rybin@gmail.com>

Web Inspector: clear fixme in generator script
@@ -207,11 +207,11 @@ void PluginPackage::determineQuirks(const String& mimeType)
#if PLATFORM(QT)
// Flash will crash on repeated calls to SetWindow in windowed mode
m_quirks.add(PluginQuirkDontCallSetWindowMoreThanOnce);
#endif

#if CPU(X86_64)
// 64-bit Flash freezes if right-click is sent in windowless mode
m_quirks.add(PluginQuirkIgnoreRightClickInWindowlessMode);
#endif
#endif

m_quirks.add(PluginQuirkRequiresDefaultScreenDepth);
@@ -409,6 +409,9 @@ void PluginView::handleMouseEvent(MouseEvent* event)
if (!m_isStarted || m_status != PluginStatusLoadedSuccessfully)
return;

if (event->button() == RightButton && m_plugin->quirks().contains(PluginQuirkIgnoreRightClickInWindowlessMode))
return;

if (event->type() == eventNames().mousedownEvent) {
if (Page* page = m_parentFrame->page())
page->focusController()->setActive(true);
@@ -1,3 +1,23 @@
2011-11-17 Martin Robinson <mrobinson@igalia.com>

[GTK] The process freezes when you right click on windowless Flash
https://bugs.webkit.org/show_bug.cgi?id=69123

Reviewed by Xan Lopez.

Add a new plugin quirk for dealing with right-clicking on
windowless Flash on x86_64 machines. This already exists for
WebKit1.

* Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
(WebKit::NetscapePluginModule::determineQuirks): If the plugin is
Flash and we are on x86_64, then disable sending right-clicking
events while in windowless mode.
* Shared/Plugins/PluginQuirks.h: Add the new quirk.
* WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
(WebKit::NetscapePlugin::platformHandleMouseEvent): If the quirk
is active don't send right click events.

2011-11-17 Igor Oliveira <igor.oliveira@openbossa.org>

[WK2] Fix TransformOperation serialization
@@ -172,6 +172,19 @@ bool NetscapePluginModule::getPluginInfo(const String& pluginPath, PluginModuleI

void NetscapePluginModule::determineQuirks()
{
#if CPU(X86_64)
PluginModuleInfo plugin;
if (!getPluginInfoForLoadedPlugin(plugin))
return;

Vector<MimeClassInfo> mimeTypes = plugin.info.mimes;
for (size_t i = 0; i < mimeTypes.size(); ++i) {
if (mimeTypes[i].type == "application/x-shockwave-flash") {
m_pluginQuirks.add(PluginQuirks::IgnoreRightClickInWindowlessMode);
break;
}
}
#endif
}

} // namespace WebKit
@@ -87,6 +87,10 @@ class PluginQuirks {
// NPN_GetValue even when it is a lie.
RequiresGTKToolKit,

// Some version 10 releases of Flash run under nspluginwrapper will completely
// freeze when sending right click events to them in windowed mode.
IgnoreRightClickInWindowlessMode,

// Windows specific quirks:
#elif PLUGIN_ARCHITECTURE(WIN)
// Whether NPN_UserAgent should always return a Mozilla user agent.
@@ -409,6 +409,11 @@ bool NetscapePlugin::platformHandleMouseEvent(const WebMouseEvent& event)
if (m_isWindowed)
return false;

if ((event.type() == WebEvent::MouseDown || event.type() == WebEvent::MouseUp)
&& event.button() == WebMouseEvent::RightButton
&& quirks().contains(PluginQuirks::IgnoreRightClickInWindowlessMode))
return false;

XEvent xEvent;
initializeXEvent(xEvent);

0 comments on commit 24d7412

Please sign in to comment.