Closed Bug 1950516 Opened 20 days ago Closed 17 days ago

Incorrect rendering of SVG elements with transform matrix

Categories

(Fenix :: General, defect)

Firefox 135
defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1927186

People

(Reporter: NeatNit, Unassigned)

Details

Attachments

(5 files, 1 obsolete file)

Attached image railmap_desktop.png

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

Steps to reproduce:

Unfortunately, I haven't yet found a way to replicate this locally, and I think the website where it happens is geo-locked and likely can only be accessed from Israel. I'm sorry it's not easier to replicate.

Go to https://www.rail.co.il/?page=linesmap on desktop (issue observed on both Windows 10 and Linux Mint). Get past the DDOS protection and look at the rail network map - an embedded SVG.

This page renders correctly on Firefox 135.0.1 for Android! The issue only happens on desktop.

Actual results:

Incorrect rendering of the rail network map (see desktop screenshot)

Expected results:

Correct rendering of the rail network map (see android screenshot)

Attached image railmap_android.jpg

The affected SVG elements all have transform="matrix(...)" attributes, it is likely the culprit. However, if I save the SVG "outer HTML" as a .svg file and open it in Firefox, it renders correctly, so something about it being embedded within that page is messing it up.

Summary: Incorrect rendering of SVG elements with transform matric → Incorrect rendering of SVG elements with transform matrix

Oh! If I save the page as "complete webpage" and then delete its _files directory, then open the HTML page with Firefox, the bug occurs! Even though there are other rendering bugs (mostly the line width in the map), that is not important, only the transform issue matters. I will attach the HTML file.

Attached file railmap.html

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

Component: Untriaged → General
Product: Firefox → Fenix
Attached image attached_html.png

The attached HTML file rendered by Firefox on Linux Mint.

Can you create a minimal example please? It's hard to find the needle in the haystack at the moment.

Flags: needinfo?(NeatNit)

I'm just as lost as you.. But I'll try.

Attached file railmap_less_stuff.html (obsolete) —

Okay, this is the best I've got: some unneeded HTML is removed, it's just the SVG within a bunch of divs. One of the divs has a style attribute, with the rule zoom: 120%;. If you delete this zoom rule, the issue goes away. So this likely has to do with how zoom interacts with a transform matrix.

This is as minimal as I can get. Hope it's enough to work with!

Flags: needinfo?(NeatNit)
Attachment #9468667 - Attachment is obsolete: true

Any idea where we're going wrong Emilio? It seems like transforms on the <g> elements are OK with zoom applied but the transform on the path is not.

Flags: needinfo?(emilio)
Status: UNCONFIRMED → RESOLVED
Closed: 17 days ago
Duplicate of bug: 1927186
Flags: needinfo?(emilio)
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: