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

Unified Diff: content/common/input/synthetic_web_input_event_builders.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
« no previous file with comments | « content/common/input/input_param_traits_unittest.cc ('k') | content/public/test/browser_test_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/input/synthetic_web_input_event_builders.cc
diff --git a/content/common/input/synthetic_web_input_event_builders.cc b/content/common/input/synthetic_web_input_event_builders.cc
index cd8126838d737bbdfbe4cfde3c21a0c0b5243637..bf8c8668f9303b0dbc00a89038737f3da506ab59 100644
--- a/content/common/input/synthetic_web_input_event_builders.cc
+++ b/content/common/input/synthetic_web_input_event_builders.cc
@@ -35,8 +35,7 @@ WebMouseEvent SyntheticWebMouseEventBuilder::Build(
DCHECK(WebInputEvent::isMouseEventType(type));
WebMouseEvent result(type, modifiers,
ui::EventTimeStampToSeconds(ui::EventTimeForNow()));
- result.x = window_x;
- result.y = window_y;
+ result.setPositionInWidget(window_x, window_y);
result.setModifiers(modifiers);
result.pointerType = pointer_type;
result.id = ui::PointerEvent::kMousePointerId;
@@ -71,10 +70,8 @@ WebMouseWheelEvent SyntheticWebMouseWheelEventBuilder::Build(float x,
bool precise) {
WebMouseWheelEvent result(WebInputEvent::MouseWheel, modifiers,
ui::EventTimeStampToSeconds(ui::EventTimeForNow()));
- result.globalX = global_x;
- result.globalY = global_y;
- result.x = x;
- result.y = y;
+ result.setPositionInScreen(global_x, global_y);
+ result.setPositionInWidget(x, y);
result.deltaX = dx;
result.deltaY = dy;
if (dx)
« no previous file with comments | « content/common/input/input_param_traits_unittest.cc ('k') | content/public/test/browser_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698