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

Unified Diff: content/browser/renderer_host/input/web_input_event_builders_android.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/web_input_event_builders_android.cc
diff --git a/content/browser/renderer_host/input/web_input_event_builders_android.cc b/content/browser/renderer_host/input/web_input_event_builders_android.cc
index bd6fff7a43958a13151cbd143fb231327b92c5e3..237fb64a210fae5533b0b620898b8c490239fa9d 100644
--- a/content/browser/renderer_host/input/web_input_event_builders_android.cc
+++ b/content/browser/renderer_host/input/web_input_event_builders_android.cc
@@ -127,8 +127,7 @@ WebMouseEvent WebMouseEventBuilder::Build(WebInputEvent::Type type,
WebMouseEvent result(type, ui::EventFlagsToWebEventModifiers(modifiers),
time_sec);
- result.x = window_x;
- result.y = window_y;
+ result.setPositionInWidget(window_x, window_y);
result.clickCount = click_count;
int button = action_button;
@@ -160,8 +159,7 @@ WebMouseWheelEvent WebMouseWheelEventBuilder::Build(float ticks_x,
int window_y) {
WebMouseWheelEvent result(WebInputEvent::MouseWheel,
WebInputEvent::NoModifiers, time_sec);
- result.x = window_x;
- result.y = window_y;
+ result.setPositionInWidget(window_x, window_y);
result.button = WebMouseEvent::Button::NoButton;
result.hasPreciseScrollingDeltas = true;
result.deltaX = ticks_x * tick_multiplier;

Powered by Google App Engine
This is Rietveld 408576698