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

Issue 22679003: InstantExtended(gtk): Hide top match if told to so. (Closed)

Created:
7 years, 4 months ago by Jered
Modified:
7 years, 3 months ago
CC:
chromium-reviews, James Su, Ilya Sherman, jar (doing other things), asvitkine+watch_chromium.org, David Black
Visibility:
Public.

Description

InstantExtended(gtk): Hide top match if told to so. CL 17114003 and 22410004 added a way for Mac and views to hide the top omnibox match when it is a verbatim match we do not want to show. This implements that for GTK too so it'll work on all desktop platforms. BUG=252823 TEST=Manually. Run with no flags and verify that when you type 'faceb' in the omnibox, the popup shows a search suggestion for 'faceb'. Run again with the flags --enable-instant-extended-api --force-fieldtrials='InstantExtended/Group1 hide_verbatim:1/' and verify that you do not see this suggestion. Also check that with the flags set, hovering on the top suggestion works and that there are no off-by-one problems when clicking on suggestions. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=222186

Patch Set 1 #

Total comments: 2

Patch Set 2 : Rebase. #

Patch Set 3 : Address comment. #

Patch Set 4 : Add unit tests. #

Total comments: 4

Patch Set 5 : Reorder member functions. #

Total comments: 1

Patch Set 6 : Rebase. #

Total comments: 2

Patch Set 7 : Rebase and add check. #

Patch Set 8 : Skip DCHECK in test. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+282 lines, -133 lines) Patch
M chrome/browser/metrics/metrics_log.cc View 1 2 3 4 5 1 chunk +0 lines, -5 lines 1 comment Download
M chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.h View 1 2 3 4 5 4 chunks +24 lines, -5 lines 0 comments Download
M chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.cc View 1 2 3 4 5 6 7 10 chunks +143 lines, -120 lines 0 comments Download
M chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk_unittest.cc View 1 2 3 4 5 5 chunks +111 lines, -0 lines 0 comments Download
M chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.cc View 1 2 3 4 5 1 chunk +4 lines, -3 lines 0 comments Download

Messages

Total messages: 29 (0 generated)
Jered
Please review.
7 years, 4 months ago (2013-08-08 13:45:59 UTC) #1
Evan Stade
seems like this would be a lot more robust and cross-platform if you made it ...
7 years, 4 months ago (2013-08-12 15:47:36 UTC) #2
Jered
On 2013/08/12 15:47:36, Evan Stade wrote: > seems like this would be a lot more ...
7 years, 4 months ago (2013-08-12 16:24:13 UTC) #3
Evan Stade
On 2013/08/12 16:24:13, Jered wrote: > On 2013/08/12 15:47:36, Evan Stade wrote: > > seems ...
7 years, 4 months ago (2013-08-12 16:33:33 UTC) #4
Jered
On 2013/08/12 16:33:33, Evan Stade wrote: > On 2013/08/12 16:24:13, Jered wrote: > > On ...
7 years, 4 months ago (2013-08-12 18:01:09 UTC) #5
Evan Stade
Which line is selected is tracked in the model. I still think you could drop ...
7 years, 4 months ago (2013-08-12 18:15:49 UTC) #6
Jered
On 2013/08/12 18:15:49, Evan Stade wrote: > Which line is selected is tracked in the ...
7 years, 4 months ago (2013-08-14 16:47:07 UTC) #7
Jered
Hey Peter can you chime in on the discussion about whether and how to hide ...
7 years, 4 months ago (2013-08-14 16:47:58 UTC) #8
Peter Kasting
I could see this being implemented both ways. To me it makes sense to implement ...
7 years, 4 months ago (2013-08-14 17:59:44 UTC) #9
Evan Stade
I will defer to those who know the code better, but I strongly believe that ...
7 years, 4 months ago (2013-08-14 19:32:47 UTC) #10
Jered
On 2013/08/14 19:32:47, Evan Stade wrote: > I will defer to those who know the ...
7 years, 4 months ago (2013-08-14 21:16:12 UTC) #11
Jered
https://codereview.chromium.org/22679003/diff/1/chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.cc File chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.cc (right): https://codereview.chromium.org/22679003/diff/1/chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.cc#newcode103 chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.cc:103: gfx::Rect GetRectForLine(size_t line, int width) { On 2013/08/14 19:32:48, ...
7 years, 4 months ago (2013-08-14 21:16:21 UTC) #12
Evan Stade
https://codereview.chromium.org/22679003/diff/18001/chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.cc File chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.cc (right): https://codereview.chromium.org/22679003/diff/18001/chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.cc#newcode558 chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.cc:558: const AutocompleteResult& OmniboxPopupViewGtk::GetResult() const { make the definition order ...
7 years, 4 months ago (2013-08-15 01:05:11 UTC) #13
Jered
https://codereview.chromium.org/22679003/diff/18001/chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.cc File chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.cc (right): https://codereview.chromium.org/22679003/diff/18001/chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.cc#newcode558 chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.cc:558: const AutocompleteResult& OmniboxPopupViewGtk::GetResult() const { On 2013/08/15 01:05:12, Evan ...
7 years, 4 months ago (2013-08-15 16:08:49 UTC) #14
Evan Stade
https://codereview.chromium.org/22679003/diff/24001/chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.cc File chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.cc (right): https://codereview.chromium.org/22679003/diff/24001/chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.cc#newcode187 chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.cc:187: signal_registrar_.reset(); This should not be necessary. I realize you're ...
7 years, 4 months ago (2013-08-15 18:57:29 UTC) #15
Jered
On 2013/08/15 18:57:29, Evan Stade wrote: > https://codereview.chromium.org/22679003/diff/24001/chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.cc > File chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.cc (right): > > https://codereview.chromium.org/22679003/diff/24001/chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.cc#newcode187 ...
7 years, 4 months ago (2013-08-19 22:58:15 UTC) #16
Evan Stade
I landed the other patch. Can you sync this one now? thanks, sorry for the ...
7 years, 3 months ago (2013-08-26 23:31:13 UTC) #17
Jered
Rebased. (Just returned from vacation...)
7 years, 3 months ago (2013-09-04 23:08:30 UTC) #18
Evan Stade
lgtm https://codereview.chromium.org/22679003/diff/33001/chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.cc File chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.cc (right): https://codereview.chromium.org/22679003/diff/33001/chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.cc#newcode247 chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.cc:247: void OmniboxPopupViewGtk::InvalidateLine(size_t line) { perhaps DCHECK_LE(GetHiddenLineCount(), line);
7 years, 3 months ago (2013-09-04 23:33:46 UTC) #19
Jered
https://codereview.chromium.org/22679003/diff/33001/chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.cc File chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.cc (right): https://codereview.chromium.org/22679003/diff/33001/chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.cc#newcode247 chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.cc:247: void OmniboxPopupViewGtk::InvalidateLine(size_t line) { On 2013/09/04 23:33:47, Evan Stade ...
7 years, 3 months ago (2013-09-09 16:26:25 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jered@chromium.org/22679003/35001
7 years, 3 months ago (2013-09-09 16:27:43 UTC) #21
commit-bot: I haz the power
Retried try job too often on chromium_presubmit for step(s) presubmit http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=chromium_presubmit&number=24428
7 years, 3 months ago (2013-09-09 16:42:35 UTC) #22
Jered
+isherman -> metrics_log.cc
7 years, 3 months ago (2013-09-09 16:45:52 UTC) #23
Ilya Sherman
metrics_log.cc lgtm
7 years, 3 months ago (2013-09-09 20:55:59 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jered@chromium.org/22679003/35001
7 years, 3 months ago (2013-09-09 20:56:56 UTC) #25
commit-bot: I haz the power
Retried try job too often on linux_rel for step(s) unit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_rel&number=166434
7 years, 3 months ago (2013-09-09 22:18:04 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jered@chromium.org/22679003/54001
7 years, 3 months ago (2013-09-09 22:49:47 UTC) #27
commit-bot: I haz the power
Change committed as 222186
7 years, 3 months ago (2013-09-10 02:16:18 UTC) #28
Mark P
7 years, 3 months ago (2013-09-14 21:58:44 UTC) #29
Message was sent while issue was closed.
One concern about logging.

https://chromiumcodereview.appspot.com/22679003/diff/54001/chrome/browser/met...
File chrome/browser/metrics/metrics_log.cc (left):

https://chromiumcodereview.appspot.com/22679003/diff/54001/chrome/browser/met...
chrome/browser/metrics/metrics_log.cc:866: #if defined(OS_MACOSX) ||
defined(TOOLKIT_VIEWS)
Is this necessarily true?  We've implemented it for Mac, Views, and GTK.  Does
this mean now it works on Android and iOS?  I don't know how their omnibox is
rendered, but I thought, for instance, that Android has special views code, so
recording ShouldHideTopMatch on Android (when you're not actually hiding the top
match) will be misleading.

Powered by Google App Engine
This is Rietveld 408576698