Closed Bug 1921329 Opened 1 year ago Closed 1 year ago

The preview thing when you hover over a tab doesn't work for svg

Categories

(Toolkit :: General, defect, P3)

Firefox 131
defect

Tracking

()

VERIFIED FIXED
140 Branch
Tracking Status
firefox140 --- verified
firefox141 --- verified

People

(Reporter: 30ntate, Assigned: emilio)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

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

Steps to reproduce:

I opened an svg in a tab and clicked on another tab and hovered over the tab with the svg open.

Actual results:

It just showed an empty grey box. I also tried pinning it and using a local one on my computer with file:///

Expected results:

It should have shown a preview of the svg

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

Component: Untriaged → Tabbed Browser

Hello, thank you for the bug report!
Managed to reproduce on:

  • Firefox Nightly 132.0a1;
  • Firefox 131.0;

Tested on:

  • macOS 14;
  • Windows 10;
  • Ubuntu 22;

Setting as NEW so the developing team can have a look.

Status: UNCONFIRMED → NEW
Ever confirmed: true
Blocks: tab-preview

Moving to Core SVG as it is apparently specific to it. It works with other image types (we tested PNG).
Do you have any suggestions on how to solve this problem, the browser is just using a canvas to get the preview.

Component: Tabbed Browser → SVG
Product: Firefox → Core

(In reply to Marco Bonardo [:mak] from comment #3)

Do you have any suggestions on how to solve this problem, the browser is just using a canvas to get the preview.

Implemented here if you want to take a look: https://searchfox.org/mozilla-central/rev/1b90936792b2c71ef931cb1b8d6baff9d825592e/toolkit/components/thumbnails/PageThumbs.sys.mjs#490-547

Take Screenshot works and I imagine that also uses canvas, so someone just needs to figure out what's different between the two.

I'd appreciate if someone more familiar than me with this code wrote a
test or pointed me to a test to crib from.

Assignee: nobody → emilio
Status: NEW → ASSIGNED
Component: SVG → General
Product: Core → Toolkit

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

For more information, please visit BugBot documentation.

Flags: needinfo?(nalexander)
Severity: -- → S3
Priority: -- → P3
Flags: needinfo?(nalexander)
Duplicate of this bug: 1959834

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

I'd appreciate if someone more familiar than me with this code wrote a
test or pointed me to a test to crib from.

I posted some examples on Phab, was that helpful or would you need further help?
We could also file a follow-up bug for the tests if you would like to complete this patch.

Flags: needinfo?(emilio)

No, this likely just fell through the cracks. Added a test. Ni?ing you since old patches tend to go to the bottom of the phab queue.

Flags: needinfo?(emilio) → needinfo?(mak)
Flags: needinfo?(mak)
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/dc96d7052a1b Make thumbnails work on documents without a body element. r=mak
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 140 Branch
QA Whiteboard: [qa-triage-done-c141/b140] [qa-ver-opt-c141/b140]

Issue is reproducible on a 2024-09-26 Firefox Nightly build on Windows 10.
Verified as fixed on Firefox Nightly 141.0a1 and Firefox Beta 140.0b2 on Windows 10, Ubuntu 22, macOS 15.

Status: RESOLVED → VERIFIED
QA Whiteboard: [qa-triage-done-c141/b140] [qa-ver-opt-c141/b140] → [qa-triage-done-c141/b140] [qa-ver-done-c141/b140]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: