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

Issue 2386103004: Ensure that we don't report huge mouse movement deltas for mouse enter and leave events. (Closed)

Created:
4 years, 2 months ago by ananta
Modified:
4 years, 2 months ago
Reviewers:
scheib, jam, sky
CC:
chromium-reviews, yusukes+watch_chromium.org, shuchen+watch_chromium.org, jam, sievers+watch_chromium.org, jbauman+watch_chromium.org, nona+watch_chromium.org, darin-cc_chromium.org, piman+watch_chromium.org, kalyank, danakj+watch_chromium.org, James Su
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Ensure that we don't report huge mouse movement deltas for mouse enter and leave events. The movement deltas are supposed to be fixed by the RWHVA::ModifyEventMovementAndCoords function. However this function does not do the right thing because it checks the WebMouseEvent structure for a mouse enter or leave event. The WebMouseEvent structure never sees a mouse enter or leave event as they are converted to a mouse move event with the cursor position as the location. Fixes as below:- 1. Pass the ui::MouseEvent structure to the RWHVA::ModifyEventMovementAndCoords function and use this to check if the mouse event is a mouse enter or leave. BUG=650787 TBR=jam Committed: https://crrev.com/116116ab28e3d6f1c9320f921e77e084426588ca Cr-Commit-Position: refs/heads/master@{#423977}

Patch Set 1 #

Patch Set 2 : Update comment #

Total comments: 2

Patch Set 3 : Don't update the location for mouse move events originating from the mouse enter and leave events. #

Total comments: 6

Patch Set 4 : Make args const reference. #

Patch Set 5 : Make args const reference. #

Total comments: 2

Patch Set 6 : Address sky review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -6 lines) Patch
M content/browser/renderer_host/render_widget_host_view_aura.h View 1 2 3 4 5 1 chunk +4 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura.cc View 1 2 3 4 5 3 chunks +7 lines, -5 lines 0 comments Download

Messages

Total messages: 49 (25 generated)
ananta
4 years, 2 months ago (2016-10-03 23:16:55 UTC) #2
ananta
4 years, 2 months ago (2016-10-03 23:47:07 UTC) #6
jam
+sky would be a better reviewer than me. I can rs after
4 years, 2 months ago (2016-10-04 00:36:25 UTC) #8
scheib
Logic fix seems to look good to me, though I have a question about the ...
4 years, 2 months ago (2016-10-04 02:01:34 UTC) #11
ananta
https://codereview.chromium.org/2386103004/diff/20001/content/browser/renderer_host/render_widget_host_view_aura.cc File content/browser/renderer_host/render_widget_host_view_aura.cc (right): https://codereview.chromium.org/2386103004/diff/20001/content/browser/renderer_host/render_widget_host_view_aura.cc#newcode1822 content/browser/renderer_host/render_widget_host_view_aura.cc:1822: if (event->type() == ui::ET_MOUSE_MOVED) { On 2016/10/04 02:01:34, scheib ...
4 years, 2 months ago (2016-10-04 02:21:20 UTC) #12
ananta
On 2016/10/04 02:21:20, ananta wrote: > https://codereview.chromium.org/2386103004/diff/20001/content/browser/renderer_host/render_widget_host_view_aura.cc > File content/browser/renderer_host/render_widget_host_view_aura.cc (right): > > https://codereview.chromium.org/2386103004/diff/20001/content/browser/renderer_host/render_widget_host_view_aura.cc#newcode1822 > ...
4 years, 2 months ago (2016-10-04 02:23:59 UTC) #13
ananta
On 2016/10/04 02:23:59, ananta wrote: > On 2016/10/04 02:21:20, ananta wrote: > > > https://codereview.chromium.org/2386103004/diff/20001/content/browser/renderer_host/render_widget_host_view_aura.cc ...
4 years, 2 months ago (2016-10-04 12:53:21 UTC) #17
sky
https://codereview.chromium.org/2386103004/diff/40001/content/browser/renderer_host/render_widget_host_view_aura.cc File content/browser/renderer_host/render_widget_host_view_aura.cc (right): https://codereview.chromium.org/2386103004/diff/40001/content/browser/renderer_host/render_widget_host_view_aura.cc#newcode2509 content/browser/renderer_host/render_widget_host_view_aura.cc:2509: global_mouse_position_.SetPoint(event->globalX, event->globalY); This is the first I've seen of ...
4 years, 2 months ago (2016-10-04 18:17:55 UTC) #22
ananta
https://codereview.chromium.org/2386103004/diff/40001/content/browser/renderer_host/render_widget_host_view_aura.cc File content/browser/renderer_host/render_widget_host_view_aura.cc (right): https://codereview.chromium.org/2386103004/diff/40001/content/browser/renderer_host/render_widget_host_view_aura.cc#newcode2509 content/browser/renderer_host/render_widget_host_view_aura.cc:2509: global_mouse_position_.SetPoint(event->globalX, event->globalY); On 2016/10/04 18:17:55, sky wrote: > This ...
4 years, 2 months ago (2016-10-04 19:44:52 UTC) #23
sky
https://codereview.chromium.org/2386103004/diff/40001/content/browser/renderer_host/render_widget_host_view_aura.cc File content/browser/renderer_host/render_widget_host_view_aura.cc (right): https://codereview.chromium.org/2386103004/diff/40001/content/browser/renderer_host/render_widget_host_view_aura.cc#newcode1320 content/browser/renderer_host/render_widget_host_view_aura.cc:1320: // ModifyEventMovementAndCoords function. If you update aura::Env and nuke ...
4 years, 2 months ago (2016-10-05 15:49:55 UTC) #24
ananta
https://codereview.chromium.org/2386103004/diff/40001/content/browser/renderer_host/render_widget_host_view_aura.cc File content/browser/renderer_host/render_widget_host_view_aura.cc (right): https://codereview.chromium.org/2386103004/diff/40001/content/browser/renderer_host/render_widget_host_view_aura.cc#newcode1320 content/browser/renderer_host/render_widget_host_view_aura.cc:1320: // ModifyEventMovementAndCoords function. On 2016/10/05 15:49:55, sky wrote: > ...
4 years, 2 months ago (2016-10-05 21:42:17 UTC) #25
sky
Ok, I think I get this, thanks for clarification. Is it possible to write test ...
4 years, 2 months ago (2016-10-06 16:33:36 UTC) #26
ananta
https://codereview.chromium.org/2386103004/diff/40001/content/browser/renderer_host/render_widget_host_view_aura.cc File content/browser/renderer_host/render_widget_host_view_aura.cc (right): https://codereview.chromium.org/2386103004/diff/40001/content/browser/renderer_host/render_widget_host_view_aura.cc#newcode2504 content/browser/renderer_host/render_widget_host_view_aura.cc:2504: ui::MouseEvent* ui_mouse_event) { On 2016/10/06 16:33:36, sky wrote: > ...
4 years, 2 months ago (2016-10-06 21:15:18 UTC) #27
scheib
Logic LGTM, tests ... it's unfortunate we don't have a way to unit_test this layer.
4 years, 2 months ago (2016-10-06 21:39:10 UTC) #30
sky
https://codereview.chromium.org/2386103004/diff/80001/content/browser/renderer_host/render_widget_host_view_aura.h File content/browser/renderer_host/render_widget_host_view_aura.h (right): https://codereview.chromium.org/2386103004/diff/80001/content/browser/renderer_host/render_widget_host_view_aura.h#newcode430 content/browser/renderer_host/render_widget_host_view_aura.h:430: const ui::MouseEvent& ui_mouse_event); |event| should be last (style guide ...
4 years, 2 months ago (2016-10-06 22:38:48 UTC) #33
ananta
https://codereview.chromium.org/2386103004/diff/80001/content/browser/renderer_host/render_widget_host_view_aura.h File content/browser/renderer_host/render_widget_host_view_aura.h (right): https://codereview.chromium.org/2386103004/diff/80001/content/browser/renderer_host/render_widget_host_view_aura.h#newcode430 content/browser/renderer_host/render_widget_host_view_aura.h:430: const ui::MouseEvent& ui_mouse_event); On 2016/10/06 22:38:48, sky wrote: > ...
4 years, 2 months ago (2016-10-06 22:43:16 UTC) #34
sky
LGTM
4 years, 2 months ago (2016-10-07 15:18:46 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2386103004/100001
4 years, 2 months ago (2016-10-07 18:49:42 UTC) #38
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/276660)
4 years, 2 months ago (2016-10-07 19:00:03 UTC) #40
ananta
TBR'ing jam
4 years, 2 months ago (2016-10-07 21:43:01 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2386103004/100001
4 years, 2 months ago (2016-10-07 21:53:56 UTC) #44
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 2 months ago (2016-10-07 22:00:14 UTC) #46
commit-bot: I haz the power
Patchset 6 (id:??) landed as https://crrev.com/116116ab28e3d6f1c9320f921e77e084426588ca Cr-Commit-Position: refs/heads/master@{#423977}
4 years, 2 months ago (2016-10-07 22:02:17 UTC) #48
jam
4 years, 2 months ago (2016-10-10 14:56:32 UTC) #49
Message was sent while issue was closed.
lgtm

Powered by Google App Engine
This is Rietveld 408576698