Closed Bug 1921662 Opened 1 month ago Closed 1 month ago

The SVG text along a path becomes misaligned in Firefox Developer Edition when the path has a non-1 scale transform, unlike in other browsers where it displays correctly.

Categories

(Core :: SVG, defect)

Firefox 131
defect

Tracking

()

RESOLVED FIXED
133 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox-esr128 --- unaffected
firefox131 + fixed
firefox132 --- fixed
firefox133 --- fixed

People

(Reporter: nicolas.jeanmonod, Assigned: emilio)

References

(Regression)

Details

(Keywords: regression)

Attachments

(2 files)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:131.0) Gecko/20100101 Firefox/131.0

Steps to reproduce:

  1. Create an SVG with a path using the transform attribute with a non-1 scale.
  2. Add text along the path using <textPath>.
  3. View the SVG in Firefox Developer Edition and compare with Firefox or other browsers.

Environment:

  • Firefox Developer Edition Version: 131.0b9
  • Operating System: macOS 14.7

Additional Information:

  • This issue is reproducible with other SVG examples using similar path scaling.
  • Tested and confirmed to work correctly in Chrome, Safari, and Firefox.

The bug can also be seen in this example:
https://nichub.github.io/enneascope/

Actual results:

The text appears shifted or displaced relative to the path when a scale other than 1 is applied.

Expected results:

The text should align correctly along the path, regardless of the scale applied.

Component: Untriaged → SVG
Product: Firefox → Core

probably a regression from bug 878346

Flags: needinfo?(emilio)

[Tracking Requested - why for this release]: Would be nice not to ship this but also we just came out of soft freeze so probably too late.

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

We can consider it for the Oct 15 131 dot release.

We don't want the offsetted matrix, just the actual transform matrix
specified on the element.

Added a test, the failures above were from another patch.

Flags: needinfo?(emilio)
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/dd364824053b Ignore transform-origin and such shenanigans in SVGGeometryElement::LocalTransform. r=longsonr
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/48466 for changes under testing/web-platform/tests
Upstream PR merged by moz-wptsync-bot
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED

Comment on attachment 9428269 [details]
Bug 1921662 - Ignore transform-origin and such shenanigans in SVGGeometryElement::LocalTransform. r=longsonr

Beta/Release Uplift Approval Request

  • User impact if declined: SVG text that uses textPath will be misrendered if the path is scaled.
  • 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): Change is scoped to path scaling when used by textPath elements
  • String changes made/needed: none
  • Is Android affected?: Yes
Attachment #9428269 - Flags: approval-mozilla-release?
Attachment #9428269 - Flags: approval-mozilla-beta?
Version: Firefox 131 → Firefox 133
Target Milestone: --- → 133 Branch
Version: Firefox 133 → Firefox 131

Comment on attachment 9428269 [details]
Bug 1921662 - Ignore transform-origin and such shenanigans in SVGGeometryElement::LocalTransform. r=longsonr

Approved for 132.0b4.

Attachment #9428269 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Flags: in-testsuite+

Comment on attachment 9428269 [details]
Bug 1921662 - Ignore transform-origin and such shenanigans in SVGGeometryElement::LocalTransform. r=longsonr

Approved for 131.0.3 dot release

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

Attachment

General

Created:
Updated:
Size: