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

Issue 1117173003: Converting (Alt+LeftClick -> RightClick) to (Search+LeftClick -> RightClick) (Closed)

Created:
5 years, 7 months ago by afakhry
Modified:
5 years, 7 months ago
CC:
chromium-reviews, stevenjb+watch_chromium.org, oshima+watch_chromium.org, davemoore+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Converting (Alt+LeftClick -> RightClick) to (Search+LeftClick -> RightClick) Some web apps have behaviors for Alt+LeftClick so we had to do this conversion. However this change will result in popping up the AppList whenever Search+Click is pressed and then search is released while in a web app that consumes the Search+Click by showing a context menu and then prevents default. This context menu differs from the native context menu in that it doesn't have its own MenuEventDispatcher. So the Search release event is passed to the accelerator controller and then the controller thinks the both current and previous accelerators are the "Search" key. We had to fix this by listening to mouse events in the AcceleratorFilter and then clear the current accelerator in the accelerator history. BUG=248762 TEST=unit_tests --gtest_filter=EventRewriterTest.* Committed: https://crrev.com/404d0118fa4c40676cbd2f6da3e5ba5d62f39b61 Cr-Commit-Position: refs/heads/master@{#328213}

Patch Set 1 : #

Total comments: 5

Patch Set 2 : Added a test, and addressed comments #

Total comments: 6

Patch Set 3 : Added a test case for ignoring synthesized mouse events. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+97 lines, -51 lines) Patch
M ash/accelerators/accelerator_filter_unittest.cc View 1 2 2 chunks +30 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/events/event_rewriter.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/chromeos/events/event_rewriter.cc View 1 chunk +5 lines, -4 lines 0 comments Download
M chrome/browser/chromeos/events/event_rewriter_unittest.cc View 1 8 chunks +43 lines, -43 lines 0 comments Download
M ui/base/accelerators/accelerator_history.h View 1 1 chunk +3 lines, -2 lines 0 comments Download
M ui/wm/core/accelerator_filter.h View 1 chunk +2 lines, -1 line 0 comments Download
M ui/wm/core/accelerator_filter.cc View 1 2 1 chunk +13 lines, -0 lines 0 comments Download

Messages

Total messages: 17 (5 generated)
afakhry
sadrul@chromium.org: Please review changes in: - accelerator_filter.* derat@chromium.org: Please review changes in: - event_rewriter* Thanks!
5 years, 7 months ago (2015-04-30 23:58:42 UTC) #3
Daniel Erat
kpschoedel@ is a better reviewer for c/b/chromeos/events than me. i'm happy to approve for c/b/chromeos, ...
5 years, 7 months ago (2015-05-01 03:06:00 UTC) #5
Daniel Erat
https://codereview.chromium.org/1117173003/diff/20001/chrome/browser/chromeos/events/event_rewriter_unittest.cc File chrome/browser/chromeos/events/event_rewriter_unittest.cc (right): https://codereview.chromium.org/1117173003/diff/20001/chrome/browser/chromeos/events/event_rewriter_unittest.cc#newcode2094 chrome/browser/chromeos/events/event_rewriter_unittest.cc:2094: EXPECT_FALSE((ui::EF_LEFT_MOUSE_BUTTON | ui::EF_COMMAND_DOWN) ^ what's the reason for the ...
5 years, 7 months ago (2015-05-01 03:12:21 UTC) #6
sadrul
https://codereview.chromium.org/1117173003/diff/20001/ui/wm/core/accelerator_filter.cc File ui/wm/core/accelerator_filter.cc (right): https://codereview.chromium.org/1117173003/diff/20001/ui/wm/core/accelerator_filter.cc#newcode77 ui/wm/core/accelerator_filter.cc:77: // a default empty key accelerator. Interesting! Would it ...
5 years, 7 months ago (2015-05-01 03:21:18 UTC) #7
kpschoedel
EventRewriter LGTM https://codereview.chromium.org/1117173003/diff/20001/chrome/browser/chromeos/events/event_rewriter_unittest.cc File chrome/browser/chromeos/events/event_rewriter_unittest.cc (right): https://codereview.chromium.org/1117173003/diff/20001/chrome/browser/chromeos/events/event_rewriter_unittest.cc#newcode2094 chrome/browser/chromeos/events/event_rewriter_unittest.cc:2094: EXPECT_FALSE((ui::EF_LEFT_MOUSE_BUTTON | ui::EF_COMMAND_DOWN) ^ I see the ...
5 years, 7 months ago (2015-05-01 14:17:25 UTC) #8
afakhry
https://codereview.chromium.org/1117173003/diff/20001/chrome/browser/chromeos/events/event_rewriter_unittest.cc File chrome/browser/chromeos/events/event_rewriter_unittest.cc (right): https://codereview.chromium.org/1117173003/diff/20001/chrome/browser/chromeos/events/event_rewriter_unittest.cc#newcode2094 chrome/browser/chromeos/events/event_rewriter_unittest.cc:2094: EXPECT_FALSE((ui::EF_LEFT_MOUSE_BUTTON | ui::EF_COMMAND_DOWN) ^ On 2015/05/01 14:17:25, kpschoedel wrote: ...
5 years, 7 months ago (2015-05-02 00:02:43 UTC) #9
Daniel Erat
lgtm
5 years, 7 months ago (2015-05-04 15:40:02 UTC) #10
sadrul
It would be nice to move accelerator_filter_unittest.cc to live closer to accelerator_filter.cc (not in this ...
5 years, 7 months ago (2015-05-04 17:16:17 UTC) #11
afakhry
https://codereview.chromium.org/1117173003/diff/40001/ash/accelerators/accelerator_filter_unittest.cc File ash/accelerators/accelerator_filter_unittest.cc (right): https://codereview.chromium.org/1117173003/diff/40001/ash/accelerators/accelerator_filter_unittest.cc#newcode147 ash/accelerators/accelerator_filter_unittest.cc:147: generator.ReleaseLeftButton(); On 2015/05/04 17:16:17, sadrul wrote: > ClickLeftButton() instead ...
5 years, 7 months ago (2015-05-04 20:17:08 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1117173003/60001
5 years, 7 months ago (2015-05-04 23:22:12 UTC) #15
commit-bot: I haz the power
Committed patchset #3 (id:60001)
5 years, 7 months ago (2015-05-04 23:27:38 UTC) #16
commit-bot: I haz the power
5 years, 7 months ago (2015-05-04 23:28:46 UTC) #17
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/404d0118fa4c40676cbd2f6da3e5ba5d62f39b61
Cr-Commit-Position: refs/heads/master@{#328213}

Powered by Google App Engine
This is Rietveld 408576698