Closed Bug 1872408 Opened 5 months ago Closed 5 months ago

Firefox 122 fails to render SVG icon from sprite

Categories

(Core :: SVG, defect)

Firefox 122
defect

Tracking

()

RESOLVED FIXED
123 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox121 --- unaffected
firefox122 --- fixed
firefox123 --- fixed

People

(Reporter: bugzilla+mozilla, Assigned: longsonr)

References

(Regression)

Details

(Keywords: regression)

Attachments

(2 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:122.0) Gecko/20100101 Firefox/122.0

Steps to reproduce:

Upgraded Firefox Developer Edition from 121 to 122b4.

Actual results:

SVG icons in my app stopped rendering.

When I inspect the blank space where the icon should be, I see e.g.:

<svg><use href="#icon-Edit%2FFill">
#shadow-root (closed)
</use></svg>

And that's it. The shadow-root element can't be expanded.

Expected results:

SVG icons should render as they did in Firefox 121.

In Firefox 121, I am able to expand the "#shadow-root (closed)" element and see the SVG icon code.

Confirmed that the icons are rendering correctly in v121.0 and in Chromium 120. I also confirmed that the sprite is being injected into my HTML in both versions.

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

Component: Untriaged → Widget: Gtk
Product: Firefox → Core

Please attach a complete and minimal testcase to the bug so we can investigate. Finding a regression range would be helpful too, you can do that using mozregression

Flags: needinfo?(bugzilla+mozilla)
Component: Widget: Gtk → SVG
Attached file svg-icon-test.html

Here is a minimal testcase.

Flags: needinfo?(bugzilla+mozilla)

The issue seems to be with the url encoding of the symbol ID not matching the svg use href.

Original: (Broken in ff122b4, working in ff121):

<use href="#icon-Carrot%20Left%2Fflex-md"></use>
<symbol id="icon-Carrot Left/flex-md">

Working in ff122b4, broken in ff121:

<use href="#icon-Carrot%20Left%2Fflex-md"></use>
<symbol id="icon-Carrot%20Left%2Fflex-md">

Working in ff122b4 and ff121:

<use href="#icon-Carrot Left/flex-md"></use>
<symbol id="icon-Carrot Left/flex-md">

I attempted to use mozregression and isolated it to this build.

app_name: firefox
build_date: 2023-11-28 11:42:00.342000
build_file: /home/hackel/.mozilla/mozregression/persist/3f0a7131d0fd-shippable--autoland--target.tar.bz2
build_type: integration
build_url: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/H-E-IIxERX2BB8_4H9P4hg/runs/0/artifacts/public%2Fbuild%2Ftarget.tar.bz2
changeset: 3f0a7131d0fd0bf13d36e723db4d1f84bbd2291e
pushlog_url: https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=7502ce91d43da9bbe645df1efa28533a715486d6&tochange=3f0a7131d0fd0bf13d36e723db4d1f84bbd2291e
repo_name: autoland
repo_url: https://hg.mozilla.org/integration/autoland
task_id: H-E-IIxERX2BB8_4H9P4hg

2023-12-31T16:21:50.162000: INFO : Narrowed integration regression window from [7502ce91, 3f0a7131] (4 builds) to [6cece559, 3f0a7131] (2 builds) (~1 steps left)
2023-12-31T16:21:51.461000: DEBUG : Found commit message:
Bug 1806964 - Restrict SVG <use> to prevent usage of data: URLs. r=longsonr

Assignee: nobody → longsonr
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true

Thanks Ryan, comment 4 pinpointed the problem.

Keywords: regression
Regressed by: 1806964

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

Attachment #9370641 - Attachment description: Bug 1872408 - unescape refs before passing to ResetWithID r=emilio → Bug 1872408 - unescape refs before tracking r=emilio
Pushed by longsonr@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/ce5ee1eb7aa4
unescape refs before tracking r=emilio
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/43831 for changes under testing/web-platform/tests
Status: ASSIGNED → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → 123 Branch
Upstream PR merged by moz-wptsync-bot

Comment on attachment 9370641 [details]
Bug 1872408 - unescape refs before tracking r=emilio

Beta/Release Uplift Approval Request

  • User impact if declined: in somewhat rare cases SVG use elements will not display properly.
  • Is this code covered by automated tests?: Yes
  • 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): reverts code to the way it was before it was broken.
  • String changes made/needed: none
  • Is Android affected?: Yes
Attachment #9370641 - Flags: approval-mozilla-beta?
Flags: in-testsuite+

Not really important, but the code actually landed in bug 1867225.

Regressed by: 1867225
No longer regressed by: 1806964

Comment on attachment 9370641 [details]
Bug 1872408 - unescape refs before tracking r=emilio

Approved for 122.0b6

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

Attachment

General

Creator:
Created:
Updated:
Size: