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

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 Mac crack. Created 3 years, 9 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 65667d802e9c5b95d49c9b08054c0563bd49f3d0..2ef41b3cdfa940a58b9e37d75134d29e1dec11bb 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