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

Unified Diff: content/browser/renderer_host/input/render_widget_host_latency_tracker.cc

Issue 2782893002: WebMouseEvent coordinates are now fractional & private (Closed)
Patch Set: Rebased + fixed a Mac crack. Created 3 years, 9 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/browser/renderer_host/input/render_widget_host_latency_tracker.cc
diff --git a/content/browser/renderer_host/input/render_widget_host_latency_tracker.cc b/content/browser/renderer_host/input/render_widget_host_latency_tracker.cc
index 8ebace902992f25699280254bcd8b17cf708a4a8..740165f866be4831ff68473080b0e1b758bc5b8d 100644
--- a/content/browser/renderer_host/input/render_widget_host_latency_tracker.cc
+++ b/content/browser/renderer_host/input/render_widget_host_latency_tracker.cc
@@ -47,15 +47,17 @@ void UpdateLatencyCoordinatesImpl(const WebGestureEvent& gesture,
void UpdateLatencyCoordinatesImpl(const WebMouseEvent& mouse,
LatencyInfo* latency,
float device_scale_factor) {
- latency->AddInputCoordinate(gfx::PointF(mouse.x * device_scale_factor,
- mouse.y * device_scale_factor));
+ latency->AddInputCoordinate(
+ gfx::PointF(mouse.positionInWidget().x * device_scale_factor,
+ mouse.positionInWidget().y * device_scale_factor));
}
void UpdateLatencyCoordinatesImpl(const WebMouseWheelEvent& wheel,
LatencyInfo* latency,
float device_scale_factor) {
- latency->AddInputCoordinate(gfx::PointF(wheel.x * device_scale_factor,
- wheel.y * device_scale_factor));
+ latency->AddInputCoordinate(
+ gfx::PointF(wheel.positionInWidget().x * device_scale_factor,
+ wheel.positionInWidget().y * device_scale_factor));
}
void UpdateLatencyCoordinates(const WebInputEvent& event,

Powered by Google App Engine
This is Rietveld 408576698