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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 1586923002: [UseZoomForDSF] Guest view support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 bc43dc39a3be545f3d88307cc15e0e988d125049..9030b267c60a3960a91b3d6dd5ac5291c14eb7c8 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -2134,6 +2134,12 @@ int RenderFrameImpl::ShowContextMenu(ContextMenuClient* client,
const ContextMenuParams& params) {
DCHECK(client); // A null client means "internal" when we issue callbacks.
ContextMenuParams our_params(params);
+
+ blink::WebRect position_in_window(params.x, params.y, 0, 0);
+ GetRenderWidget()->convertViewportToWindow(&position_in_window);
+ our_params.x = position_in_window.x;
+ our_params.y = position_in_window.y;
+
our_params.custom_context.request_id = pending_context_menus_.Add(client);
Send(new FrameHostMsg_ContextMenu(routing_id_, our_params));
return our_params.custom_context.request_id;

Powered by Google App Engine
This is Rietveld 408576698