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

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 2805393004: Ignore double-displays of the context menu. (Closed)
Patch Set: Created 3 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 1e665328a2f9847dee7d56cf9b84206ab0031d0a..40e7c885245a4bbee0fa38a367970f8be9907fb5 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -4258,6 +4258,11 @@ void WebContentsImpl::RenderFrameDeleted(RenderFrameHost* render_frame_host) {
void WebContentsImpl::ShowContextMenu(RenderFrameHost* render_frame_host,
const ContextMenuParams& params) {
+ // If a renderer fires off a second command to show a context menu before the
+ // first context menu is closed, just ignore it. https://crbug.com/707534
+ if (GetRenderWidgetHostView()->IsShowingContextMenu())
+ return;
+
ContextMenuParams context_menu_params(params);
// Allow WebContentsDelegates to handle the context menu operation first.
if (delegate_ && delegate_->HandleContextMenu(context_menu_params))
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698