Open Bug 1943529 Opened 1 year ago Updated 1 day ago

mix-blend-mode on an image doesn't print correctly (affects Leaflet maps which use plus-lighter)

Categories

(Core :: Graphics, defect)

Firefox 134
defect

Tracking

()

Tracking Status
firefox-esr115 --- wontfix
firefox-esr128 --- fix-optional
firefox134 --- wontfix
firefox135 --- wontfix
firefox136 --- fix-optional

People

(Reporter: Mark.Falconbridge, Assigned: bradwerth, NeedInfo)

References

(Regression)

Details

(Keywords: regression)

Attachments

(2 files)

Steps to reproduce:

To reproduce, go here https://leafletjs.com/examples/quick-start/example.html and then use Firefox to print the page.

Actual results:

The printed image does not contain the map background, only the elements rendered over the map.

The print preview looks ok, using the dev tools to emulate print media looks ok and printing to pdf is also ok, the bug is only present when you send it to a physical printer.

Printing is fine on Chrome, Edge and Safari.

Expected results:

The map should print as per the preview.

The Bugbug bot thinks this bug should belong to the 'Core::Printing: Output' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Printing: Output
Product: Firefox → Core

Which OS are you testing this on out of curiosity?

I could repro using "Microsoft Print to PDF" on Windows, but interestingly not our PDF printer.

Status: UNCONFIRMED → NEW
Ever confirmed: true

I'm on Windows 10.

Ohh, found it:

.leaflet-container img.leaflet-tile {
  /* See: https://bugs.chromium.org/p/chromium/issues/detail?id=600120 */
  mix-blend-mode: plus-lighter;
}

So (kind of) a regression from bug 1746248.

See Also: → 1746248
Keywords: regression
Regressed by: 1746248
See Also: 1746248

This is all kinda busted...

Set release status flags based on info from the regressing bug 1746248

Jonathan, do you happen to know what might be going on? I think at least:

  • There seems to be some sort of display list building bug (that's what causes even the print preview of comment 6 to be busted).
  • There seems to be some issue probably around the drawtarget subclass that we use for windows printing (DrawTargetD2D1.h?), where the composition ends up fully busted.
Flags: needinfo?(jfkthame)
Summary: Leaflet maps fail to print the background maps → mix-blend-mode on an image doesn't print correctly (affects Leaflet maps which use plus-lighter)
See Also: → 1939714

(In reply to Emilio Cobos Álvarez (:emilio) from comment #8)

Jonathan, do you happen to know what might be going on?

Not really -- I think this is more for :lsalzman or :tnikkel or someone closer to the gfx side of things. We should probably move it to the Graphics component to try and get the right eyes on this.

(I was going to mention that I've seen other possibly-related issues with mix-blend-mode -- and maybe other compositing operations? don't recall exactly -- but I see you found bug 1939714 already, which was the most recent thing I had in mind.)

Component: Printing: Output → Graphics
Flags: needinfo?(jfkthame)

Set release status flags based on info from the regressing bug 1746248

The severity field is not set for this bug.
:bhood, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(bhood)
Blocks: gfx-triage
Flags: needinfo?(bhood) → needinfo?(tnikkel)

Assigning S3, will raise to S2 if it turns out lots of people are encountering it.

Severity: -- → S3

Seems like there might be two different bugs here.

Print preview is drawn by web render using the same path as the page. My hypothesis that is the background that we are mix-blending the images over is separated from the images due to a different structure to the print preview document, so we aren't blending over the correct thing. My reasoning is that if I contain the images in a div with a background color, and then check "draw background colors" in the print preview we paint correctly.

For print that is painted using the ::Paint display items fallback path, even the above trick of having a div with a background color and draw background colors being on does not fix it, so perhaps the cairo backend that we are using to generate the pdf doesn't support blend modes?

I can reproduce. I'll try to figure it out.

Assignee: nobody → bwerth

Brad will attempt to locate the root cause.

No longer blocks: gfx-triage

I'll clear my needinfo for now and let Brad look.

Flags: needinfo?(tnikkel)
Duplicate of this bug: 1999924
See Also: → 1999924

Brad, any update here?

Flags: needinfo?(bwerth)

The severity field for this bug is set to S3. However, the following bug duplicate has higher severity:

:bradwerth, could you consider increasing the severity of this bug to S2?

For more information, please visit BugBot documentation.

Flags: needinfo?(bwerth)

Hey there!

Seems the bug I've just reported here https://bugzilla.mozilla.org/show_bug.cgi?id=2013553 is a duplicate of this one, correct?

Duplicate of this bug: 2013553
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: