Closed Bug 1522422 Opened 9 months ago Closed Last month

Opacity not obeyed on SVG USE elements when a Mask is utilized with Direct2D


(Core :: Graphics, defect, P2)

64 Branch



Tracking Status
firefox-esr60 --- wontfix
firefox-esr68 --- wontfix
firefox64 --- wontfix
firefox65 --- wontfix
firefox66 --- wontfix
firefox67 --- wontfix
firefox68 --- wontfix
firefox69 --- wontfix
firefox70 --- wontfix
firefox71 --- fixed


(Reporter: jonreeves, Assigned: kris)




(Keywords: regression)


(1 file, 1 obsolete file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36

Steps to reproduce:

  1. Create an SVG inline on a HTML page
  2. Define a Mask
  3. Create a USE element to use the Mask
  4. Set opacity to (0.5) via Attribute


Actual results:

On Windows (Firefox 64.0.2) "Opacity" attribute seems to have no affect. "Fill-Opacity" Attribute does work. MacOS does not have the same problem.

Expected results:

Opacity attribute should be obeyed and shape should appear semi transparent.

Component: Untriaged → SVG
Product: Firefox → Core

From my testing (using old versions of Portable Firefox). The last released version that this worked correctly in was 54.0.1. Version 55.0 seems to show it incorrectly.

Hope that helps.

(Which landed over a year and a half ago.)

Priority: -- → P3

Sean, could you please find someone to look into this for our 67 soft freeze (Mar 11)?

Flags: needinfo?(svoisen)

Looks like a long-standing regression based on comment 2 and comment 3.

Will keep an eye on it but believe this will need to be handled by someone on graphics given the regressing bug.

@jrmuizel: Does this seem correct?

Component: SVG → Graphics
Flags: needinfo?(svoisen) → needinfo?(jmuizelaar)

Yeah. It looks like this only happens with Direct2D.

Flags: needinfo?(jmuizelaar)
Summary: Opacity not obeyed on SVG USE elements when a Mask is utilized → Opacity not obeyed on SVG USE elements when a Mask is utilized with Direct2D
Priority: P3 → P2

I saw the cause for this when reading the code a little while ago. It shouldn't be too hard to fix. We're basically assuming the opacity was applied in one case when it actually hasn't been applied

Jeff, should we expect a patch for this one for 69?

Flags: needinfo?(jmuizelaar)

Last poke for this bug as I drop it from weekly regression triage.

Flags: needinfo?(jbonisteel)

I believe this is caused by DrawTargetD2D1::IntoLuminanceSource not handling the opacity argument.

We can either bail on opacity != 1.0 or handle it properly.

Flags: needinfo?(jmuizelaar)

Kris, can you take a look at this when you get a chance.

Assignee: nobody → ktaeleman
Attachment #9089188 - Attachment is obsolete: true
Pushed by
Fixing opacity issue on SVG USE elements in D2D. r=jrmuizel
Closed: Last month
Resolution: --- → FIXED
Target Milestone: --- → mozilla71
No longer blocks: 1359527
Flags: in-testsuite+
Regressed by: 1359527

Is this something we should consider uplifting to Beta or can it ride Fx71 to release?

Flags: needinfo?(ktaeleman)

I think this is a bit of an edge case (svg + use + mask), so in my opinion it could ride to Fx71.

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