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

Unified Diff: content/browser/renderer_host/input/synthetic_gesture_target_base.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/synthetic_gesture_target_base.cc
diff --git a/content/browser/renderer_host/input/synthetic_gesture_target_base.cc b/content/browser/renderer_host/input/synthetic_gesture_target_base.cc
index 883cb4e7a47d02d20eef7c9279b217b952267256..ee9dbb014c160f213f36d3b84e130a64483c2d69 100644
--- a/content/browser/renderer_host/input/synthetic_gesture_target_base.cc
+++ b/content/browser/renderer_host/input/synthetic_gesture_target_base.cc
@@ -65,14 +65,16 @@ void SyntheticGestureTargetBase::DispatchInputEventToPlatform(
} else if (event.type() == WebInputEvent::MouseWheel) {
const WebMouseWheelEvent& web_wheel =
static_cast<const WebMouseWheelEvent&>(event);
- CHECK(PointIsWithinContents(web_wheel.x, web_wheel.y))
+ CHECK(PointIsWithinContents(web_wheel.positionInWidget().x,
+ web_wheel.positionInWidget().y))
<< "Mouse wheel position is not within content bounds.";
DispatchWebMouseWheelEventToPlatform(web_wheel, latency_info);
} else if (WebInputEvent::isMouseEventType(event.type())) {
const WebMouseEvent& web_mouse =
static_cast<const WebMouseEvent&>(event);
CHECK(event.type() != WebInputEvent::MouseDown ||
- PointIsWithinContents(web_mouse.x, web_mouse.y))
+ PointIsWithinContents(web_mouse.positionInWidget().x,
+ web_mouse.positionInWidget().y))
<< "Mouse pointer is not within content bounds on MouseDown.";
DispatchWebMouseEventToPlatform(web_mouse, latency_info);
} else {

Powered by Google App Engine
This is Rietveld 408576698