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

Unified Diff: content/browser/renderer_host/render_widget_host_view_aura.cc

Issue 1308553007: Convert MouseEvents from DIPS to Pixels before passing it to surfaces for hittesting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mac version Created 5 years, 3 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 | content/browser/renderer_host/render_widget_host_view_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_widget_host_view_aura.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index 2666b127ad2653a32978b6a40e4b7aa4e8646a0e..3c5c4e49be2697cd08106a7f4c616e5830aaa4a9 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -2167,8 +2167,13 @@ void RenderWidgetHostViewAura::OnMouseEvent(ui::MouseEvent* event) {
uint32_t RenderWidgetHostViewAura::SurfaceIdNamespaceAtPoint(
const gfx::Point& point,
gfx::Point* transformed_point) {
- cc::SurfaceId id =
- delegated_frame_host_->SurfaceIdAtPoint(point, transformed_point);
+ aura::WindowTreeHost* host = window_->GetHost();
+ gfx::Point point_in_pixels(point);
+ host->GetRootTransform().TransformPoint(&point_in_pixels);
sadrul 2015/09/11 17:48:10 Does this do the right thing when the display is r
+ cc::SurfaceId id = delegated_frame_host_->SurfaceIdAtPoint(point_in_pixels,
+ transformed_point);
+ host->GetInverseRootTransform().TransformPoint(transformed_point);
+
// It is possible that the renderer has not yet produced a surface, in which
// case we return our current namespace.
if (id.is_null())
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_view_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698