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

Issue 1586353004: Update reposting of events from menus (Closed)

Created:
4 years, 11 months ago by jonross
Modified:
4 years, 11 months ago
Reviewers:
ananta, sky
CC:
chromium-reviews, tfarina, mohsen
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Update reposting of events from menus This change addresses a potential crash in MenuController::RepostEvent, along with a regression in touch event reposting on Chrome OS. In MenuController::SetSelectionOnPointerDown the call of Cancel can lead to the deletion of the source of the event. RepostEvent can crash while attempting to transform the event location to screen coordinates. This change performs the transform before cancelling. In MenuController::OnTouchEvent a call was added to RepostEvent. On Windows this eventually leads to the closing of the menu after capture is released. However this does not occur on Chrome OS, leading to the menu never closing. This change refactors out the Repost/Cancel logic from SetSelectionOnPointerDown into RepostEventAndCancel, providing one location to handle the reposting and shutdown logic differences of Windows and Chrome OS. SetSelectionOnPointerDown and OnTouchEvent now use this. TEST=MenuControllerTest.AsynchronousRepostEvent, MenuControllerTest.AsynchronousTouchEventRepostEvent, as well as manual testing on a Chromebook to confirm touch regression has been fixed. BUG=557130 Committed: https://crrev.com/580431e42ab952e84b32e9244acb252b1a76c575 Cr-Commit-Position: refs/heads/master@{#370143}

Patch Set 1 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+142 lines, -39 lines) Patch
M ui/views/controls/menu/menu_controller.h View 1 chunk +9 lines, -1 line 0 comments Download
M ui/views/controls/menu/menu_controller.cc View 5 chunks +48 lines, -38 lines 0 comments Download
M ui/views/controls/menu/menu_controller_unittest.cc View 3 chunks +85 lines, -0 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 11 (5 generated)
jonross
Hi ananta@, This change contains a follow up to your review: https://codereview.chromium.org/1565013002/ PTAL
4 years, 11 months ago (2016-01-15 16:21:37 UTC) #3
jonross
Hi sky, Could you provide an owner's review of this change to MenuController? Thanks, Jon
4 years, 11 months ago (2016-01-15 16:22:11 UTC) #5
sky
LGTM
4 years, 11 months ago (2016-01-19 16:35:03 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1586353004/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1586353004/20001
4 years, 11 months ago (2016-01-19 17:34:00 UTC) #8
commit-bot: I haz the power
Committed patchset #1 (id:20001)
4 years, 11 months ago (2016-01-19 18:20:03 UTC) #9
commit-bot: I haz the power
4 years, 11 months ago (2016-01-19 18:21:21 UTC) #11
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/580431e42ab952e84b32e9244acb252b1a76c575
Cr-Commit-Position: refs/heads/master@{#370143}

Powered by Google App Engine
This is Rietveld 408576698