Closed Bug 1642583 Opened 4 years ago Closed 2 years ago

PDF preview not correct when using clipmask and Blendmode DARKEN

Categories

(Firefox :: PDF Viewer, defect)

Firefox 96
x86_64
Windows 10
defect

Tracking

()

RESOLVED FIXED
96 Branch
Tracking Status
firefox-esr91 --- fixed
firefox95 --- wontfix
firefox96 --- fixed

People

(Reporter: finn, Assigned: lsalzman)

References

(Regression)

Details

(Keywords: regression, Whiteboard: [pdfjs-c-rendering][pdfjs-d-smask][pdfjs-d-blend-mode])

Attachments

(6 files)

Attached file Test 29052020.PDF

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:75.0) Gecko/20100101 Firefox/75.0

Steps to reproduce:

Preview the attached PDF file in Firefox

Actual results:

The displayed image is not correct. When a clip mask is used in combination with Blendmode DARKEN, the clip mask is ignored.

Expected results:

Open the PDF file in Adobe Reader to see how the rendering is different for the object on the right.

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → PDF Viewer

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

For more information, please visit auto_nag documentation.

Flags: needinfo?(bdahl)
Severity: -- → S3
Flags: needinfo?(bdahl)
Whiteboard: [pdfjs-c-rendering][pdfjs-d-smask][pdfjs-d-blend-mode]

Any news about this defect? I keep receiving reports from people experiencing this problem.

Flags: needinfo?(bdahl)

Not sure when this was fixed, but it appears to render the same as acrobat now.

Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Flags: needinfo?(bdahl)
Resolution: --- → FIXED
Attached image Correct rendering

Sorry, but unfortunately this is NOT fully fixed. Please refer to the two screenshots I have just attached, where you can see that the shape to the right is not rendered correctly.

Status: RESOLVED → UNCONFIRMED
Resolution: FIXED → ---
OS: Unspecified → Windows 10
Priority: -- → P1
Hardware: Unspecified → x86_64
Version: 75 Branch → Firefox 91
Attached image ff92 with macos

Here's what it looks like for me. This may be a windows specific bug, or it has been fixed in 92.

Checked my windows machine and it's broken there too.

:) I hope it's possible to fix this issue. It affects quite a few users.

Priority: P1 → --

(In reply to Brendan Dahl [:bdahl] from comment #9)

Checked my windows machine and it's broken there too.

Did you mean "broken" or "fixed"? :P

I can't reproduce on Linux.

This bug exists on Windows.

It seems to me that this bug is not really going anywhere, apart from the occasional doubtful comment whether the bug still exists.

What can I do to attract more attention?

Points: --- → 13
Priority: -- → P1
Version: Firefox 91 → Firefox 96

(In reply to finn from comment #12)

This bug exists on Windows.

It seems to me that this bug is not really going anywhere, apart from the occasional doubtful comment whether the bug still exists.

What can I do to attract more attention?

We are not doubtful that you are seeing the bug, we are trying to narrow down where the problem appears as it will help us with the fix.
It's one thing if it fails everywhere, it's another thing if it only fails on Windows, and even another thing if it fails only on a specific version of Windows or on a specific graphics card.

Please don't edit the priority field, we will decide about the priority once we understand the problem better.

Points: 13 → ---
Priority: P1 → --
Priority: -- → P1

Yep I confirm the bug on windows 10 pro (v. 21H1).
I see the same thing as in https://bugzilla.mozilla.org/show_bug.cgi?id=1642583#c6.

:finn, please don't change the priority, we set it in considering our own workload (see https://wiki.mozilla.org/BMO/UserGuide/BugFields#priority).

Priority: P1 → --

If you want to try to fix the issue yourself or if you know someone who can help, we'll be happy to review a PR:
https://github.com/mozilla/pdf.js/

Status: UNCONFIRMED → NEW
Ever confirmed: true

I open the pdf in using local pdf.js environment and I confirm again the bug in Firefox but neither in Chrome nor Edge.
So it's very likely a graphics issue and not a pdf.js one.

Attached file bug1642583.html

If I comment the line ctx.globalCompositeOperation = "darken"; the clipping operation is correct.

Lee, can you take a look at this?

Flags: needinfo?(lsalzman)
Flags: needinfo?(lsalzman)
Assignee: nobody → lsalzman
Status: NEW → ASSIGNED
Pushed by lsalzman@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6616fe7301d4
Push clips when applying D2D blend effect. r=jrmuizel
Status: ASSIGNED → RESOLVED
Closed: 3 years ago2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 96 Branch
Regressed by: 1303534
Has Regression Range: --- → yes
Blocks: 1440676
Blocks: 1649748
Blocks: 1396425
Blocks: 1336591
Blocks: 1336572
Blocks: 1333090
Flags: in-testsuite+

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

Seems like this patch has a nice risk vs. reward ratio given the simplicity of the patch and the huge number of bugs it fixed - should we consider taking this (and bug 1336591) on ESR too?

Flags: needinfo?(lsalzman)
Keywords: regression

Comment on attachment 9253489 [details]
Bug 1642583 - Push clips when applying D2D blend effect. r?jrmuizel

ESR Uplift Approval Request

  • If this is not a sec:{high,crit} bug, please state case for ESR consideration: Visual artifacts in PDF.js (and all Canvas2D) on Windows.
  • User impact if declined: Primitives in PDF.js (and all Canvas2D) don't clip properly on Windows leading to significant visual artifacting.
  • Fix Landed on Version: 96
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Relatively small change that essentially just undoes an ancient regressing bug.
  • String or UUID changes made by this patch:
Flags: needinfo?(lsalzman)
Attachment #9253489 - Flags: approval-mozilla-esr91?

Comment on attachment 9253489 [details]
Bug 1642583 - Push clips when applying D2D blend effect. r?jrmuizel

Simple fix which resolves a lot of longstanding rendering issues, approved for 91.5esr.

Attachment #9253489 - Flags: approval-mozilla-esr91? → approval-mozilla-esr91+
Regressions: 1759715
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: