diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-04 20:46:14 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-04 20:46:14 +0000 |
commit | 13658c4b2835a3155efa6eb2c3c6ff8fef2b7fa5 (patch) | |
tree | ada8d64cbd2fd12c7248cca648e47ebd63e6462a /chrome/browser/ui/views/autocomplete | |
parent | cd4857b64f3e3b10ebfa3f44c38af0dc7376d5bb (diff) | |
download | chromium_src-13658c4b2835a3155efa6eb2c3c6ff8fef2b7fa5.zip chromium_src-13658c4b2835a3155efa6eb2c3c6ff8fef2b7fa5.tar.gz chromium_src-13658c4b2835a3155efa6eb2c3c6ff8fef2b7fa5.tar.bz2 |
Change Font.GetStringWidth() to take string16 instead of wstring.
do a bunch of string fixes along the way.
BUG=none
TEST=trybots
Review URL: http://codereview.chromium.org/5985007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70440 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/views/autocomplete')
-rw-r--r-- | chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc b/chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc index fa3ab68..857db9d 100644 --- a/chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc +++ b/chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc @@ -422,7 +422,7 @@ AutocompleteResultView::AutocompleteResultView( model_index_(model_index), normal_font_(font), bold_font_(bold_font), - ellipsis_width_(font.GetStringWidth(kEllipsis)), + ellipsis_width_(font.GetStringWidth(WideToUTF16(kEllipsis))), mirroring_context_(new MirroringContext()), match_(NULL, 0, false, AutocompleteMatch::URL_WHAT_YOU_TYPED) { CHECK(model_index >= 0); @@ -614,7 +614,8 @@ int AutocompleteResultView::DrawString( else current_data->color = GetColor(state, force_dim ? DIMMED_TEXT : TEXT); current_data->pixel_width = - current_data->font->GetStringWidth(current_data->text); + current_data->font->GetStringWidth( + WideToUTF16Hack(current_data->text)); current_run->pixel_width += current_data->pixel_width; } DCHECK(!current_run->classifications.empty()); @@ -740,7 +741,7 @@ void AutocompleteResultView::Elide(Runs* runs, int remaining_width) const { (prior_classification->font == &normal_font_))) j->font = &normal_font_; - j->pixel_width = j->font->GetStringWidth(elided_text); + j->pixel_width = j->font->GetStringWidth(WideToUTF16Hack(elided_text)); // Erase any other classifications that come after the elided one. i->classifications.erase(j.base(), i->classifications.end()); |