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

Issue 164142: Improve key event handling of AutocompleteEditViewGtk.... (Closed)

Created:
11 years, 4 months ago by James Su
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com, Ben Goodger (Google)
Visibility:
Public.

Description

Improve key event handling of AutocompleteEditViewGtk. This CL improves key event handling of AutocompleteEditViewGtk class, following changes have been made: 1. Avoid accessing private data member of GtkTextView object, including im_context, need_im_reset etc. 2. Always send key events to the default handler of GtkTextView before handling them by ourselves, to make sure the behavior of IME and GtkTextView are always correct. This fixes the issue of moving focus from omnibox to webpage by pressing Tab key when using XIM im module. 3. Intercept "insert-text" signal of GtkTextBuffer object to prevent any unwanted characters from being inserted into omnibox. 4. Intercept "backspace" signal of GtkTextView object to fix issue 19068: [Linux] Search keywords: Backspace should exit out of search mode BUG=18393 : AutocompleteEditViewGtk should not access private members of GtkTextView BUG=19068 : [Linux] Search keywords: Backspace should exit out of search mode TEST=Starts a XIM input method, such as scim then open chrome with GTK_IM_MODULE=xim. Opens a webpage and press tab and shift-tab in omnibox to see if focus can be moved to/from webpage correctly. TEST=Copy & paste some text with new line characters to omnibox to see if new line characters are filtered. TEST=Turn on keyword search mode, press backspace to see if it can exit keyword search mode. TEST= Turn on keyword search mode, input some text then press backspace to delete a character, to see if it still in keyword search mode. Then move the cursor to the beginning of the text and press backspace, to see if it exits keyword search mode correctly. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=23184

Patch Set 1 #

Total comments: 6

Patch Set 2 : '' #

Patch Set 3 : '' #

Total comments: 3

Patch Set 4 : '' #

Total comments: 14

Patch Set 5 : '' #

Patch Set 6 : '' #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+120 lines, -64 lines) Patch
M chrome/browser/autocomplete/autocomplete_edit_view_gtk.h View 1 2 3 4 2 chunks +20 lines, -0 lines 0 comments Download
M chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc View 1 2 3 4 5 7 chunks +100 lines, -64 lines 2 comments Download

Messages

Total messages: 17 (0 generated)
James Su
Hi, This CL fixes issue 18393. Please help review. Regards James Su
11 years, 4 months ago (2009-08-07 10:17:31 UTC) #1
Dean McNamee
I am a bit worried about this change, since I believe we used to do ...
11 years, 4 months ago (2009-08-07 13:52:50 UTC) #2
James Su
Thanks for your feedback. CL has been updated accordingly. I just removed the redundant code ...
11 years, 4 months ago (2009-08-07 14:59:43 UTC) #3
Dean McNamee
Will review in full today. Thanks http://codereview.chromium.org/164142/diff/1004/12 File chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc (right): http://codereview.chromium.org/164142/diff/1004/12#newcode752 Line 752: for (; ...
11 years, 4 months ago (2009-08-07 15:07:33 UTC) #4
James Su
Thanks for review. CL updated. Regards James Su http://codereview.chromium.org/164142/diff/1004/12 File chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc (right): http://codereview.chromium.org/164142/diff/1004/12#newcode752 Line 752: ...
11 years, 4 months ago (2009-08-07 15:20:40 UTC) #5
James Su
ping.
11 years, 4 months ago (2009-08-10 22:19:11 UTC) #6
Dean McNamee
I don't understand what's better about handling this in insert-text vs buffer-changed like it was ...
11 years, 4 months ago (2009-08-10 23:50:28 UTC) #7
James Su
On 2009/08/10 23:50:28, Dean McNamee wrote: > I don't understand what's better about handling this ...
11 years, 4 months ago (2009-08-11 01:21:40 UTC) #8
Dean McNamee
insert-text is still emitted when you paste right? I kinda liked the old code using ...
11 years, 4 months ago (2009-08-11 16:53:23 UTC) #9
Evan Stade
http://codereview.chromium.org/164142/diff/16/1007 File chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc (right): http://codereview.chromium.org/164142/diff/16/1007#newcode767 Line 767: // Cache signal id for better performance. this ...
11 years, 4 months ago (2009-08-11 18:18:38 UTC) #10
Daniel Erat
LGTM http://codereview.chromium.org/164142/diff/16/1007 File chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc (right): http://codereview.chromium.org/164142/diff/16/1007#newcode754 Line 754: if (c == '\n' || c == ...
11 years, 4 months ago (2009-08-11 23:20:07 UTC) #11
James Su
On 2009/08/11 16:53:23, Dean McNamee wrote: > insert-text is still emitted when you paste right? ...
11 years, 4 months ago (2009-08-12 08:29:39 UTC) #12
James Su
Hi, I updated the CL according to your comments, and also made some improvement to ...
11 years, 4 months ago (2009-08-12 08:33:49 UTC) #13
Dean McNamee
Old code LGTM, but one question about the backspace code you've just added. Also, make ...
11 years, 4 months ago (2009-08-12 15:17:55 UTC) #14
James Su
Description and BUG lines have been updated. Regards James Su http://codereview.chromium.org/164142/diff/1020/23 File chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc (right): http://codereview.chromium.org/164142/diff/1020/23#newcode794 ...
11 years, 4 months ago (2009-08-12 15:40:10 UTC) #15
Dean McNamee
LG
11 years, 4 months ago (2009-08-12 15:44:21 UTC) #16
tony
11 years, 4 months ago (2009-08-12 20:56:18 UTC) #17
Accelerators no longer work when the omnibox has focus.  Reverting this change
causes them to work again.  James can you look into it?

Powered by Google App Engine
This is Rietveld 408576698