Closed Bug 1854062 Opened 1 year ago Closed 1 year ago

CSS border-radius not working on element with filter and which parent has overflow: hidden

Categories

(Core :: Graphics: WebRender, defect, P2)

Firefox 117
defect

Tracking

()

VERIFIED FIXED
120 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox118 --- wontfix
firefox119 --- wontfix
firefox120 --- verified

People

(Reporter: jocke, Assigned: david.turner)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

Steps to reproduce:

  1. Open FireFox on a Windows 11 Home machine
  2. Open https://codepen.io/jockelindberg/pen/RwEjEmL
    or use this HTML code that reproduces the issue:

<html>
<head>
<style>
.parent {
width : 35px;
height : 35px;
overflow: hidden;
}
.child {
border-radius: 50%;
filter: brightness(50%);
background-color: red;
width: 35px;
height: 35px;
}
</style>
</head>
<body>
<div class="parent">
<div class="child"></div>
</div>
</body>
</html>

Actual results:

A dark-red square appeared

Expected results:

I would expect a dark-red circle

The Bugbug bot thinks this bug should belong to the 'Core::CSS Parsing and Computation' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → CSS Parsing and Computation
Product: Firefox → Core

Mozregression says this broke in bug 1836063.

Status: UNCONFIRMED → NEW
Component: CSS Parsing and Computation → Graphics: WebRender
Ever confirmed: true
Keywords: regression
Regressed by: 1836063

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

:david.turner, since you are the author of the regressor, bug 1836063, could you take a look?

For more information, please visit BugBot documentation.

Flags: needinfo?(david.turner)

I've confirmed that this is a regression from that change specifically and can reproduce the problem locally, and the new behaviour here is wrong. I'll look into this and try to get it fixed (and add a webrender regression test).

Flags: needinfo?(david.turner)
Severity: -- → S3
Priority: -- → P2

My fix for Bug 1836063 didn't take into account that there could be
clips between the old picture clip and the Lowest Common Ancestor (LCA)
clip. In this case, even when the pic clip and LCA clip are identical,
moving the clip root from the former to the latter would cause any clips
between these two to be ignored.

This commit checks that the pic clip is the direct parent of the LCA
clip, so we aren't accidentally skipping any clips between the two.
I've checked that the original optimisation still works in Firefox and
the invalidation reftest still passes.

I also add a new regression reftest for this specific bug, created from
the reported test case.

Assignee: nobody → david.turner
Status: NEW → ASSIGNED
Pushed by archaeopteryx@coole-files.de: https://hg.mozilla.org/integration/autoland/rev/6aa27a24c85d Fix incorrect optimisation with clip between LCA and pic r=gw,gfx-reviewers
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 120 Branch

The patch landed in nightly and beta is affected.
:david.turner, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox119 to wontfix.

For more information, please visit BugBot documentation.

Flags: needinfo?(david.turner)

I don't think this needs uplifting but do say if anyone else disagrees.

I don't seem to have permission to set this as wontfix for 119

Flags: needinfo?(david.turner)
Flags: qe-verify+

I was able to reproduce the issue on Win11 using FF build 119.0a1(2023-09-20).
Verified as fixed on Win11/Ubuntu 22.04/Mac12.6 using FF build 120.0b4, 121.0a1.

Status: RESOLVED → VERIFIED
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: