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

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

Issue 2601001: Linux: for Flash, disable right clicks in windowless mode. (Closed)
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
diff --git a/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc b/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc
index e9830b4c505d6eacc6ed78b076f7aa7008e13d39..7eceb0dcbcaefea708b9632f8fbb401287aac19d 100644
--- a/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc
+++ b/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc
@@ -54,9 +54,13 @@ WebPluginDelegateImpl::WebPluginDelegateImpl(
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
@@ -680,6 +684,14 @@ bool WebPluginDelegateImpl::PlatformHandleInputEvent(
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