summaryrefslogtreecommitdiffstats
path: root/printing/page_setup.h
diff options
context:
space:
mode:
authorsverrir@chromium.org <sverrir@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-13 14:58:18 +0000
committersverrir@chromium.org <sverrir@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-13 14:58:18 +0000
commitbe3b19a50ec04d881b3d11ae3c7aac4e7cab4261 (patch)
tree49e829ce8b8e532a06e7c25d136014acd2f1136e /printing/page_setup.h
parent76450600208313cadd05b239123336acbf6620e7 (diff)
downloadchromium_src-be3b19a50ec04d881b3d11ae3c7aac4e7cab4261.zip
chromium_src-be3b19a50ec04d881b3d11ae3c7aac4e7cab4261.tar.gz
chromium_src-be3b19a50ec04d881b3d11ae3c7aac4e7cab4261.tar.bz2
Fix print margins. This fixes multiple issues that caused incorrect offsets on printers that had a non-printable area (like most physical printers do).
Two basic problems fixed. Firstly the margins where incorrectly calculated and secondly there was missing an offset int the rendering code (PHYSICALOFFSETX/Y is 0,0 when printing). To track this down I added code to print out all relevant margins for visual inspection (turned off by default). Chrome now prints using correctly calculated margins and is perfectly aligned on the page! BUG=http://crbug.com/947, http://crbug.com/1566 TEST=Printing on various printers. Review URL: http://codereview.chromium.org/155382 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20482 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'printing/page_setup.h')
-rw-r--r--printing/page_setup.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/printing/page_setup.h b/printing/page_setup.h
index 101b128..2ae984b 100644
--- a/printing/page_setup.h
+++ b/printing/page_setup.h
@@ -49,6 +49,7 @@ class PageSetup {
const gfx::Size& physical_size() const { return physical_size_; }
const gfx::Rect& overlay_area() const { return overlay_area_; }
const gfx::Rect& content_area() const { return content_area_; }
+ const gfx::Rect& printable_area() const { return printable_area_; }
const PageMargins& effective_margins() const {
return effective_margins_;
}