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

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: SuggestionAnswer::SecondLineSize -> ImageLine::TextNumLines 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..b05a496e021fce46e263be34fd44dc4a17077c7a 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().TextNumLines() == 1)
return gfx::Size(0, GetContentLineHeight() + GetAnswerLineHeight());
if (!description_rendertext_) {
description_rendertext_ =

Powered by Google App Engine
This is Rietveld 408576698