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

Issue 43072: Better keyboard and mouse handling in Omnibox: (Closed)

Created:
11 years, 9 months ago by Dean McNamee
Modified:
9 years, 7 months ago
Reviewers:
Evan Martin, Evan Stade
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Better keyboard and mouse handling in Omnibox: - Grab enter key events before they get to GtkTextView. We need to do this, otherwise enter when text is selected will replace the text, and we won't get a chance to catch that happening. This might have problems with IME, but it should be straightforward to fix anything IME related. - Don't deselect when we lose focus. This sometimes looks a bit strange, but it's the GTK thing to do. This also unbreaks copy and paste via the context menu, since popping up the context menu makes the GtkTextView lose focus. - Rewrite the inefficent newline eater. This should now only be needed for newlines that didn't come from the keyboard (like when you paste text). Use the builtin iter support for finding line boundaries, hopefully more efficient than checking the characters one by one. Still might have some bad behavior when pasting a ton of newline characters, but that can be improved later. This fixes inline autocomplete, you can now hit the enter key on an inline autocompleted suggestion, and you will get the intented navigation, instead of the navigation with the selected completion removed. This also adds support for alt-enter in Omnibox to navigate in a new tab. BUG=8236

Patch Set 1 #

Patch Set 2 : typo #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+64 lines, -33 lines) Patch
M chrome/browser/autocomplete/autocomplete_edit_view_gtk.h View 1 chunk +16 lines, -0 lines 0 comments Download
M chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc View 1 4 chunks +48 lines, -33 lines 3 comments Download

Messages

Total messages: 3 (0 generated)
Dean McNamee
11 years, 9 months ago (2009-03-11 13:19:19 UTC) #1
Evan Martin
LGTM http://codereview.chromium.org/43072/diff/1001/6 File chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc (right): http://codereview.chromium.org/43072/diff/1001/6#newcode8 Line 8: #include <gdk/gdkkeysyms.h> alphabetize? http://codereview.chromium.org/43072/diff/1001/6#newcode308 Line 308: // ...
11 years, 9 months ago (2009-03-11 18:25:31 UTC) #2
Evan Stade
11 years, 9 months ago (2009-03-11 20:56:28 UTC) #3
lgtm too

http://codereview.chromium.org/43072/diff/1001/6
File chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc (right):

http://codereview.chromium.org/43072/diff/1001/6#newcode344
Line 344: if (event->keyval == GDK_Return ||
perhaps factor this out into a helper function GdkKeyvalIsReturn(int keyval)

Powered by Google App Engine
This is Rietveld 408576698