summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/render_view.cc
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-29 03:56:51 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-29 03:56:51 +0000
commit507b33eab2acbb4e360b5b6eb9f2e666079d0e3b (patch)
tree6fd3dd864e9da3e68efc7ded0dbaf96b597fcd3c /chrome/renderer/render_view.cc
parent529338471fec2ab9b07bac9b07e3477b20e0ae28 (diff)
downloadchromium_src-507b33eab2acbb4e360b5b6eb9f2e666079d0e3b.zip
chromium_src-507b33eab2acbb4e360b5b6eb9f2e666079d0e3b.tar.gz
chromium_src-507b33eab2acbb4e360b5b6eb9f2e666079d0e3b.tar.bz2
Fix cmd-up/cmd-down.
The approach is to special-case moveToBeginningOfDocument and moveToEndOfDocument in WebFrameImpl::executeCommand(). With this (and the cocoa keyboard bindings patch being landed), the special-case code in WebViewImpl::ScrollViewWithKeyboard() can be removed. Also add a test for cmd-up/down. Change chrome.gyp so that it supports osx-only unit tests (_unittest_mac.mm). Move OnPrintPageAsBitmap to the other printing tests. BUG=22585 TEST=Go to a page with both text box and scrollbar (e.g. http://en.wikipedia.org ). Pressing cmd-down should scroll to end of page, cmd-up back to start. Clicking the text box and trying some emacs shortcuts should work (ctrl-a jumps to start of line, cmd-h acts as backspace, etc). Review URL: http://codereview.chromium.org/254002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27464 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/render_view.cc')
-rw-r--r--chrome/renderer/render_view.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc
index 66ac3bf..8d9b3dd 100644
--- a/chrome/renderer/render_view.cc
+++ b/chrome/renderer/render_view.cc
@@ -1511,13 +1511,18 @@ bool RenderView::handleCurrentKeyboardEvent() {
EditCommands::iterator it = edit_commands_.begin();
EditCommands::iterator end = edit_commands_.end();
+ bool did_execute_command = false;
for (; it != end; ++it) {
+ // In gtk, it's possible to bind multiple edit commands to one key (but it's
+ // the exception). Once one edit command is not executed, it seems safest to
+ // not execute the rest.
if (!frame->executeCommand(WebString::fromUTF8(it->name),
WebString::fromUTF8(it->value)))
break;
+ did_execute_command = true;
}
- return true;
+ return did_execute_command;
}
void RenderView::spellCheck(