Closed Bug 1751025 Opened 3 years ago Closed 1 year ago

Opacity CSS property does not affect <tspan> elements

Categories

(Core :: SVG, defect)

defect

Tracking

()

RESOLVED FIXED
114 Branch
Tracking Status
firefox-esr102 --- wontfix
firefox112 --- wontfix
firefox113 --- wontfix
firefox114 --- fixed

People

(Reporter: taylorgratzer, Assigned: longsonr)

References

(Regression)

Details

(Keywords: regression)

Attachments

(3 files)

Steps to reproduce:

Create a <tspan> and apply a style with any value less than 1 for the CSS "opacity" property.

See: https://codepen.io/Nickardson/pen/MWEdmpr

Actual results:

The tspan will remain fully opaque, even with values of 0 opacity.

Expected results:

The tspan should become transparent.

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

I can reproduce the issue in Nightly98.0a1 but not in Firefox24.0

Regression window:
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=cbb24a4a96af&tochange=d7553251cf43

Regressed by Bug 839955

Status: UNCONFIRMED → NEW
Has Regression Range: --- → yes
Has STR: --- → yes
Component: Web Painting → SVG
Ever confirmed: true
Keywords: regression
Regressed by: 839955
Severity: -- → S3
Version: Firefox 96 → Trunk

Thanks for the bug report!

Side note: it does look like we honor fill-opacity and stroke-opacity on tspan elements, as shown in the lower two lines in this testcase. It's just opacity that we seem to ignore.

Although it is technically a regression, that's a regression from Firefox 25 which was almost 10 years ago. I am removing the regression keyword as this bug doesn't need to be triaged during our regression triage meeting every week.

Assignee: nobody → longsonr
Status: NEW → ASSIGNED
Pushed by longsonr@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/a846d1b82b98
Opacity CSS property should apply to all children of text elements r=jfkthame
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/39468 for changes under testing/web-platform/tests
Regressions: 1827341

Backed out for failures on opacity.svg

[task 2023-04-11T06:36:48.423Z] 06:36:48     INFO - TEST-START | /svg/text/reftests/opacity.svg
[task 2023-04-11T06:36:48.425Z] 06:36:48     INFO - PID 2846 | 1681195008424	Marionette	INFO	Testing http://web-platform.test:8000/svg/text/reftests/opacity.svg == http://web-platform.test:8000/svg/text/reftests/opacity-ref.svg
[task 2023-04-11T06:36:48.431Z] 06:36:48     INFO - PID 2846 | [Child 2862, Main Thread] WARNING: JSWindowActorChild::SendRawMessage (MarionetteReftest, MarionetteReftestParent:reftestWait) not sent: !CanSend() || !mManager || !mManager->CanSend(): file /builds/worker/checkouts/gecko/dom/ipc/jsactor/JSWindowActorChild.cpp:57
[task 2023-04-11T06:36:48.495Z] 06:36:48     INFO - PID 2846 | [Child 2862, Main Thread] WARNING: JSWindowActorChild::SendRawMessage (MarionetteReftest, MarionetteReftestParent:reftestWait) not sent: !CanSend() || !mManager || !mManager->CanSend(): file /builds/worker/checkouts/gecko/dom/ipc/jsactor/JSWindowActorChild.cpp:57
[task 2023-04-11T06:36:48.539Z] 06:36:48     INFO - PID 2846 | 1681195008538	Marionette	INFO	No differences allowed
[task 2023-04-11T06:36:48.627Z] 06:36:48     INFO - TEST-UNEXPECTED-FAIL | /svg/text/reftests/opacity.svg | Testing http://web-platform.test:8000/svg/text/reftests/opacity.svg == http://web-platform.test:8000/svg/text/reftests/opacity-ref.svg
[task 2023-04-11T06:36:48.627Z] 06:36:48     INFO - Found 266 pixels different, maximum difference per channel 1
Flags: needinfo?(longsonr)
Upstream PR was closed without merging
Pushed by longsonr@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/26eed7e9843b
Opacity CSS property should apply to all children of text elements r=jfkthame
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 114 Branch
Upstream PR merged by moz-wptsync-bot
Blocks: 1827341
No longer regressions: 1827341
Regressions: 1832986
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: