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

Unified Diff: chrome/browser/autocomplete/autocomplete_edit_view_mac.mm

Issue 115334: Use the Mac omnibox field's font as the basis for the fonts used in the field and popup. (Closed)
Patch Set: Address Pink's comments. Created 11 years, 7 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 | chrome/browser/autocomplete/autocomplete_popup_view_mac.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autocomplete/autocomplete_edit_view_mac.mm
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm b/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm
index d66c4cc66650c1b62ad564563ab614693df24cdb..dc1a6f5eac8c87bc9e7c6ccc497db3fea8665391 100644
--- a/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm
+++ b/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm
@@ -239,9 +239,14 @@ void AutocompleteEditViewMac::ClosePopup() {
void AutocompleteEditViewMac::UpdateAndStyleText(
const std::wstring& display_text, size_t user_text_length) {
+ NSDictionary* attributes = [NSDictionary dictionaryWithObjectsAndKeys:
+ [field_ font], NSFontAttributeName,
+ nil];
NSString* ss = base::SysWideToNSString(display_text);
NSMutableAttributedString* as =
- [[[NSMutableAttributedString alloc] initWithString:ss] autorelease];
+ [[[NSMutableAttributedString alloc] initWithString:ss
+ attributes:attributes]
+ autorelease];
url_parse::Parsed parts;
AutocompleteInput::Parse(display_text, model_->GetDesiredTLD(),
« no previous file with comments | « no previous file | chrome/browser/autocomplete/autocomplete_popup_view_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698