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

Issue 4202005: [Linux] Improve preedit string and Instant suggestion support in omnibox. (Closed)

Created:
10 years, 1 month ago by James Su
Modified:
9 years, 7 months ago
Reviewers:
Evan Stade
CC:
chromium-reviews, ben+cc_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

[Linux] Improve preedit string and Instant suggestion support in omnibox. This CL contains following major changes: 1. Uses GtkLabel instead of GtkTextView for displaying instant suggestion. 2. Attaches the instant view to a child anchor in the text view. 3. Treats preedit string as part of user input, so that autocomplete match can take effect with uncommitted preedit string. BUG=27547 TEST=Instant suggestion should work as normal. And preedit string should trigger autocomplete match and work with Instant suggestion.

Patch Set 1 #

Patch Set 2 : Fix alignment issue. #

Patch Set 3 : Fix compilation issue. #

Patch Set 4 : Fix issue 27547 #

Patch Set 5 : Workaround misalignment issue. #

Patch Set 6 : Fix compilation error on trybot. #

Total comments: 6

Patch Set 7 : Fix undo and update according to review feedback. #

Patch Set 8 : Fix another issue related to undo. #

Patch Set 9 : Fix the previous fix. #

Patch Set 10 : Add two simple tests. Fix an undo/redo related bug. #

Total comments: 4

Patch Set 11 : Update according to review comment. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+383 lines, -86 lines) Patch
M chrome/browser/autocomplete/autocomplete_edit_view_browsertest.cc View 10 1 chunk +125 lines, -0 lines 0 comments Download
M chrome/browser/autocomplete/autocomplete_edit_view_gtk.h View 1 2 3 4 5 6 7 8 9 10 6 chunks +36 lines, -10 lines 0 comments Download
M chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc View 1 2 3 4 5 6 7 8 9 10 25 chunks +222 lines, -76 lines 0 comments Download

Messages

Total messages: 27 (0 generated)
James Su
10 years, 1 month ago (2010-10-28 00:00:46 UTC) #1
Evan Stade
I'm applying this to test it out, but this seems a lot more complicated, which ...
10 years, 1 month ago (2010-10-28 01:19:08 UTC) #2
James Su
On 2010/10/28 01:19:08, Evan Stade wrote: > I'm applying this to test it out, but ...
10 years, 1 month ago (2010-10-28 01:37:09 UTC) #3
James Su
The alignment issue should have been fixed. Please try again.
10 years, 1 month ago (2010-10-28 03:19:23 UTC) #4
James Su
I'll try to fix the preedit string issue based on the original solution. If that ...
10 years, 1 month ago (2010-10-28 03:57:17 UTC) #5
James Su
Turns out that these two approaches both have problems supporting preedit string. For the original ...
10 years, 1 month ago (2010-10-28 17:47:49 UTC) #6
Evan Stade
ok. So do you think the anchor approach is the best way forward? How awful ...
10 years, 1 month ago (2010-10-28 21:44:51 UTC) #7
James Su
Patch Set 4 integrates the fix for issue 27547. You may try it with an ...
10 years, 1 month ago (2010-10-28 22:57:01 UTC) #8
Evan Stade
sorry, I meant how bad is the preedit string alignment thing, not the original alignment ...
10 years, 1 month ago (2010-10-29 00:08:20 UTC) #9
James Su
On 2010/10/29 00:08:20, Evan Stade wrote: > sorry, I meant how bad is the preedit ...
10 years, 1 month ago (2010-10-29 00:29:28 UTC) #10
Evan Stade
seems to work great. Thanks for your patience. LGTM http://codereview.chromium.org/4202005/diff/17002/22001 File chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc (right): http://codereview.chromium.org/4202005/diff/17002/22001#newcode568 chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc:568: ...
10 years, 1 month ago (2010-10-29 01:43:33 UTC) #11
James Su
Thanks for your review. But I just found that undo doesn't work correctly with this ...
10 years, 1 month ago (2010-10-29 04:51:55 UTC) #12
James Su
CL has been updated to fix the undo issue. Well, it doesn't really fix all ...
10 years, 1 month ago (2010-10-29 05:15:24 UTC) #13
Daniel Erat
(removing myself as a reviewer)
10 years, 1 month ago (2010-10-29 16:39:58 UTC) #14
Evan Stade
yea the undo seems crazy broken, but that's true even without your patch. I thought ...
10 years, 1 month ago (2010-10-29 19:42:27 UTC) #15
James Su
On 2010/10/29 19:42:27, Evan Stade wrote: > yea the undo seems crazy broken, but that's ...
10 years, 1 month ago (2010-10-29 20:11:54 UTC) #16
Evan Stade
On 2010/10/29 20:11:54, James Su wrote: > On 2010/10/29 19:42:27, Evan Stade wrote: > > ...
10 years, 1 month ago (2010-10-29 20:20:22 UTC) #17
James Su
On 2010/10/29 20:20:22, Evan Stade wrote: > On 2010/10/29 20:11:54, James Su wrote: > > ...
10 years, 1 month ago (2010-10-29 20:26:37 UTC) #18
Evan Stade
fair enough. Would it be at all possible to write unit tests? I'm just worried ...
10 years, 1 month ago (2010-10-29 20:52:21 UTC) #19
James Su
On 2010/10/29 20:52:21, Evan Stade wrote: > fair enough. Would it be at all possible ...
10 years, 1 month ago (2010-10-29 21:20:58 UTC) #20
Evan Stade
I would prefer to see unit tests over browser tests if possible (although both is ...
10 years, 1 month ago (2010-10-29 21:34:46 UTC) #21
James Su
On 2010/10/29 21:34:46, Evan Stade wrote: > I would prefer to see unit tests over ...
10 years, 1 month ago (2010-10-29 21:48:20 UTC) #22
Evan Stade
I guess that's true. An in-process browser test wouldn't be that bad. I was thinking ...
10 years, 1 month ago (2010-10-29 21:54:52 UTC) #23
James Su
On 2010/10/29 21:54:52, Evan Stade wrote: > I guess that's true. An in-process browser test ...
10 years, 1 month ago (2010-10-29 21:56:51 UTC) #24
James Su
I added two simple tests in autocomplete_edit_view_browsertest.cc. Actually many cases are already covered by existing ...
10 years, 1 month ago (2010-10-30 00:00:09 UTC) #25
Evan Stade
thanks. LGTM http://codereview.chromium.org/4202005/diff/8002/45001 File chrome/browser/autocomplete/autocomplete_edit_view_browsertest.cc (right): http://codereview.chromium.org/4202005/diff/8002/45001#newcode750 chrome/browser/autocomplete/autocomplete_edit_view_browsertest.cc:750: // The cursor should at the end. ...
10 years, 1 month ago (2010-11-02 02:20:26 UTC) #26
James Su
10 years, 1 month ago (2010-11-02 18:15:10 UTC) #27
I filed a separated issue for the assertion failure: http://crbug.com/61607

I'll commit this CL and address that issue later, as it won't affect the testing
result.

http://codereview.chromium.org/4202005/diff/8002/45001
File chrome/browser/autocomplete/autocomplete_edit_view_browsertest.cc (right):

http://codereview.chromium.org/4202005/diff/8002/45001#newcode750
chrome/browser/autocomplete/autocomplete_edit_view_browsertest.cc:750: // The
cursor should at the end.
On 2010/11/02 02:20:26, Evan Stade wrote:
> missing a verb

Done.

http://codereview.chromium.org/4202005/diff/8002/45001#newcode774
chrome/browser/autocomplete/autocomplete_edit_view_browsertest.cc:774: // Undo
delete every thing.
On 2010/11/02 02:20:26, Evan Stade wrote:
> nit: everything

Done.

Powered by Google App Engine
This is Rietveld 408576698