summaryrefslogtreecommitdiffstats
path: root/printing/pdf_metafile_cg_mac.cc
diff options
context:
space:
mode:
authoraayushkumar@chromium.org <aayushkumar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-26 19:22:29 +0000
committeraayushkumar@chromium.org <aayushkumar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-26 19:22:29 +0000
commit9d42d072eb62233a44668aa49426c6f3616b5f09 (patch)
tree7c12a8aeb3ce8098f08e46dc5307c72882ad4ff1 /printing/pdf_metafile_cg_mac.cc
parentebce09f8561211765ac3542e3c06f423280fbf14 (diff)
downloadchromium_src-9d42d072eb62233a44668aa49426c6f3616b5f09.zip
chromium_src-9d42d072eb62233a44668aa49426c6f3616b5f09.tar.gz
chromium_src-9d42d072eb62233a44668aa49426c6f3616b5f09.tar.bz2
Fixed bug in which the margin sizes vary (depending on the scale factor) while printing on the mac.
BUG=none TEST=Ensure that the margin sizes while printing are consistent across different web pages on mac. Review URL: http://codereview.chromium.org/7471052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94144 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'printing/pdf_metafile_cg_mac.cc')
-rw-r--r--printing/pdf_metafile_cg_mac.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/printing/pdf_metafile_cg_mac.cc b/printing/pdf_metafile_cg_mac.cc
index 6206552..0722231 100644
--- a/printing/pdf_metafile_cg_mac.cc
+++ b/printing/pdf_metafile_cg_mac.cc
@@ -127,13 +127,13 @@ bool PdfMetafileCg::StartPage(const gfx::Size& page_size,
page_is_open_ = true;
CGContextSaveGState(context_);
+ // Move to the context origin.
+ CGContextTranslateCTM(context_, content_area.x(), -content_area.y());
+
// Flip the context.
CGContextTranslateCTM(context_, 0, height);
CGContextScaleCTM(context_, scale_factor, -scale_factor);
- // Move to the context origin.
- CGContextTranslateCTM(context_, content_area.x(), content_area.y());
-
return context_.get() != NULL;
}