Title: [100725] trunk/Source
Revision
100725
Author
[email protected]
Date
2011-11-17 22:09:25 -0800 (Thu, 17 Nov 2011)

Log Message

[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.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (100724 => 100725)


--- trunk/Source/WebCore/ChangeLog	2011-11-18 05:52:34 UTC (rev 100724)
+++ trunk/Source/WebCore/ChangeLog	2011-11-18 06:09:25 UTC (rev 100725)
@@ -1,3 +1,21 @@
+2011-11-17  Martin Robinson  <[email protected]>
+
+        [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  <[email protected]>
 
         Web Inspector: clear fixme in generator script

Modified: trunk/Source/WebCore/plugins/PluginPackage.cpp (100724 => 100725)


--- trunk/Source/WebCore/plugins/PluginPackage.cpp	2011-11-18 05:52:34 UTC (rev 100724)
+++ trunk/Source/WebCore/plugins/PluginPackage.cpp	2011-11-18 06:09:25 UTC (rev 100725)
@@ -207,12 +207,12 @@
 #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);
         m_quirks.add(PluginQuirkThrottleInvalidate);

Modified: trunk/Source/WebCore/plugins/gtk/PluginViewGtk.cpp (100724 => 100725)


--- trunk/Source/WebCore/plugins/gtk/PluginViewGtk.cpp	2011-11-18 05:52:34 UTC (rev 100724)
+++ trunk/Source/WebCore/plugins/gtk/PluginViewGtk.cpp	2011-11-18 06:09:25 UTC (rev 100725)
@@ -409,6 +409,9 @@
     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);

Modified: trunk/Source/WebKit2/ChangeLog (100724 => 100725)


--- trunk/Source/WebKit2/ChangeLog	2011-11-18 05:52:34 UTC (rev 100724)
+++ trunk/Source/WebKit2/ChangeLog	2011-11-18 06:09:25 UTC (rev 100725)
@@ -1,3 +1,23 @@
+2011-11-17  Martin Robinson  <[email protected]>
+
+        [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  <[email protected]>
 
         [WK2] Fix TransformOperation serialization

Modified: trunk/Source/WebKit2/Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp (100724 => 100725)


--- trunk/Source/WebKit2/Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp	2011-11-18 05:52:34 UTC (rev 100724)
+++ trunk/Source/WebKit2/Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp	2011-11-18 06:09:25 UTC (rev 100725)
@@ -172,6 +172,19 @@
 
 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

Modified: trunk/Source/WebKit2/Shared/Plugins/PluginQuirks.h (100724 => 100725)


--- trunk/Source/WebKit2/Shared/Plugins/PluginQuirks.h	2011-11-18 05:52:34 UTC (rev 100724)
+++ trunk/Source/WebKit2/Shared/Plugins/PluginQuirks.h	2011-11-18 06:09:25 UTC (rev 100725)
@@ -87,6 +87,10 @@
         // 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.

Modified: trunk/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp (100724 => 100725)


--- trunk/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp	2011-11-18 05:52:34 UTC (rev 100724)
+++ trunk/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp	2011-11-18 06:09:25 UTC (rev 100725)
@@ -409,6 +409,11 @@
     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);
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to