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

Unified Diff: chrome/browser/ui/cocoa/omnibox/omnibox_popup_cell.mm

Issue 2924303002: Omnibox UI: Fix Cocoa suggestion lines for short lines (again). (Closed)
Patch Set: Fix answers in suggest case Created 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/omnibox/omnibox_popup_cell.mm
diff --git a/chrome/browser/ui/cocoa/omnibox/omnibox_popup_cell.mm b/chrome/browser/ui/cocoa/omnibox/omnibox_popup_cell.mm
index d0f2a2e3f71b5377b2cb766735dc39b8635de12f..2aef7d870d55b5fe9dabe2906f4d4a197ec28045 100644
--- a/chrome/browser/ui/cocoa/omnibox/omnibox_popup_cell.mm
+++ b/chrome/browser/ui/cocoa/omnibox/omnibox_popup_cell.mm
@@ -636,7 +636,8 @@ NSAttributedString* CreateClassifiedAttributedString(
cellFrame, NSOffsetRect(cellFrame, origin.x, origin.y));
renderRect.size.width =
std::min(NSWidth(renderRect), static_cast<CGFloat>(maxWidth));
- renderRect.size.height = std::min(NSWidth(renderRect), kDefaultTextHeight);
+ renderRect.size.height =
+ std::min(NSHeight(renderRect), [attributedString size].height);
if (!NSIsEmptyRect(renderRect)) {
[attributedString drawWithRect:FlipIfRTL(renderRect, cellFrame)
options:NSStringDrawingUsesLineFragmentOrigin |
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698