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

Issue 12450022: Don't call AcceptCurrentInstantPreview() when the user hits Tab. (Closed)

Created:
7 years, 9 months ago by sreeram
Modified:
7 years, 9 months ago
Reviewers:
Peter Kasting
CC:
chromium-reviews, tfarina, James Su
Visibility:
Public.

Description

Don't call AcceptCurrentInstantPreview() when the user hits Tab. This call is meant to commit the Instant overlay (preview). However, the overlay never shows if the omnibox dropdown is not open. So, either the Tab is handled by the omnibox edit (to enter keyword mode or to move down the list of dropdown suggestions) or there's no overlay to commit. I.e., this call never succeeds. So, it's entirely useless and can be removed. Removing it does help fix a bug, though. In extended mode, Instant could be talking to the active tab instead of an overlay, with the dropdown closed. Here, calling AcceptCurrentInstantPreview() when the user hits Tab leads to InstantController::CommitIfPossible(INSTANT_COMMIT_PRESSED_ENTER), so Instant wrongly thinks the user hit Enter and calls "Submit(query)" on the active tab. The bug only occurs on non-Aura Windows, because in Aura, Tab doesn't cause AcceptCurrentInstantPreview() to be called anyway. So, I've just removed this call altogether, from GTK and Win too. BUG=179974 R=pkasting@chromium.org TEST=See bug. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=188281

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+0 lines, -18 lines) Patch
M chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.cc View 1 chunk +0 lines, -3 lines 0 comments Download
M chrome/browser/ui/omnibox/omnibox_edit_model.h View 1 chunk +0 lines, -4 lines 0 comments Download
M chrome/browser/ui/omnibox/omnibox_edit_model.cc View 1 chunk +0 lines, -5 lines 0 comments Download
M chrome/browser/ui/views/location_bar/location_bar_view.cc View 1 chunk +0 lines, -6 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
sreeram
Please review.
7 years, 9 months ago (2013-03-14 22:08:59 UTC) #1
Peter Kasting
LGTM
7 years, 9 months ago (2013-03-15 01:33:36 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sreeram@chromium.org/12450022/1
7 years, 9 months ago (2013-03-15 01:45:42 UTC) #3
commit-bot: I haz the power
7 years, 9 months ago (2013-03-15 07:19:44 UTC) #4
Message was sent while issue was closed.
Change committed as 188281

Powered by Google App Engine
This is Rietveld 408576698