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

Unified Diff: content/browser/devtools/protocol/input_handler.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/devtools/protocol/input_handler.cc
diff --git a/content/browser/devtools/protocol/input_handler.cc b/content/browser/devtools/protocol/input_handler.cc
index feb6a1286de646ec3990a935e888c0fc23ef8460..7a3abf182b9f791b1f0f63689af74afaf68a1439 100644
--- a/content/browser/devtools/protocol/input_handler.cc
+++ b/content/browser/devtools/protocol/input_handler.cc
@@ -362,10 +362,8 @@ void InputHandler::DispatchMouseEvent(
GetEventTimestamp(std::move(timestamp)));
event.button = event_button;
- event.x = x * page_scale_factor_;
- event.y = y * page_scale_factor_;
- event.globalX = x * page_scale_factor_;
- event.globalY = y * page_scale_factor_;
+ event.setPositionInWidget(x * page_scale_factor_, y * page_scale_factor_);
+ event.setPositionInScreen(x * page_scale_factor_, y * page_scale_factor_);
event.clickCount = click_count.fromMaybe(0);
event.pointerType = blink::WebPointerProperties::PointerType::Mouse;
@@ -440,11 +438,9 @@ Response InputHandler::EmulateTouchFromMouseEvent(const std::string& type,
event.reset(mouse_event);
}
- mouse_event->x = x;
- mouse_event->y = y;
+ mouse_event->setPositionInWidget(x, y);
mouse_event->button = event_button;
- mouse_event->globalX = x;
- mouse_event->globalY = y;
+ mouse_event->setPositionInScreen(x, y);
mouse_event->clickCount = click_count.fromMaybe(0);
mouse_event->pointerType = blink::WebPointerProperties::PointerType::Touch;
« no previous file with comments | « content/browser/devtools/protocol/color_picker.cc ('k') | content/browser/frame_host/render_widget_host_view_guest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698