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

Issue 151006: Make Linux restore Omnibox contents on tab switch. (Closed)

Created:
11 years, 5 months ago by Dan Erat
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Make Linux restore Omnibox contents on tab switch. Tested as follows: Create a new window with two tabs. Type a bunch of 'a' characters into tab A's omnibox and a bunch of 'b's into tab B. Then, 1. Select tab A. Left-click in the omnibox and highlight a few characters in the middle. Left-click in the empty space to the right of the text to unhighlight it, then middle-click to make sure that the previously-highlighted text still gets pasted. 2. Repeat 1, but hit a key to remove the selection instead of clicking the mouse. The old highlighted text should still be available as the primary selection. 3. Highlight A's text as in 1. Select tab B and see that the omnibox is updated to B's string and highlighting is removed. Middle-click and confirm that the previously-highlighted text from A is pasted. 4. Select A and left-click in the middle of its string to position the cursor there. Click on tab B and then back on A to check that A's cursor position is restored. 5. Highlight text in A. Select tab B and then highlight text from a different window. Switch back to A and middle-click. The text from the different window, rather than A's previously-highlighted text, should be pasted. BUG=9225

Patch Set 1 #

Total comments: 16

Patch Set 2 : apply review feedback #

Total comments: 8

Patch Set 3 : watch for text-mark changes #

Total comments: 4

Patch Set 4 : free string returned by gtk #

Unified diffs Side-by-side diffs Delta from patch set Stats (+166 lines, -30 lines) Patch
M chrome/browser/autocomplete/autocomplete_edit_view_gtk.h View 1 2 6 chunks +37 lines, -17 lines 0 comments Download
M chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc View 1 2 3 11 chunks +128 lines, -12 lines 0 comments Download
M chrome/browser/gtk/location_bar_view_gtk.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 14 (0 generated)
Evan Martin
dean to review
11 years, 5 months ago (2009-06-29 02:06:33 UTC) #1
Dean McNamee
http://codereview.chromium.org/151006/diff/1/2 File chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc (right): http://codereview.chromium.org/151006/diff/1/2#newcode179 Line 179: GtkTextBuffer* buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text_view_)); text_buffer_ ? http://codereview.chromium.org/151006/diff/1/2#newcode194 Line ...
11 years, 5 months ago (2009-06-29 08:46:06 UTC) #2
Dan Erat
To keep things from getting really complicated, I'm no longer restoring the highlighting when you ...
11 years, 5 months ago (2009-06-30 01:01:50 UTC) #3
Evan Stade
http://codereview.chromium.org/151006/diff/9/1004 File chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc (right): http://codereview.chromium.org/151006/diff/9/1004#newcode502 Line 502: SavePrimarySelection(); so what happens if the user breaks ...
11 years, 5 months ago (2009-06-30 02:20:28 UTC) #4
Dan Erat
http://codereview.chromium.org/151006/diff/9/1004 File chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc (right): http://codereview.chromium.org/151006/diff/9/1004#newcode502 Line 502: SavePrimarySelection(); On 2009/06/30 02:20:28, Evan Stade wrote: > ...
11 years, 5 months ago (2009-06-30 04:44:50 UTC) #5
Dean McNamee
LG. This is what I had ended up doing in my patch (not restoring the ...
11 years, 5 months ago (2009-06-30 08:42:31 UTC) #6
Dean McNamee
Btw, about gtk_widget_get_clipboard, the reason I cached it is just that GTK does a bit ...
11 years, 5 months ago (2009-06-30 08:47:38 UTC) #7
Evan Stade
On 2009/06/30 08:47:38, Dean McNamee wrote: > Btw, about gtk_widget_get_clipboard, the reason I cached it ...
11 years, 5 months ago (2009-06-30 18:17:38 UTC) #8
Dan Erat
Okay, do you guys mind taking one more look? I'm using changes to the text ...
11 years, 5 months ago (2009-06-30 21:24:16 UTC) #9
Dean McNamee
I will review this tomorrow... http://codereview.chromium.org/151006/diff/1012/13 File chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc (right): http://codereview.chromium.org/151006/diff/1012/13#newcode638 Line 638: selected_text_ = std::string(text, ...
11 years, 5 months ago (2009-06-30 21:35:06 UTC) #10
Dan Erat
http://codereview.chromium.org/151006/diff/1012/13 File chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc (right): http://codereview.chromium.org/151006/diff/1012/13#newcode638 Line 638: selected_text_ = std::string(text, text_len); On 2009/06/30 21:35:06, Dean ...
11 years, 5 months ago (2009-06-30 22:10:23 UTC) #11
Evan Stade
lg to me
11 years, 5 months ago (2009-07-01 19:49:30 UTC) #12
Evan Stade
does this also fix <crbug.com/15464>?
11 years, 5 months ago (2009-07-01 19:51:31 UTC) #13
Dan Erat
11 years, 5 months ago (2009-07-01 22:00:33 UTC) #14
On 2009/07/01 19:51:31, Evan Stade wrote:
> does this also fix <crbug.com/15464>?

No, I doesn't (I've added a comment to that bug).

Powered by Google App Engine
This is Rietveld 408576698