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

Issue 15001020: InstantExtended: disallow setValue() without omnibox focus. (Closed)

Created:
7 years, 7 months ago by samarth
Modified:
7 years, 6 months ago
Reviewers:
sreeram
CC:
chromium-reviews, melevin+watch_chromium.org, dhollowa+watch_chromium.org, dougw+watch_chromium.org, sreeram, gideonwald, dominich, David Black, samarth+watch_chromium.org, kmadhusu+watch_chromium.org, Jered, Anuj
Visibility:
Public.

Description

InstantExtended: disallow setValue() without omnibox focus. Don't allow the the page to call setValue() if the omnibox doesn't have focus. This breaks the "clearing out gray text" usecase (when the user clicks on the suggestion corresponding to a gray-text completion), but we aren't worried about it because we are aiming for a launch without any gray text. We'll re-enable setValue() in the general case when we handle it properly. Also disable the focus() API to prevent a trivial workaround (where the page focuses the omnibox and then calls setValue). BUG=229193 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=203035

Patch Set 1 #

Patch Set 2 : Also disable focus. #

Patch Set 3 : Rebase. #

Total comments: 2

Patch Set 4 : Rebase. #

Patch Set 5 : Take out exception for gray text. #

Total comments: 2

Patch Set 6 : Fix typo. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+18 lines, -1 line) Patch
M chrome/browser/ui/search/instant_controller.cc View 1 2 3 4 5 2 chunks +18 lines, -1 line 0 comments Download

Messages

Total messages: 9 (0 generated)
samarth
I distilled this down to the minimal change we can make to prevent arbitrary setValue ...
7 years, 7 months ago (2013-05-09 22:05:03 UTC) #1
sreeram
There's still a race: User types something. Suggestions are showing. They arrow-down and focus the ...
7 years, 7 months ago (2013-05-09 22:20:18 UTC) #2
samarth
As discussed offline, I think we can live with the race condition in M28. Also ...
7 years, 7 months ago (2013-05-16 17:47:08 UTC) #3
sreeram
https://codereview.chromium.org/15001020/diff/7001/chrome/browser/ui/search/instant_controller.cc File chrome/browser/ui/search/instant_controller.cc (right): https://codereview.chromium.org/15001020/diff/7001/chrome/browser/ui/search/instant_controller.cc#newcode1303 chrome/browser/ui/search/instant_controller.cc:1303: suggestion.text == last_omnibox_text_ + last_suggestion_.text)) { Does this work ...
7 years, 6 months ago (2013-05-28 22:45:02 UTC) #4
samarth
PTAL. Thanks, Samarth https://codereview.chromium.org/15001020/diff/7001/chrome/browser/ui/search/instant_controller.cc File chrome/browser/ui/search/instant_controller.cc (right): https://codereview.chromium.org/15001020/diff/7001/chrome/browser/ui/search/instant_controller.cc#newcode1303 chrome/browser/ui/search/instant_controller.cc:1303: suggestion.text == last_omnibox_text_ + last_suggestion_.text)) { ...
7 years, 6 months ago (2013-05-29 19:03:46 UTC) #5
sreeram
lgtm https://codereview.chromium.org/15001020/diff/15001/chrome/browser/ui/search/instant_controller.cc File chrome/browser/ui/search/instant_controller.cc (right): https://codereview.chromium.org/15001020/diff/15001/chrome/browser/ui/search/instant_controller.cc#newcode1340 chrome/browser/ui/search/instant_controller.cc:1340: // should be setting search terms on the ...
7 years, 6 months ago (2013-05-29 19:36:22 UTC) #6
samarth
Thanks for the review! https://codereview.chromium.org/15001020/diff/15001/chrome/browser/ui/search/instant_controller.cc File chrome/browser/ui/search/instant_controller.cc (right): https://codereview.chromium.org/15001020/diff/15001/chrome/browser/ui/search/instant_controller.cc#newcode1340 chrome/browser/ui/search/instant_controller.cc:1340: // should be setting search ...
7 years, 6 months ago (2013-05-29 23:42:38 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/samarth@chromium.org/15001020/20001
7 years, 6 months ago (2013-05-29 23:43:24 UTC) #8
commit-bot: I haz the power
7 years, 6 months ago (2013-05-30 03:23:44 UTC) #9
Message was sent while issue was closed.
Change committed as 203035

Powered by Google App Engine
This is Rietveld 408576698