diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-09 01:26:20 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-09 01:26:20 +0000 |
commit | 1d313b83ae291b6372a0824c57180fa1d5f36a9d (patch) | |
tree | 6ef4c7260d9bebefc40bcdf3b0ec1a3de43962ac /chrome/browser/cocoa/browser_window_controller.mm | |
parent | be52be15450fd01fea3044267449d15560c29fe1 (diff) | |
download | chromium_src-1d313b83ae291b6372a0824c57180fa1d5f36a9d.zip chromium_src-1d313b83ae291b6372a0824c57180fa1d5f36a9d.tar.gz chromium_src-1d313b83ae291b6372a0824c57180fa1d5f36a9d.tar.bz2 |
Support cmd-left/right for history.
Since cmd-left/right should not do history if the omnibox is focussed, but cmd-1-9 should work if the omnibox is focussed, we have to differentiate between window- and browser-level shortcuts.
(Because performKeyEquivalent bubbles up from the window -- and if we let it bubble up to the omnibox, then the omnibox handles cmd-left/right just fine, but it swallows cmd-1 and doesn't give us a chance to intercept this. That means cmd-left doesn't work if you hit cmd-l tab, which focusses something that's neither omnibox nor tab contents. This behavior is consistent with safari and camino, and I think it's the best we can do without rewriting event dispatching.
Camino does this here:
http://mxr.mozilla.org/seamonkey/source/camino/src/browser/BrowserWindow.mm#128
http://mxr.mozilla.org/seamonkey/source/camino/src/browser/BrowserWrapper.mm#1031
)
BUG=12557
TEST=Focus text box on a web page. cmd-left/right should go to start/end of text. Focus webpage background. cmd-left/right \
should go history back/forward. When the omnibox is focussed, cmd-left/right should move the caret, but cmd-1-9 should still switch tabs.
Note that shortcuts still don't work if a subwindow (e.g. find bar, bookmark bubble) has focus.
Review URL: http://codereview.chromium.org/251069
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28505 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/browser_window_controller.mm')
0 files changed, 0 insertions, 0 deletions