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

Unified Diff: printing/printed_document.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: Fix win and mac issues Created 8 years, 12 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 side-by-side diff with in-line comments
Download patch
Index: printing/printed_document.cc
diff --git a/printing/printed_document.cc b/printing/printed_document.cc
index 77771c442add978351c06be6a83519261710035e..c4f225471ba7fac8f35923584811a94d75154233 100644
--- a/printing/printed_document.cc
+++ b/printing/printed_document.cc
@@ -74,7 +74,8 @@ void PrintedDocument::SetPage(int page_number,
new PrintedPage(page_number + 1,
metafile,
paper_size,
- page_rect));
+ page_rect,
+ shrink));
{
base::AutoLock lock(lock_);
mutable_.pages_[page_number] = page;
@@ -83,12 +84,6 @@ void PrintedDocument::SetPage(int page_number,
if (page_number < mutable_.first_page)
mutable_.first_page = page_number;
#endif
-
- if (mutable_.shrink_factor == 0) {
- mutable_.shrink_factor = shrink;
- } else {
- DCHECK_EQ(mutable_.shrink_factor, shrink);
- }
}
DebugDump(*page);
}
@@ -208,8 +203,7 @@ const FilePath& PrintedDocument::debug_dump_path() {
PrintedDocument::Mutable::Mutable(PrintedPagesSource* source)
: source_(source),
expected_page_count_(0),
- page_count_(0),
- shrink_factor(0) {
+ page_count_(0) {
#if defined(OS_POSIX) && !defined(OS_MACOSX)
first_page = INT_MAX;
#endif

Powered by Google App Engine
This is Rietveld 408576698