Closed Bug 1665343 Opened 4 years ago Closed 4 years ago

Not printing revoked blob image

Categories

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

80 Branch
defect

Tracking

()

VERIFIED FIXED
83 Branch
Tracking Status
firefox-esr68 --- unaffected
firefox-esr78 --- unaffected
firefox80 --- wontfix
firefox81 --- wontfix
firefox82 --- verified
firefox83 --- verified
firefox84 --- verified

People

(Reporter: hlavacek.radek, Assigned: emilio)

References

(Regression)

Details

(Keywords: regression, Whiteboard: [print2020_v82][old-ui+], [wptsync upstream])

Attachments

(4 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.135 Safari/537.36 OPR/70.0.3728.178

Steps to reproduce:

Appears in version 80+. The versions before 80 works fine.
Steps:

  1. Create canvas and call HTMLCanvasElement.toBlob() method.
  2. On callback of created blob, create "img" element and as source add the "URL.createObjectURL(blob)".
  3. Add the "img" element into page that you want to print
  4. Print page

Actual results:

The image is not printed

Expected results:

The image should be printed

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

Component: Untriaged → Printing: Output
Product: Firefox → Core
Priority: -- → P2
Whiteboard: [print2020_v82][old-ui+]
Attached file Test-case

This seems to work, is there any chance you could attach a test-case that reproduces the bug?

Flags: needinfo?(hlavacek.radek)
Attached file Working test case

Not sure if it is firefox bug anymore, but it wokred in version 79 and older and it works in all other browsers. The problem is with line "URL.revokeObjectURL(url);".

Flags: needinfo?(hlavacek.radek)

But if it is shown on the web page, it should be also printed.

Yeah, that's a bit tricky. This broke in bug 1648064 because that changed the setup to actually allow image requests from the printed page (needed for lazyloaded images).

Status: UNCONFIRMED → NEW
Ever confirmed: true
Regressed by: 1648064
Summary: Not printing blob image → Not printing revoked blob image
Has Regression Range: --- → yes

We use it to merge blobs, but that doesn't match the spec. Per:

https://html.spec.whatwg.org/#the-list-of-available-images

We should key off the URI, and thus a revoked image should be able to be
reused if the request is cached. This works to allow printing revoked
blob images, which other browsers allow.

I don't see any way to make that work easily while preserving the blob
image optimization. That being said, it seems other browsers also
re-decode when creating different URLs for the same blob (see the
test-case attached to the bug), so it seems we should be able to live
without it.

Assignee: nobody → emilio
Status: NEW → ASSIGNED

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

Severity: -- → S3
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/095c8aec7254 Remove blob specialness in image cache. r=tnikkel
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/25688 for changes under testing/web-platform/tests
Whiteboard: [print2020_v82][old-ui+] → [print2020_v82][old-ui+], [wptsync upstream]
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 83 Branch
Upstream PR merged by moz-wptsync-bot

Seems low risk. Can you request beta uplift or else mark this as status-firefox82:wontfix?

Flags: needinfo?(emilio)

Given this technically removes an optimization I'd prefer for it to get some bake time, but we should consider uplifting after a week or so if there are no regressions.

Flags: needinfo?(emilio)

The patch landed in nightly and beta is affected.
:emilio, is this bug important enough to require an uplift?
If not please set status_beta to wontfix.

For more information, please visit auto_nag documentation.

Flags: needinfo?(emilio)

Perhaps, see above.

Flags: needinfo?(emilio)

Any decision on this? firefox82:wontfix, or uplift?

Flags: needinfo?(emilio)

Comment on attachment 9176261 [details]
Bug 1665343 - Remove blob specialness in image cache. r=tnikkel

Beta/Release Uplift Approval Request

  • User impact if declined: Some blob images do not print.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: Print https://bug1665343.bmoattachments.org/attachment.cgi?id=9176230
  • List of other uplifts needed: none
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Simple patch, removes an optimization that other browsers don't implement.
  • String changes made/needed: none
Flags: needinfo?(emilio)
Attachment #9176261 - Flags: approval-mozilla-beta?
Flags: qe-verify+
QA Whiteboard: [qa-triaged]

Comment on attachment 9176261 [details]
Bug 1665343 - Remove blob specialness in image cache. r=tnikkel

approved for 82.0b8

Attachment #9176261 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Hello,

Confirming this issue as verified fixed on82.0.2, 83.0b7 and 84.0a1 with Ubuntu 20.04, macOS 10.15.7 and Windows 10x64.

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

Attachment

General

Created:
Updated:
Size: