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

Unified Diff: content/renderer/pepper/renderer_ppapi_host_impl.cc

Issue 2082893003: Scale menu position back to viewport in pepper plugin (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adjust menu position in pepper plugin Created 4 years, 6 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 | « content/renderer/pepper/renderer_ppapi_host_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/pepper/renderer_ppapi_host_impl.cc
diff --git a/content/renderer/pepper/renderer_ppapi_host_impl.cc b/content/renderer/pepper/renderer_ppapi_host_impl.cc
index 8eea55b36fe65c36dbecf76a43da0347c1055201..178aa024dcb6279c883a9d61a61b6dd2b93d0922 100644
--- a/content/renderer/pepper/renderer_ppapi_host_impl.cc
+++ b/content/renderer/pepper/renderer_ppapi_host_impl.cc
@@ -213,8 +213,10 @@ gfx::Point RendererPpapiHostImpl::PluginPointToRenderFrame(
// dedicated window. So, do not offset the point.
return pt;
}
- return gfx::Point(pt.x() + plugin_instance->view_data().rect.point.x,
- pt.y() + plugin_instance->view_data().rect.point.y);
+ return gfx::Point((pt.x() + plugin_instance->view_data().rect.point.x) /
+ viewport_to_dip_scale_,
+ (pt.y() + plugin_instance->view_data().rect.point.y) /
+ viewport_to_dip_scale_);
}
IPC::PlatformFileForTransit RendererPpapiHostImpl::ShareHandleWithRemote(
« no previous file with comments | « content/renderer/pepper/renderer_ppapi_host_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698