Closed Bug 1665064 Opened 5 years ago Closed 5 years ago

Print preview shows background images, even though it's disselected

Categories

(Core :: Print Preview, defect, P2)

defect

Tracking

()

VERIFIED FIXED
82 Branch
Tracking Status
firefox82 --- verified

People

(Reporter: mbalfanz, Assigned: emilio)

References

Details

(Whiteboard: [print2020_v82][old-ui-])

Attachments

(2 files)

STR:

  1. Open about:newtab
  2. Open the print dialog
  3. Select Save to PDF as destination
  4. Hit save and observe the generated PDF document

ER: print preview and PDF should show a similar result
AR: the PDF does no contain images that are shown in the print preview

about:newtab uses background-image to display the top-site icons. This is also a common practice on many other websites, e.g. to place logos in the header. I observed that those situations get confusing, because the print preview shows those images, but the resulting print does not.

Selecting the "print backgrounds" option shows all images as expected.

Component: Printing: Output → Print Preview
Summary: Images missing when creating PDF from about:newtab → Print preview shows background images, even though it's disselected

Finding some more examples, like the footer on https://www.mozilla.org/en-US/firefox/developer/

The print preview shows an unreadable result, because it contains the background-image. The generated PDF is perfectly fine.

I think it would be best if the preview ignores background images (and makes the necessary text color adjustment) the same way the print output does, so I moved the bug to the "Print Preview" component.

Yeah, looks borked.

Assignee: nobody → emilio
Severity: -- → S2
Priority: -- → P2

Can you confirm that disabling webrender makes it work?

Flags: needinfo?(mbalfanz)

We usually suppress background images in
nsCSSRendering::PaintStyleImageLayerWithSC, but that codepath isn't hit
by WebRender, so instead do it during display list building, the same
way we suppress background colors.

Can't confirm. Here's a screenshot of me running a fresh profile on OS X without webrender

Flags: needinfo?(mbalfanz)

Whoops, scratch that.

I can confirm that it works as expected when running Firefox with MOZ_WEBRENDER=0

Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a572a639204f Honor print background image settings on WebRender too. r=kats,jwatt
Pushed by nbeleuzu@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/01991b20e8a2 Honor print background image settings on WebRender too. r=kats,jwatt CLOSED TREE

Re-landed because this bug didn`t cause the failures

Flags: needinfo?(emilio)
See Also: → 1664980
Whiteboard: [print2020_v82][old-ui-]
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 82 Branch
Regressions: 1665476
Flags: qe-verify+

Verified as fixed on Firefox 83.0a1 (2020-09-29) on Mac OS 10.14, Window 10 x64 and on Ubuntu 20.04 x64.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
Regressions: 1668762
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: