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

Side by Side Diff: printing/printed_document_win.cc

Issue 8585017: PrintPreview: Honor the print media page size and margin values. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added one more test Created 8 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « printing/printed_document.cc ('k') | printing/printed_page.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "printing/printed_document.h" 5 #include "printing/printed_document.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "printing/page_number.h" 8 #include "printing/page_number.h"
9 #include "printing/printed_pages_source.h" 9 #include "printing/printed_pages_source.h"
10 #include "printing/printed_page.h" 10 #include "printing/printed_page.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 DCHECK_NE(saved_state, 0); 60 DCHECK_NE(saved_state, 0);
61 61
62 // Setup the matrix to translate and scale to the right place. Take in 62 // Setup the matrix to translate and scale to the right place. Take in
63 // account the actual shrinking factor. 63 // account the actual shrinking factor.
64 // Note that the printing output is relative to printable area of the page. 64 // Note that the printing output is relative to printable area of the page.
65 // That is 0,0 is offset by PHYSICALOFFSETX/Y from the page. 65 // That is 0,0 is offset by PHYSICALOFFSETX/Y from the page.
66 SimpleModifyWorldTransform( 66 SimpleModifyWorldTransform(
67 context, 67 context,
68 content_area.x() - page_setup.printable_area().x(), 68 content_area.x() - page_setup.printable_area().x(),
69 content_area.y() - page_setup.printable_area().y(), 69 content_area.y() - page_setup.printable_area().y(),
70 mutable_.shrink_factor); 70 page.shrink_factor());
71 71
72 if (!page.metafile()->SafePlayback(context)) { 72 if (!page.metafile()->SafePlayback(context)) {
73 NOTREACHED(); 73 NOTREACHED();
74 } 74 }
75 75
76 BOOL res = RestoreDC(context, saved_state); 76 BOOL res = RestoreDC(context, saved_state);
77 DCHECK_NE(res, 0); 77 DCHECK_NE(res, 0);
78 } 78 }
79 79
80 int res = RestoreDC(context, saved_state); 80 int res = RestoreDC(context, saved_state);
81 DCHECK_NE(res, 0); 81 DCHECK_NE(res, 0);
82 } 82 }
83 83
84 } // namespace printing 84 } // namespace printing
OLDNEW
« no previous file with comments | « printing/printed_document.cc ('k') | printing/printed_page.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698