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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 2785853002: Selection Action mode triggered like a context menu (Closed)
Patch Set: fix tests Created 3 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
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index bf90b0ae15404e326ea89b1e84085293b60788ed..c5f8f5c308afd05e9531bf93c99577201a6f0a70 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -4293,8 +4293,11 @@ void RenderFrameImpl::ShowContextMenu(const blink::WebContextMenuData& data) {
GetRenderWidget()->ConvertViewportToWindow(&position_in_window);
params.x = position_in_window.x;
params.y = position_in_window.y;
- params.source_type =
- GetRenderWidget()->input_handler().context_menu_source_type();
+ if (params.source_type == ui::MENU_SOURCE_NONE) {
+ params.source_type =
+ GetRenderWidget()->input_handler().context_menu_source_type();
boliu 2017/05/23 17:34:13 pass this into Builder, instead of having this bri
amaralp1 2017/05/24 08:30:34 I decided to remove the SelectAll plumbing from th
+ }
+
GetRenderWidget()->OnShowHostContextMenu(&params);
if (GetRenderWidget()->has_host_context_menu_location()) {
params.x = GetRenderWidget()->host_context_menu_location().x();

Powered by Google App Engine
This is Rietveld 408576698