diff options
author | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-03 23:40:27 +0000 |
---|---|---|
committer | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-03 23:40:27 +0000 |
commit | da4eefdf3f571bd8835a2be18b267a7685c75cbd (patch) | |
tree | 465c74a28a33ebc6079e697a791313490db9fe5b /printing/printed_document_cairo.cc | |
parent | 6c1319541aee6ff89c06457b46d46bbcbcfe868f (diff) | |
download | chromium_src-da4eefdf3f571bd8835a2be18b267a7685c75cbd.zip chromium_src-da4eefdf3f571bd8835a2be18b267a7685c75cbd.tar.gz chromium_src-da4eefdf3f571bd8835a2be18b267a7685c75cbd.tar.bz2 |
Linux Printing: Properly print a subset of all pages.
BUG=59732
TEST=Open a 10 PDF, print pages 6,7,8 or pages 6-8.
Review URL: http://codereview.chromium.org/6592093
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76835 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'printing/printed_document_cairo.cc')
-rw-r--r-- | printing/printed_document_cairo.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/printing/printed_document_cairo.cc b/printing/printed_document_cairo.cc index 9992bc6..cb9bbd0 100644 --- a/printing/printed_document_cairo.cc +++ b/printing/printed_document_cairo.cc @@ -24,9 +24,12 @@ void PrintedDocument::RenderPrintedPage( DCHECK(context); #if !defined(OS_CHROMEOS) - if (page.page_number() == 1) { - reinterpret_cast<PrintingContextCairo*>(context)->PrintDocument( - page.native_metafile()); + { + base::AutoLock lock(lock_); + if (page.page_number() - 1 == mutable_.first_page) { + reinterpret_cast<PrintingContextCairo*>(context)->PrintDocument( + page.native_metafile()); + } } #endif // !defined(OS_CHROMEOS) } |