New issue
Advanced search Search tips

Issue 667012 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 2
Type: Bug-Regression



Sign in to add a comment

PrintPagesAsRasterPDF results in blank print preview/printed page

Project Member Reported by rbpotter@chromium.org, Nov 19 2016

Issue description

Version: 57.0.2925.0 (Developer Build) (64-bit)
OS: Linux

What steps will reproduce the problem?
(1) Modify pdfium_engine.cc so that PrintPages always calls PrintPagesAsRasterPDF (makes it easier to reproduce)
(2) Build and run Chrome
(3) Navigate to any PDF
(4) Ctrl+P

What is the expected result?
See preview of PDF document

What happens instead?
See preview of completely blank PDF document
 
Cc: thestig@chromium.org
Bisected and found that this is the CL that introduced the bug: http://crrev.com/2489423002

After further investigation, it looks like the modifications to SetImage in http://crrev.com/2489423002 on lines 341-343 cause m_pOwnedStream to be set when previously it was null. This results in IsInline() returning true in src/third_party/pdfium/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp on line 99, so ProcessImage returns early and the image never gets set in the document. 
Cc: tsepez@chromium.org
Labels: -Type-Bug -Pri-3 M-56 OS-Chrome OS-Linux OS-Mac OS-Windows Pri-2 Type-Bug-Regression
Owner: thestig@chromium.org
Status: Started (was: Available)
https://codereview.chromium.org/2513273003/ - fix
https://codereview.chromium.org/2508203007/ - regression test
Attached is a test PDF to demonstrate the bug. It views as all black, and should print preview as all black, but this bug causes it to print preview as all white.
black.pdf
1.1 KB Download
Project Member

Comment 5 by bugdroid1@chromium.org, Nov 21 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0fe84b2f0cf91f6fe8e31265bca6fe80c8bd1eba

commit 0fe84b2f0cf91f6fe8e31265bca6fe80c8bd1eba
Author: pdfium-deps-roller <pdfium-deps-roller@chromium.org>
Date: Mon Nov 21 20:34:54 2016

Roll src/third_party/pdfium/ 14d3a9e14..738be2b59 (6 commits).

https://pdfium.googlesource.com/pdfium.git/+log/14d3a9e14e91..738be2b591ad

$ git log 14d3a9e14..738be2b59 --date=short --no-merges --format='%ad %ae %s'
2016-11-21 dsinclair Remove FWL_GetThemeLayout
2016-11-21 dsinclair Remove theme id from themeproviders
2016-11-21 dsinclair Fixup lint flags.
2016-11-21 thestig Fix CPDFImage::IsInline().
2016-11-21 dsinclair Split fwl/core class pt I.
2016-11-21 dsinclair Remove unused FWL_WGTSTYLE_Icon

BUG= 667012 

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, see:
http://www.chromium.org/developers/tree-sheriffs/sheriff-details-chromium#TOC-Failures-due-to-DEPS-rolls

TBR=dsinclair@chromium.org

Review-Url: https://codereview.chromium.org/2518113002
Cr-Commit-Position: refs/heads/master@{#433630}

[modify] https://crrev.com/0fe84b2f0cf91f6fe8e31265bca6fe80c8bd1eba/DEPS

Labels: Merge-Request-56
I verified this is fixed at ToT.

Comment 7 by dimu@chromium.org, Nov 21 2016

Labels: -Merge-Request-56 Merge-Review-56 Hotlist-Merge-Review
[Automated comment] DEPS changes referenced in bugdroid comments, needs manual review.
To be specific, I would like to cherrypick https://pdfium.googlesource.com/pdfium.git/+/7daa6fb286d1b5d65f99521f3314083e86d93e3f for PDFium's 2924 branch.
Project Member

Comment 10 by bugdroid1@chromium.org, Nov 22 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3eceddd9a5df7b6c27532aaade8df09edf07b88b

commit 3eceddd9a5df7b6c27532aaade8df09edf07b88b
Author: pdfium-deps-roller <pdfium-deps-roller@chromium.org>
Date: Tue Nov 22 03:30:05 2016

Roll src/third_party/pdfium/ bcd3e538f..37b6d1479 (8 commits).

https://pdfium.googlesource.com/pdfium.git/+log/bcd3e538f170..37b6d1479b16

$ git log bcd3e538f..37b6d1479 --date=short --no-merges --format='%ad %ae %s'
2016-11-21 dsinclair Split fwl/core class pt II.
2016-11-21 thestig Use more unique_ptrs in CPDF_Image.
2016-11-21 tsepez Remove some WrapUnique() calls by returing unique_ptrs
2016-11-21 thestig Add a regression test for rasterizing PDFs.
2016-11-21 npm Clean up CFGAS_GEFont
2016-11-21 thestig Remove iCompress parameter to CPDF_Image::SetImage().
2016-11-21 thestig Make CPDF_ImageObject::m_Matrix private.
2016-11-21 tsepez Remove some void* usage in fx_crypt.cpp

BUG= 667012 

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, see:
http://www.chromium.org/developers/tree-sheriffs/sheriff-details-chromium#TOC-Failures-due-to-DEPS-rolls

TBR=dsinclair@chromium.org

Review-Url: https://codereview.chromium.org/2520053004
Cr-Commit-Position: refs/heads/master@{#433772}

[modify] https://crrev.com/3eceddd9a5df7b6c27532aaade8df09edf07b88b/DEPS

Labels: -Merge-Review-56 Merge-Approved-56
Approved for merge into M56
Cc: -thestig@chromium.org
Labels: -Hotlist-Merge-Review -Merge-Approved-56 merge-merged-2924
Status: Fixed (was: Started)
Merged: https://pdfium.googlesource.com/pdfium/+/adc4a73645ff20abc5eb73ffc38e44b92ff651b2

Sign in to add a comment