Chromium Code Reviews| Index: content/browser/renderer_host/render_widget_host_view_aura.cc |
| diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc |
| index e93fd494ddc7155ee6e7dff1db0adbc5df502567..a9250285184169b0462a5f87cf20421b33980960 100644 |
| --- a/content/browser/renderer_host/render_widget_host_view_aura.cc |
| +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc |
| @@ -1875,7 +1875,7 @@ void RenderWidgetHostViewAura::OnMouseEvent(ui::MouseEvent* event) { |
| } |
| } |
| - ModifyEventMovementAndCoords(&mouse_event); |
| + ModifyEventMovementAndCoords(&mouse_event, event); |
| bool should_not_forward = is_move_to_center_event && synthetic_move_sent_; |
| if (should_not_forward) { |
| @@ -1954,7 +1954,7 @@ void RenderWidgetHostViewAura::OnMouseEvent(ui::MouseEvent* event) { |
| blink::WebMouseEvent mouse_event = ui::MakeWebMouseEvent( |
| *event, base::Bind(&GetScreenLocationFromEvent)); |
| - ModifyEventMovementAndCoords(&mouse_event); |
| + ModifyEventMovementAndCoords(&mouse_event, event); |
| if (ShouldRouteEvent(event)) { |
| host_->delegate()->GetInputEventRouter()->RouteMouseEvent( |
| this, &mouse_event, *event->latency()); |
| @@ -2500,12 +2500,14 @@ void RenderWidgetHostViewAura::FinishImeCompositionSession() { |
| } |
| void RenderWidgetHostViewAura::ModifyEventMovementAndCoords( |
| - blink::WebMouseEvent* event) { |
| + blink::WebMouseEvent* event, |
| + ui::MouseEvent* ui_mouse_event) { |
|
sky
2016/10/06 16:33:36
Make this take a const&, in fact can both args be
ananta
2016/10/06 21:15:18
Changed ui_mouse_event to be a const ref. The othe
|
| // If the mouse has just entered, we must report zero movementX/Y. Hence we |
| // reset any global_mouse_position set previously. |
| - if (event->type == blink::WebInputEvent::MouseEnter || |
| - event->type == blink::WebInputEvent::MouseLeave) |
| - global_mouse_position_.SetPoint(event->globalX, event->globalY); |
| + if (ui_mouse_event->type() == ui::ET_MOUSE_ENTERED || |
| + ui_mouse_event->type() == ui::ET_MOUSE_EXITED) { |
| + global_mouse_position_.SetPoint(event->globalX, event->globalY); |
|
sky
2016/10/04 18:17:55
This is the first I've seen of ModifyEventMovement
ananta
2016/10/04 19:44:52
The global_mouse_position technically can be possi
|
| + } |
| // Movement is computed by taking the difference of the new cursor position |
| // and the previous. Under mouse lock the cursor will be warped back to the |