Closed Bug 1660774 Opened 1 year ago Closed 1 year ago

Text content is missing when printing from


(Core :: Printing: Output, defect, P2)

Firefox 81



82 Branch
Tracking Status
firefox81 --- verified
firefox82 --- verified


(Reporter: mbalfanz, Assigned: emilio)


(Whiteboard: [print2020_v81][old-ui+])


(3 files)

I can reproduce the following issue on OS X and Windows.


  1. Visit
  2. Print the page, e.g. to PDF

ER: The (text-) content of the page should be present
AR: Most text is missing

See screenshot attached.

Note: I could reproduce this in the current stable release. The same problem is also visible in the new doorhanger/print preview. All settings were left on default.

I can't reproduce on Ubuntu 20.04. (or on macOS 10.14). That said, it may be because the content in the reddit link has been changes since then?

CCing, TYLin who is the best person about missing contents in printing.

I can still reproduce it today. It seems to be related to two lines of CSS that add a shadow for long content via mask-image:

.Chtkt3BCZQruf0LtmFg2c {
  -webkit-mask-image:linear-gradient(180deg,#000 60%,transparent); 
  mask-image:linear-gradient(180deg,#000 60%,transparent);
  padding:5px 8px 10px
Attached file Test-case.

This only reproduces if you don't print backgrounds, here's a reduced test-case that reproduces.

When we remove backgrounds, we also auto-darken foreground colors. My guess is that we're not applying this auto-darkening properly when drawing the mask image or something of that sort.

From a quick look, it seems Chrome also suppresses mask images when printing "without backgrounds". I'll see which of the two options is better.

Assignee: nobody → emilio
Flags: needinfo?(emilio)
Attachment #9173035 - Attachment mime type: text/plain → text/html
Flags: needinfo?(emilio)

Err, didn't mean to cancel ni?

Flags: needinfo?(emilio)
Flags: needinfo?(emilio)

I am not sure whether we should uplift this to beta (but I think it would be nice to have).

Severity: -- → S2
Priority: -- → P2
Whiteboard: [print2020][old-ui+]
Pushed by
Masks shouldn't be suppressed for print. r=jwatt
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 82 Branch

Comment on attachment 9173184 [details]
Bug 1660774 - Masks shouldn't be suppressed for print. r=miko,jwatt

Beta/Release Uplift Approval Request

  • User impact if declined: Missing elements from some printed pages.
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky):
  • String changes made/needed:
Attachment #9173184 - Flags: approval-mozilla-beta?

Comment on attachment 9173184 [details]
Bug 1660774 - Masks shouldn't be suppressed for print. r=miko,jwatt

Approved for 81.0b6.

Attachment #9173184 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Flags: qe-verify+
QA Whiteboard: [qa-triaged]
Flags: qe-verify+
Whiteboard: [print2020][old-ui+] → [print2020_v81][old-ui+]
You need to log in before you can comment on or make changes to this bug.