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

Issue 2933353003: Mark the ET_MOUSE_MOVED created from a pointer grab as synthesized. (Closed)

Created:
3 years, 6 months ago by Kevin McNee
Modified:
3 years, 5 months ago
Reviewers:
sadrul
CC:
chromium-reviews, yusukes+watch_chromium.org, shuchen+watch_chromium.org, jam, nona+watch_chromium.org, darin-cc_chromium.org, tfarina, James Su
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Mark the ET_MOUSE_MOVED created from a pointer grab as synthesized. When the mouse pointer is outside of the window and an overscroll navigation is started with a touchscreen, an ET_MOUSE_MOVED event is created from the EnterNotify XEvent in DesktopWindowTreeHostX11::DispatchEvent. This is not marked as synthesized, so it interferes with the overscroll gesture. ET_MOUSE_MOVED events created from an EnterNotify are marked as synthesized elsewhere, so we move this logic into EventFlagsFromXEvent, so the events are consistently marked as synthesized. BUG=731914 Review-Url: https://codereview.chromium.org/2933353003 Cr-Commit-Position: refs/heads/master@{#484279} Committed: https://chromium.googlesource.com/chromium/src/+/08381b6e5c3fc97d80e116f770d4fe0f1c06e0e5

Patch Set 1 #

Patch Set 2 : Investigate use-after-free. #

Patch Set 3 : Investigate use-after-free. #

Patch Set 4 : Investigate use-after-free. #

Patch Set 5 : Investigate use-after-free. #

Patch Set 6 : Investigate use-after-free. #

Total comments: 2

Patch Set 7 : Investigate use-after-free. #

Patch Set 8 : Rebase and go back to patch set 1. #

Patch Set 9 : Fix UAF. #

Patch Set 10 : Move the marking of these mouse-moves as synthesized to a common location. #

Patch Set 11 : Just fail on mouse moves, failing on all mouse events is excessively strict. #

Total comments: 3

Patch Set 12 : Take location from any native event backed synthesized MouseEvent. #

Patch Set 13 : Clarify comment. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+115 lines, -14 lines) Patch
M content/browser/renderer_host/render_widget_host_view_event_handler.cc View 1 1 chunk +4 lines, -3 lines 0 comments Download
M content/browser/web_contents/web_contents_view_aura_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +103 lines, -0 lines 0 comments Download
M ui/aura/env_input_state_controller.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +4 lines, -1 line 0 comments Download
M ui/aura/window_tree_host_x11.cc View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -3 lines 0 comments Download
M ui/events/platform/x11/x11_event_source_libevent.cc View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -4 lines 0 comments Download
M ui/events/x/events_x_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M ui/events/x/events_x_utils.cc View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -0 lines 0 comments Download
M ui/platform_window/x11/x11_window.cc View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -3 lines 0 comments Download

Messages

Total messages: 44 (35 generated)
Kevin McNee
sadrul: Could you take a look at this change? Thanks.
3 years, 6 months ago (2017-06-13 20:15:59 UTC) #8
sadrul
https://codereview.chromium.org/2933353003/diff/90001/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc File ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc (right): https://codereview.chromium.org/2933353003/diff/90001/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc#newcode1924 ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc:1924: mouse_event.set_flags(mouse_event.flags() | ui::EF_IS_SYNTHESIZED); Looks like we are always doing ...
3 years, 6 months ago (2017-06-16 16:03:36 UTC) #16
Kevin McNee
The change in ui/aura/env_input_state_controller.cc addresses the UAF. https://codereview.chromium.org/2933353003/diff/90001/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc File ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc (right): https://codereview.chromium.org/2933353003/diff/90001/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc#newcode1924 ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc:1924: mouse_event.set_flags(mouse_event.flags() | ...
3 years, 5 months ago (2017-06-29 22:41:42 UTC) #24
Kevin McNee
Also, good news. This appears to fix WebContentsViewAuraTest.QuickOverscrollDirectionChange on linux. I'm seeing the same spurious ...
3 years, 5 months ago (2017-06-30 19:27:18 UTC) #29
sadrul
lgtm https://codereview.chromium.org/2933353003/diff/190001/ui/aura/env_input_state_controller.cc File ui/aura/env_input_state_controller.cc (right): https://codereview.chromium.org/2933353003/diff/190001/ui/aura/env_input_state_controller.cc#newcode46 ui/aura/env_input_state_controller.cc:46: #endif // defined(USE_X11) Can you just set the ...
3 years, 5 months ago (2017-07-04 17:16:49 UTC) #32
Kevin McNee
https://codereview.chromium.org/2933353003/diff/190001/ui/aura/env_input_state_controller.cc File ui/aura/env_input_state_controller.cc (right): https://codereview.chromium.org/2933353003/diff/190001/ui/aura/env_input_state_controller.cc#newcode46 ui/aura/env_input_state_controller.cc:46: #endif // defined(USE_X11) On 2017/07/04 17:16:49, sadrul wrote: > ...
3 years, 5 months ago (2017-07-05 13:52:28 UTC) #37
Kevin McNee
https://codereview.chromium.org/2933353003/diff/190001/ui/aura/env_input_state_controller.cc File ui/aura/env_input_state_controller.cc (right): https://codereview.chromium.org/2933353003/diff/190001/ui/aura/env_input_state_controller.cc#newcode46 ui/aura/env_input_state_controller.cc:46: #endif // defined(USE_X11) On 2017/07/05 13:52:27, Kevin McNee wrote: ...
3 years, 5 months ago (2017-07-05 14:08:46 UTC) #38
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/2933353003/230001
3 years, 5 months ago (2017-07-05 14:11:22 UTC) #41
commit-bot: I haz the power
3 years, 5 months ago (2017-07-05 15:23:33 UTC) #44
Message was sent while issue was closed.
Committed patchset #13 (id:230001) as
https://chromium.googlesource.com/chromium/src/+/08381b6e5c3fc97d80e116f770d4...

Powered by Google App Engine
This is Rietveld 408576698