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

Unified Diff: chrome/browser/ui/cocoa/autofill/autofill_section_container.mm

Issue 21724002: rAc: try really hard not to ellipsize addresses (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix android Created 7 years, 4 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/cocoa/autofill/autofill_section_container.mm
diff --git a/chrome/browser/ui/cocoa/autofill/autofill_section_container.mm b/chrome/browser/ui/cocoa/autofill/autofill_section_container.mm
index 08ab7d0d8f3ede87b129c3a724fc1ab651c6e7f4..284aa77083357abba3f42ec71872157f8db3d2ee 100644
--- a/chrome/browser/ui/cocoa/autofill/autofill_section_container.mm
+++ b/chrome/browser/ui/cocoa/autofill/autofill_section_container.mm
@@ -284,20 +284,20 @@ bool CompareInputRows(const autofill::DetailInput* input1,
- (void)updateSuggestionState {
const autofill::SuggestionState& suggestionState =
controller_->SuggestionStateForSection(section_);
- bool showSuggestions = !suggestionState.text.empty();
+ // TODO(estade): use |horizontally_compact_text| when
+ // |vertically_compact_text| doesn't fit.
+ const base::string16& text = suggestionState.vertically_compact_text;
+ bool showSuggestions = suggestionState.show;
[[suggestContainer_ view] setHidden:!showSuggestions];
[inputs_ setHidden:showSuggestions];
- string16 line1;
- string16 line2;
- BreakSuggestionText(suggestionState.text, &line1, &line2);
+ base::string16 line1;
+ base::string16 line2;
+ BreakSuggestionText(text, &line1, &line2);
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
- gfx::Font font = rb.GetFont(ui::ResourceBundle::BaseFont).DeriveFont(
- 0, suggestionState.text_style);
[suggestContainer_ setSuggestionText:base::SysUTF16ToNSString(line1)
- line2:base::SysUTF16ToNSString(line2)
- withFont:font.GetNativeFont()];
+ line2:base::SysUTF16ToNSString(line2)];
[suggestContainer_ setIcon:suggestionState.icon.AsNSImage()];
if (!suggestionState.extra_text.empty()) {
NSString* extraText =

Powered by Google App Engine
This is Rietveld 408576698