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

Unified Diff: ui/events/blink/web_input_event_traits.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: ui/events/blink/web_input_event_traits.cc
diff --git a/ui/events/blink/web_input_event_traits.cc b/ui/events/blink/web_input_event_traits.cc
index 5a76a3334c8075bb4afcb340e4879c50ae58edf5..8d905a470b75c166eb08e1b17170b9b8f6414a0c 100644
--- a/ui/events/blink/web_input_event_traits.cc
+++ b/ui/events/blink/web_input_event_traits.cc
@@ -37,10 +37,11 @@ void ApppendEventDetails(const WebKeyboardEvent& event, std::string* result) {
void ApppendEventDetails(const WebMouseEvent& event, std::string* result) {
StringAppendF(result,
- "{\n Button: %d\n Pos: (%d, %d)\n"
- " GlobalPos: (%d, %d)\n Movement: (%d, %d)\n Clicks: %d\n}",
- static_cast<int>(event.button), event.x, event.y, event.globalX,
- event.globalY, event.movementX, event.movementY,
+ "{\n Button: %d\n Pos: (%f, %f)\n"
+ " GlobalPos: (%f, %f)\n Movement: (%d, %d)\n Clicks: %d\n}",
+ static_cast<int>(event.button), event.positionInWidget().x,
+ event.positionInWidget().y, event.positionInScreen().x,
+ event.positionInScreen().y, event.movementX, event.movementY,
event.clickCount);
}
« no previous file with comments | « ui/events/blink/web_input_event_builders_win_unittest.cc ('k') | ui/events/blink/web_input_event_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698