Closed Bug 1738560 Opened 3 years ago Closed 3 years ago

svg text elements not rendered when text-transform: uppercase is applied

Categories

(Core :: SVG, defect)

Firefox 95
Unspecified
All
defect

Tracking

()

RESOLVED FIXED
96 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox-esr91 --- unaffected
firefox93 --- unaffected
firefox94 --- unaffected
firefox95 + fixed
firefox96 --- fixed

People

(Reporter: david, Assigned: jfkthame)

References

(Regression, )

Details

(Keywords: regression)

Attachments

(1 file)

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

Steps to reproduce:

Load a page with the following HTML:

<svg>
  <text y="20" style="text-transform: uppercase">
    Hello, World!
  </text>
</svg>

Actual results:

Page is blank, with no text rendered.

Expected results:

Page should contain rendered text.

The Bugbug bot thinks this bug should belong to the 'Core::Web Painting' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → Web Painting
Product: Firefox → Core

In the wild, this bug makes NYTimes' Spelling Bee game effectively unplayable: https://www.nytimes.com/puzzles/spelling-bee (behind a paywall)

Status: UNCONFIRMED → NEW
Has Regression Range: --- → yes
Has STR: --- → yes
Component: Web Painting → SVG
Ever confirmed: true
Keywords: regression
OS: Unspecified → All
Regressed by: 1712780
Flags: needinfo?(jfkthame)

Huh, that was..... unexpected!

Turns out we depend on BuildTextRunsScanner::BreakSink::Finish to finalize the transformed textrun when a text-transform is in effect, and the optimization to skip line-breaking work in SVG text results in skipping that and the textrun remains blank.

Flags: needinfo?(jfkthame)
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Pushed by jkew@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d6033db719c8
When text-transform is in effect, ensure we finish building the transformed textrun even if we would otherwise skip the line-break scan (in SVG text). r=emilio
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/31473 for changes under testing/web-platform/tests
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 96 Branch
Upstream PR merged by moz-wptsync-bot

[Tracking Requested - why for this release]: SVG text not rendered if text-transform: uppercase is applied

Comment on attachment 9248666 [details]
Bug 1738560 - When text-transform is in effect, ensure we finish building the transformed textrun even if we would otherwise skip the line-break scan (in SVG text). r=#layout-reviewers

Beta/Release Uplift Approval Request

  • User impact if declined: In SVG images, any text elements styled with text-transform are not displayed.
  • 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): Just undoes part of the optimization from bug 1712780, in the case where text-transform is present.
  • String changes made/needed:
Attachment #9248666 - Flags: approval-mozilla-beta?

Comment on attachment 9248666 [details]
Bug 1738560 - When text-transform is in effect, ensure we finish building the transformed textrun even if we would otherwise skip the line-break scan (in SVG text). r=#layout-reviewers

Approved for 95 beta 3, thanks.

Attachment #9248666 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

aren't there code paths where transformingFactory is nullptr? The new code calls transformingFactory.release() in all cases now doesn't it?

Flags: needinfo?(jfkthame)

(In reply to Robert Longson [:longsonr] from comment #15)

aren't there code paths where transformingFactory is nullptr? The new code calls transformingFactory.release() in all cases now doesn't it?

It does, but there's no harm in calling release() on an empty UniquePtr. All it does is tell the UniquePtr to abandon ownership of the pointer it's managing; it doesn't care if that pointer is actually null, as it isn't doing anything with it.

Flags: needinfo?(jfkthame)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: