MacViewsBrowser: Views accelerators table should match the Cocoa one
Reported by
mbl...@yandex-team.ru,
Jun 15 2016
|
|||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 YaBrowser/16.6.0.8326 (beta) Safari/537.36 Steps to reproduce the problem: View-specific accelerator table is defined in src/chrome/browser/ui/views/accelerator_table.cc Cocoa-specific lives in src/chrome/browser/ui/cocoa/accelerators_cocoa.mm There's also src/chrome/browser/global_keyboard_shortcuts_mac.mm, which is used both for Cocoa and MacViews. What is the expected behavior? What went wrong? Currently MacViews implements some accelerators that aren't present in the Cocoa browser, this could be solved by updating the accelerator_table.cc to match the accelerators_cocoa.mm Did this work before? N/A Chrome version: 51.0.2704.84 Channel: canary OS Version: OS X 10.11.5 Flash Version:
,
Jun 16 2016
,
Jun 16 2016
Created a CL: https://codereview.chromium.org/2074643003/
,
Jun 16 2016
Assigning to a project member to help with the review. Thanks for the CL!
,
Nov 21 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/cb9c6b9d9a764e89cb0703e48ddcfea3129e2ad3 commit cb9c6b9d9a764e89cb0703e48ddcfea3129e2ad3 Author: mblsha <mblsha@yandex-team.ru> Date: Mon Nov 21 17:11:18 2016 MacViews: Views accelerators table should match the Cocoa one. Updated views/accelerator_table.cc to match accelerators_cocoa.mm. Added eligible shortcuts from global_keyboard_shortcuts_mac.mm as well. Also handle the case when the user configured cmd-left to mean "previous tab", as it should take precedence over the built-in binding: we're consulting the [NSApp mainMenu] using CommandForKeyEvent(). Lastly, the Cmd+{/} shortcuts are special as they would be impossible to perform on German and French keyboard layouts if we would simply check for keycodes as we do in accelerator_table.cc ( crbug.com/25946 ). In order to tackle last two problems I've added PreHandleKeyboardEvent and HandleKeyboardEvent to the NativeBrowserFrame interface. BUG= 620315 Review-Url: https://codereview.chromium.org/2074643003 Cr-Commit-Position: refs/heads/master@{#433574} [modify] https://crrev.com/cb9c6b9d9a764e89cb0703e48ddcfea3129e2ad3/chrome/browser/BUILD.gn [add] https://crrev.com/cb9c6b9d9a764e89cb0703e48ddcfea3129e2ad3/chrome/browser/global_keyboard_shortcuts_cocoa_mac.mm [modify] https://crrev.com/cb9c6b9d9a764e89cb0703e48ddcfea3129e2ad3/chrome/browser/global_keyboard_shortcuts_mac.h [modify] https://crrev.com/cb9c6b9d9a764e89cb0703e48ddcfea3129e2ad3/chrome/browser/global_keyboard_shortcuts_mac.mm [modify] https://crrev.com/cb9c6b9d9a764e89cb0703e48ddcfea3129e2ad3/chrome/browser/global_keyboard_shortcuts_mac_unittest.mm [add] https://crrev.com/cb9c6b9d9a764e89cb0703e48ddcfea3129e2ad3/chrome/browser/global_keyboard_shortcuts_views_mac.mm [modify] https://crrev.com/cb9c6b9d9a764e89cb0703e48ddcfea3129e2ad3/chrome/browser/ui/views/accelerator_table.cc [add] https://crrev.com/cb9c6b9d9a764e89cb0703e48ddcfea3129e2ad3/chrome/browser/ui/views/accelerator_table_unittest_mac.mm [modify] https://crrev.com/cb9c6b9d9a764e89cb0703e48ddcfea3129e2ad3/chrome/browser/ui/views/frame/browser_frame.cc [modify] https://crrev.com/cb9c6b9d9a764e89cb0703e48ddcfea3129e2ad3/chrome/browser/ui/views/frame/browser_frame.h [modify] https://crrev.com/cb9c6b9d9a764e89cb0703e48ddcfea3129e2ad3/chrome/browser/ui/views/frame/browser_frame_ash.cc [modify] https://crrev.com/cb9c6b9d9a764e89cb0703e48ddcfea3129e2ad3/chrome/browser/ui/views/frame/browser_frame_ash.h [modify] https://crrev.com/cb9c6b9d9a764e89cb0703e48ddcfea3129e2ad3/chrome/browser/ui/views/frame/browser_frame_mac.h [modify] https://crrev.com/cb9c6b9d9a764e89cb0703e48ddcfea3129e2ad3/chrome/browser/ui/views/frame/browser_frame_mac.mm [modify] https://crrev.com/cb9c6b9d9a764e89cb0703e48ddcfea3129e2ad3/chrome/browser/ui/views/frame/browser_frame_mus.cc [modify] https://crrev.com/cb9c6b9d9a764e89cb0703e48ddcfea3129e2ad3/chrome/browser/ui/views/frame/browser_frame_mus.h [modify] https://crrev.com/cb9c6b9d9a764e89cb0703e48ddcfea3129e2ad3/chrome/browser/ui/views/frame/browser_view.cc [modify] https://crrev.com/cb9c6b9d9a764e89cb0703e48ddcfea3129e2ad3/chrome/browser/ui/views/frame/desktop_browser_frame_aura.cc [modify] https://crrev.com/cb9c6b9d9a764e89cb0703e48ddcfea3129e2ad3/chrome/browser/ui/views/frame/desktop_browser_frame_aura.h [modify] https://crrev.com/cb9c6b9d9a764e89cb0703e48ddcfea3129e2ad3/chrome/browser/ui/views/frame/native_browser_frame.h [modify] https://crrev.com/cb9c6b9d9a764e89cb0703e48ddcfea3129e2ad3/chrome/test/BUILD.gn
,
Nov 26 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/23052ba5652db0942cb1b014314be33a5d372171 commit 23052ba5652db0942cb1b014314be33a5d372171 Author: mblsha <mblsha@yandex-team.ru> Date: Sat Nov 26 17:04:58 2016 MacViews: Fix BrowserViewTest.RepeatedAccelerators. crbug.com/620315 unified Cocoa and Views accelerators, removing almost all Ctrl-accelerators from MacViews in the process. We must use Cmd+L in order to focus Omnibox on Mac. BUG= 620315 Review-Url: https://codereview.chromium.org/2535543002 Cr-Commit-Position: refs/heads/master@{#434574} [modify] https://crrev.com/23052ba5652db0942cb1b014314be33a5d372171/chrome/browser/ui/views/frame/browser_view_unittest.cc
,
Dec 3 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4ffb0e227b4b006a85475a368187dd96e63d7996 commit 4ffb0e227b4b006a85475a368187dd96e63d7996 Author: mblsha <mblsha@yandex-team.ru> Date: Sat Dec 03 20:54:00 2016 MacViews: Fix GlobalKeyboardShortcuts.ShortcutsToWindowCommand. After crbug.com/620315 global_keyboard_shortcuts_mac.mm uses two different shortcut tables: one for Cocoa and one for MacViews. Ensure that the test works on both browser implementations. BUG= 620315 Review-Url: https://codereview.chromium.org/2535553002 Cr-Commit-Position: refs/heads/master@{#436169} [modify] https://crrev.com/4ffb0e227b4b006a85475a368187dd96e63d7996/chrome/browser/global_keyboard_shortcuts_mac_unittest.mm
,
Dec 6 2017
Thanks for all of these! I'll do a big triage of Issue 671916 blockers when the current phase is complete. See go/macviewstracking
,
Apr 2 2018
MacViews triage: this one is fixed now - the last fallout of it was <https://chromium-review.googlesource.com/c/chromium/src/+/975583>. |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by meh...@chromium.org
, Jun 15 2016