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

Issue 1060613004: Fix a variety of omnibox bugs around zerosuggest, the escape key, or both. (Closed)

Created:
5 years, 8 months ago by Peter Kasting
Modified:
5 years, 8 months ago
Reviewers:
H Fung, Mark P
CC:
chromium-reviews, tfarina, James Su
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix a variety of omnibox bugs around zerosuggest, the escape key, or both. * When we changed to OmniboxViewViews, we broke the behavior that the omnibox could handle the escape key before it was processed as a "stop" accelerator. Instead, Chrome trunk current processes escape as stop first (and exclusively), then if/when there is no load to stop passes it through to the omnibox. Restore the other order, though not precisely with the old behavior. Other than when arrowing through the popup (in which cases escape just resets to the top entry): ** Escape when not editing (including when zerosuggest is open) will always both reset the omnibox and stop any underlying load. ** Otherwise, escape will reset the omnibox but not stop any load. * As part of the above fix, we now ensure that escape will always close any open zerosuggest window regardless of which entry in it might be selected or what the omnibox caret/selection currently is. * When unfocusing the omnibox causes a zerosuggest popup to close, we also force the omnibox to reset. This ensures that, if zerosuggest caused us to temporarily avoid displaying updates to the underlying page URL, they will now be shown. When combined with the changes above, this should mean that it's impossible to leave zerosuggest mode but still be stuck seeing an out-of-date URL. * When copying the text of any item in the zerosuggest popup, including the first one, and regardless of whether the visible URL is up-to-date, ensure that the clipboard actually gets the correct text. Previously, select-all + copy on any zerosuggest item would copy whatever the current underlying URL of the page was. BUG=158913, 423181, 466565 TEST=See bugs Committed: https://crrev.com/e8585ee081a2b71c6a8af666be635de66b63f2f3 Cr-Commit-Position: refs/heads/master@{#324017}

Patch Set 1 #

Patch Set 2 : Safer escape handling method #

Total comments: 4

Patch Set 3 : Comment fixes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+65 lines, -33 lines) Patch
M chrome/browser/ui/omnibox/omnibox_edit_model.h View 1 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/ui/omnibox/omnibox_edit_model.cc View 1 2 2 chunks +47 lines, -23 lines 0 comments Download
M chrome/browser/ui/omnibox/omnibox_view_browsertest.cc View 1 2 chunks +1 line, -9 lines 0 comments Download
M chrome/browser/ui/views/omnibox/omnibox_view_views.cc View 1 2 2 chunks +12 lines, -1 line 0 comments Download

Messages

Total messages: 19 (7 generated)
Peter Kasting
This is sort of a conglomeration of several independent fixes, but I was working on ...
5 years, 8 months ago (2015-04-04 01:21:53 UTC) #2
Mark P
drive-by comment: can you fix and re-enable OmniboxViewTest.Escape (bug 158913) in the process? It looks ...
5 years, 8 months ago (2015-04-06 18:18:19 UTC) #3
H Fung
lgtm https://codereview.chromium.org/1060613004/diff/20001/chrome/browser/ui/omnibox/omnibox_edit_model.cc File chrome/browser/ui/omnibox/omnibox_edit_model.cc (right): https://codereview.chromium.org/1060613004/diff/20001/chrome/browser/ui/omnibox/omnibox_edit_model.cc#newcode1034 chrome/browser/ui/omnibox/omnibox_edit_model.cc:1034: // normal editing or zerosuggest, is closed, and ...
5 years, 8 months ago (2015-04-07 00:38:23 UTC) #4
Peter Kasting
On 2015/04/06 18:18:19, Mark P wrote: > drive-by comment: can you fix and re-enable OmniboxViewTest.Escape ...
5 years, 8 months ago (2015-04-07 02:18:08 UTC) #5
Peter Kasting
https://codereview.chromium.org/1060613004/diff/20001/chrome/browser/ui/omnibox/omnibox_edit_model.cc File chrome/browser/ui/omnibox/omnibox_edit_model.cc (right): https://codereview.chromium.org/1060613004/diff/20001/chrome/browser/ui/omnibox/omnibox_edit_model.cc#newcode1034 chrome/browser/ui/omnibox/omnibox_edit_model.cc:1034: // normal editing or zerosuggest, is closed, and the ...
5 years, 8 months ago (2015-04-07 02:18:17 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1060613004/40001
5 years, 8 months ago (2015-04-07 02:18:42 UTC) #10
commit-bot: I haz the power
No LGTM from a valid reviewer yet. Only full committers are accepted. Even if an ...
5 years, 8 months ago (2015-04-07 02:18:45 UTC) #12
Peter Kasting
Mark, Harry's r+ isn't sufficient to land this. Can you review?
5 years, 8 months ago (2015-04-07 02:20:28 UTC) #14
Mark P
lgtm
5 years, 8 months ago (2015-04-07 05:25:55 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1060613004/40001
5 years, 8 months ago (2015-04-07 05:57:32 UTC) #17
commit-bot: I haz the power
Committed patchset #3 (id:40001)
5 years, 8 months ago (2015-04-07 07:01:27 UTC) #18
commit-bot: I haz the power
5 years, 8 months ago (2015-04-07 07:02:28 UTC) #19
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/e8585ee081a2b71c6a8af666be635de66b63f2f3
Cr-Commit-Position: refs/heads/master@{#324017}

Powered by Google App Engine
This is Rietveld 408576698