• erikchen's avatar
    [Reland #1] macOS: Display [ctr + tab] and [ctr + shift + tab] as hotkeys for tab switching. · 3e0fccc5
    erikchen authored
    The first CL caused test failures because the browser_test was ignoring the
    "shift" key when searching for menu items. The IDC_SELECT_NEXT_TAB and
    IDC_SELECT_PREVIOUS_TAB only differ by the presence of "shift", so it cannot be
    ignored.
    
    > This matches other macOS application like Safari, Terminal, etc. All existing
    > hotkeys will still work.
    >
    > This CL uses the same hotkey for "previous tab" that Safari and Terminal use,
    > which is [ctr + shift + "Horizontal Tab"]. This also causes tests to pass.
    > However, pressing that key combination actually generates [ctr + shift + "End of
    > Medium"], which renderers in the Main Menu as a backwards tab. This CL updates
    > NSMenuItem(ChromeAdditions) to check for this special case.
    >
    > This CL removes two incorrect DCHECKs from render_widget_host_view_cocoa.mm. I
    > regularly hit both of them when running Chromium on a local build. They both
    > rely on the false assumption that keyEquivalents in the main menu must have the
    > command modifier.
    >
    > Bug: 851714
    > Reviewed-on: https://chromium-review.googlesource.com/1106659
    > Commit-Queue: Erik Chen <erikchen@chromium.org>
    > Reviewed-by: Alexei Svitkine <asvitkine@chromium.org>
    > Reviewed-by: Nico Weber <thakis@chromium.org>
    > Cr-Commit-Position: refs/heads/master@{#574211}
    
    Change-Id: Id87f364f5c5b303e8b9668e79f813a1c23376c98
    TBR: avi@chromium.org
    Reviewed-on: https://chromium-review.googlesource.com/1134203
    Commit-Queue: Erik Chen <erikchen@chromium.org>
    Reviewed-by: default avatarNico Weber <thakis@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#574628}
    3e0fccc5
MainMenu.xib 38.5 KB