Closed Bug 1797721 Opened 4 years ago Closed 4 years ago

sw-wr: linear-gradient issue if two colors have same position value, only Software WebRender is affected

Categories

(Core :: Graphics: WebRender, defect)

defect

Tracking

()

VERIFIED FIXED
108 Branch
Tracking Status
firefox108 --- verified
firefox109 --- verified

People

(Reporter: soeren.hentzschel, Assigned: lsalzman)

References

(Blocks 1 open bug, Regressed 1 open bug)

Details

Attachments

(3 files, 1 external file)

Attached image example - bad look —

Someone reported an issue to me that I could not to reproduce - until today. Thanks to bug 1797580 I suddenly got Software WebRender and saw exactly the same issue. So I tested a bit and noticed a) that only Software WebRender is affected and found b) the CSS that causes the issue.

I attached a screenshot that shows the issue: There is only a white row with a small colored stroke where the full row should be colored. You can see the issue for example here: https://forum.netcup.de/informationen/ank%C3%BCndigungen-umfragen/16006-vorank%C3%BCndigung-einer-notwendigen-preisanpassung-2022-2023/ above every post.

It's caused by the following CSS of the forum style (simplified):

.message {
  background: linear-gradient(#056473 34px, white 34px) white;
}

If I change the first position from 34px to 33px so that both positions are no longer the same the issue goes away:

.message {
  background: linear-gradient(#056473 33px, white 34px) white;
}

You can see a similar issuue on about:support if you add the following CSS:

td {
  background: linear-gradient(#056473 34px, white 34px) white;
}

Compared to this code:

td {
  background: linear-gradient(#056473 33px, white 34px) white;
}

… the background color suddenly only covers the half of the height. With hardware WebRender the full height is covered.

Attached image example - expected look —
Summary: linear-gradient issue if two colors have same position value, only Software WebRender is affected → sw-wr: linear-gradient issue if two colors have same position value, only Software WebRender is affected

Do you think you could make a reduced testcase?

Flags: needinfo?(soeren.hentzschel)

I attached a testcase that I reduced from about:support.

Flags: needinfo?(soeren.hentzschel)
Assignee: nobody → lsalzman
Status: NEW → ASSIGNED
Pushed by lsalzman@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3ef36f370245 Handle tile repeat in brush_linear_gradient SWGL span shader. r=aosmond
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 108 Branch
QA Whiteboard: [qa-108b-p2]

Reproducible on a 2022-10-27 Nightly build with gfx.webrender.software = true on macOS 12.
Verified as fixed on Firefox 108.0b2(build ID: 20221115200658) and Nightly 109.0a1(build ID: 20221115214157) on macOS 12, Ubuntu 22, Windows 10.

Status: RESOLVED → VERIFIED
QA Whiteboard: [qa-108b-p2]
Regressions: 1901357
Regressions: 1918865
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: