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

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 comment in web_input_event_builders_mac.mm Created 3 years, 8 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 51c374503499c9f359ca8579fcb3cd791be005ad..625e8d371e5fe14b770404a1193e5dcdeed492c3 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