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

Unified Diff: chrome/browser/ui/views/omnibox/omnibox_result_view.cc

Issue 2091473003: Factor parsing "ln=" to SuggestionAnswer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reorder lines Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/omnibox/omnibox_result_view.cc
diff --git a/chrome/browser/ui/views/omnibox/omnibox_result_view.cc b/chrome/browser/ui/views/omnibox/omnibox_result_view.cc
index e288c4afd52bb6c5355776f9e82587101e5aa60b..f59061a9b3af580dd367a64593d494d72df768f8 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_result_view.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_result_view.cc
@@ -290,8 +290,7 @@ gfx::Size OmniboxResultView::GetPreferredSize() const {
if (!match_.answer)
return gfx::Size(0, GetContentLineHeight());
// An answer implies a match and a description in a large font.
- const auto& text_fields = match_.answer->second_line().text_fields();
- if (text_fields.empty() || !text_fields.front().has_num_lines())
+ if (match_.answer->second_line().num_text_lines() == 1)
return gfx::Size(0, GetContentLineHeight() + GetAnswerLineHeight());
if (!description_rendertext_) {
description_rendertext_ =
« no previous file with comments | « chrome/browser/ui/cocoa/omnibox/omnibox_popup_cell.mm ('k') | components/omnibox/browser/suggestion_answer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698