Closed Bug 1708122 Opened 4 years ago Closed 4 years ago

[Regression] Radial gradient rendered as solid block when second color is transparent

Categories

(Core :: Graphics: WebRender, defect)

Firefox 88
defect

Tracking

()

VERIFIED FIXED
90 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox88 --- wontfix
firefox89 --- verified
firefox90 --- verified

People

(Reporter: bsh, Assigned: nical)

References

(Regression)

Details

(Keywords: regression)

Attachments

(3 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:88.0) Gecko/20100101 Firefox/88.0

Steps to reproduce:

A background-image is defined with a radial-gradient.
In one case, the second color is fully visible (alpha=1).
In the other case, the second color is fully transparent(alpha=0).

<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>demo</title>
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<style type="text/css">
.test {
position: absolute;
width: 300px;
height: 900px;
border: 1px solid black;
background-color: white;
}
#test1 {
left: 10px;
background-image: radial-gradient(ellipse 5px 20px at 100px 300px, blue 0, rgba(255,255,255,1) 300px);
}
#test2 {
left: 350px;
background-image: radial-gradient(ellipse 5px 20px at 100px 300px, blue 0, rgba(255,255,255,0) 300px);
}
</style>
</head>
<body>
<div class="test" id="test1"></div><!-- OK -->
<div class="test" id="test2"></div><!-- NOK -->
</body>
</html>

Actual results:

The radial gradient with alpha=0 is not rendered correctly. Instead of a large ellipsis that fades from one color to transparent, only a small rectangular block is rendered. The gradient with alpha=1 is correct.

This is a regression with Firefox 88. It is rendered fine in Firefox 87 and Chrome 90.

Expected results:

Both gradients in the example provided should look the same.

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

Component: Untriaged → Graphics: WebRender
Product: Firefox → Core
Attached file fsdfs.html
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(nical.bugzilla)
Regressed by: 1687977
Has Regression Range: --- → yes
Severity: -- → S3
Keywords: regression

The bounds of a radial gradient primitive's radius have to be scaled by the end_offset parameter.

Assignee: nobody → nical.bugzilla
Status: NEW → ASSIGNED
Flags: needinfo?(nical.bugzilla)

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

Pushed by nsilva@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c506dcea14e8 Fix the radial gradient optimization. r=gfx-reviewers,lsalzman
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch

The patch landed in nightly and beta is affected.
:nical, is this bug important enough to require an uplift?
If not please set status_beta to wontfix.

For more information, please visit auto_nag documentation.

Flags: needinfo?(nical.bugzilla)

Comment on attachment 9220325 [details]
Bug 1708122 - Fix the radial gradient optimization. r=#gfx-reviewers

Beta/Release Uplift Approval Request

  • User impact if declined: Some radial gradients won't render correctly
  • 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): Simple enough.
  • String changes made/needed:
Flags: needinfo?(nical.bugzilla)
Attachment #9220325 - Flags: approval-mozilla-beta?

Comment on attachment 9220325 [details]
Bug 1708122 - Fix the radial gradient optimization. r=#gfx-reviewers

88 regression, patch has tests and was verified in nightly, approved for 89 beta 11, thanks.

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

Verified as fixed on Windows 10 x64, macOS 10.15 and on Ubuntu 20.04.

Status: RESOLVED → VERIFIED
QA Whiteboard: [qa-triaged]
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: