Commit de98f7a4 authored by Yash Malik's avatar Yash Malik Committed by Commit Bot

VR: Fix injected hover events for web contents

Injecting HOVER_EXIT is done by the platform if the coordinates for the
HOVER_MOVE are out of bounds, so we don't need to inject it ourself.

Bug: 819348
Change-Id: I4486f9970fac031373215bdcb7021de6a422da02
Reviewed-on: https://chromium-review.googlesource.com/1014715Reviewed-by: default avatarMichael Thiessen <mthiesse@chromium.org>
Commit-Queue: Yash Malik <ymalik@chromium.org>
Cr-Commit-Position: refs/heads/master@{#551375}
parent 0172f467
......@@ -93,12 +93,11 @@ void AndroidUiGestureTarget::DispatchWebInputEvent(
Inject(content::MOTION_EVENT_ACTION_HOVER_ENTER, event_time_ms);
break;
case blink::WebMouseEvent::kMouseMove:
SetPointer(mouse->PositionInWidget().x, mouse->PositionInWidget().y);
Inject(content::MOTION_EVENT_ACTION_HOVER_MOVE, event_time_ms);
break;
case blink::WebMouseEvent::kMouseLeave:
// We don't need to inject MOTION_EVENT_ACTION_HOVER_EXIT as the platform
// will generate it for us if the pointer is out of bounds.
SetPointer(mouse->PositionInWidget().x, mouse->PositionInWidget().y);
Inject(content::MOTION_EVENT_ACTION_HOVER_EXIT, event_time_ms);
Inject(content::MOTION_EVENT_ACTION_HOVER_MOVE, event_time_ms);
break;
case blink::WebMouseEvent::kMouseDown:
// Mouse down events are translated into touch events on Android anyways,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment