Closed Bug 1930125 Opened 7 days ago Closed 3 days ago

textPath causes text to be translated incorrectly if the referenced path has a translation applied

Categories

(Core :: SVG, defect)

Firefox 132
defect

Tracking

()

VERIFIED FIXED
134 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox-esr128 --- unaffected
firefox132 --- wontfix
firefox133 --- verified
firefox134 --- verified

People

(Reporter: dani.parnanen, Assigned: emilio)

References

(Regression)

Details

(Keywords: regression)

Attachments

(2 files)

Attached image text-on-path.svg

Steps to reproduce:

Using SVG, render <text> on a <path> that has a translation transformation using <textPath> that references that path element.

Actual results:

The translation is applied correctly on the <path> element, but it is applied apparently two times on the <text> element resulting in the text being rendered in the wrong coordinates.

Expected results:

The text should be rendered exactly on the path regardless of the path's transformations.

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

Component: Untriaged → Translations
Component: Translations → SVG
Product: Firefox → Core

Bug 878346 - Make transform a mapped attribute for SVG. r=longsonr,firefox-style-system-reviewers,zrhoffman

The tricky bit is rotate() which in SVG means something different if
there's an origin (you translate-then-untranslate it).

But this seems to work off-hand, and fix the reminder of bug 1906261.

Differential Revision: https://phabricator.services.mozilla.com/D215788

Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: regression
Regressed by: 878346
Flags: needinfo?(emilio)

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

Flags: needinfo?(emilio)
Flags: needinfo?(emilio)
Assignee: nobody → emilio
Status: NEW → ASSIGNED
Flags: needinfo?(emilio)

Comment on attachment 9436735 [details]
Bug 1930125 - Make SVGGeometryElement::LocalTransform return CSS rather than device pixels. r=longsonr,#layout

Beta/Release Uplift Approval Request

  • User impact if declined/Reason for urgency: One liner regression fix
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: comment 0 (but attachment needs to be open on a new tab on a highdpi screen)
  • List of other uplifts needed: none
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Relatively well scoped patch.
  • String changes made/needed: none
  • Is Android affected?: Yes
Attachment #9436735 - Flags: approval-mozilla-beta?
Flags: qe-verify+
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/306959be9a2a Make SVGGeometryElement::LocalTransform return CSS rather than device pixels. r=longsonr

Backed out for causing reftests failures.

  • Backout link
  • Push with failures
  • Failure Log
  • Failure line: REFTEST TEST-UNEXPECTED-FAIL | layout/reftests/svg/text/textpath-transform-zoom.html == layout/reftests/svg/text/textpath-transform-zoom-ref.html | image comparison, max difference: 255, number of differing pixels: 2976
Flags: needinfo?(emilio)
Flags: needinfo?(emilio)
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ee852da735ef Make SVGGeometryElement::LocalTransform return CSS rather than device pixels. r=longsonr
Status: ASSIGNED → RESOLVED
Closed: 3 days ago
Resolution: --- → FIXED
Target Milestone: --- → 134 Branch

Comment on attachment 9436735 [details]
Bug 1930125 - Make SVGGeometryElement::LocalTransform return CSS rather than device pixels. r=longsonr,#layout

Approved for 133.0b8

Attachment #9436735 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
QA Whiteboard: [qa-triaged]

I was able to reproduce the issue on an affected Firefox 133.0b7 build, using macOS 13.6.7 (2048 x 1280) and macOS 14.7 (1792 × 1120) by loading the .svg file from Comment 0 in a new tab.
Verified as fixed on Firefox 133.0b8 and on Firefox Nightly 134.0a1 (2024-11-13), using macOS 13.6.7, macOS 14.7, Windows 11 and Ubuntu 22.04. The text is correctly rendered along the path.
Please note that on Windows and Ubuntu I've verified this with the scaling factor set above 125%, as the maximum resolution on those devices is 1920 x 1080.

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: