summaryrefslogtreecommitdiffstats
path: root/chrome/browser/printing/printed_document.cc
diff options
context:
space:
mode:
authormaruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-04 16:09:52 +0000
committermaruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-04 16:09:52 +0000
commit4345680d8759909e0e7324f745512722cee6430c (patch)
tree9b54a4f345c902c401e891da9b07cfad6c4c0369 /chrome/browser/printing/printed_document.cc
parent1d00e09825a51a843ed86269a70675f2721d4e66 (diff)
downloadchromium_src-4345680d8759909e0e7324f745512722cee6430c.zip
chromium_src-4345680d8759909e0e7324f745512722cee6430c.tar.gz
chromium_src-4345680d8759909e0e7324f745512722cee6430c.tar.bz2
Use ElideUrl for urls. It is much nicer.
Review URL: http://codereview.chromium.org/9265 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4600 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/printing/printed_document.cc')
-rw-r--r--chrome/browser/printing/printed_document.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/chrome/browser/printing/printed_document.cc b/chrome/browser/printing/printed_document.cc
index 4bb9de6..466ff00 100644
--- a/chrome/browser/printing/printed_document.cc
+++ b/chrome/browser/printing/printed_document.cc
@@ -311,8 +311,13 @@ void PrintedDocument::PrintHeaderFooter(HDC context,
break;
}
- if (string_size.width() > bounding.width())
- output = gfx::ElideText(output, font, bounding.width());
+ if (string_size.width() > bounding.width()) {
+ if (line == PageOverlays::kUrl) {
+ output = gfx::ElideUrl(url(), font, bounding.width(), std::wstring());
+ } else {
+ output = gfx::ElideText(output, font, bounding.width());
+ }
+ }
// Save the state (again) for the clipping region.
int saved_state = SaveDC(context);