Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1283)

Unified Diff: webkit/glue/plugins/webplugin_delegate_impl_gtk.cc

Issue 2695001: Merge 48854 to 375 - Linux: for Flash, disable right clicks in windowless mod... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/375/src/
Patch Set: Created 10 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/glue/plugins/webplugin_delegate_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/plugins/webplugin_delegate_impl_gtk.cc
===================================================================
--- webkit/glue/plugins/webplugin_delegate_impl_gtk.cc (revision 48979)
+++ webkit/glue/plugins/webplugin_delegate_impl_gtk.cc (working copy)
@@ -55,9 +55,13 @@
memset(&window_, 0, sizeof(window_));
if (instance_->mime_type() == "application/x-shockwave-flash") {
// Flash is tied to Firefox's whacky behavior with windowless plugins. See
- // comments in WindowlessPaint
+ // comments in WindowlessPaint.
+ // TODO(viettrungluu): PLUGIN_QUIRK_WINDOWLESS_NO_RIGHT_CLICK: Don't allow
+ // right-clicks in windowless content since Flash 10.1 (initial release, at
+ // least) hangs in that case. Remove this once Flash is fixed.
quirks_ |= PLUGIN_QUIRK_WINDOWLESS_OFFSET_WINDOW_TO_DRAW
- | PLUGIN_QUIRK_WINDOWLESS_INVALIDATE_AFTER_SET_WINDOW;
+ | PLUGIN_QUIRK_WINDOWLESS_INVALIDATE_AFTER_SET_WINDOW
+ | PLUGIN_QUIRK_WINDOWLESS_NO_RIGHT_CLICK;
}
// TODO(evanm): I played with this for quite a while but couldn't
@@ -696,6 +700,14 @@
if (!NPEventFromWebInputEvent(event, timestamp, &np_event)) {
return false;
}
+ // See comment about PLUGIN_QUIRK_WINDOWLESS_NO_RIGHT_CLICK in constructor.
+ if (windowless_ &&
+ (quirks_ & PLUGIN_QUIRK_WINDOWLESS_NO_RIGHT_CLICK) &&
+ (np_event.type == ButtonPress || np_event.type == ButtonRelease) &&
+ (np_event.xbutton.button == Button3)) {
+ return false;
+ }
+
bool ret = instance()->NPP_HandleEvent(&np_event) != 0;
// Flash always returns false, even when the event is handled.
« no previous file with comments | « webkit/glue/plugins/webplugin_delegate_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698