Closed Bug 1830603 Opened 3 years ago Closed 9 days ago

background clipping with border-radius is broken in WebRender

Categories

(Core :: Graphics: WebRender, defect)

defect

Tracking

()

RESOLVED FIXED
155 Branch
Tracking Status
firefox-esr102 --- wontfix
firefox-esr115 --- wontfix
firefox-esr140 --- wontfix
firefox-esr153 --- wontfix
firefox112 --- wontfix
firefox113 --- wontfix
firefox114 --- wontfix
firefox115 --- wontfix
firefox153 --- wontfix
firefox154 --- wontfix
firefox155 --- fixed

People

(Reporter: Oriol, Assigned: gw)

References

(Blocks 2 open bugs, Regression)

Details

(Keywords: correctness, parity-chrome, regression)

Attachments

(4 files)

Attached file testcase.html

Load testcase.
The cyan background is clipped with background-clip set to padding-box or content-box.
Therefore, it shouldn't overlap the magenta border.
But they can overlap when using border-radius.
This didn't happen before WebRender.

Attached image bad (Gecko)
Attached image good (Blink)
Summary: Bad background clipping with border-radius is broken in WebRender → background clipping with border-radius is broken in WebRender

KDE Wayland, Debian Testing, Intel
When the turquoise part became as misplaced as today:
MOZ_DISABLE_CONTENT_SANDBOX=1 mozregression --good 2017-10-10 --bad 2018-01-01 --pref gfx.webrender.all:true layers.acceleration.force-enabled:true gfx.webrender.enabled:true gfx.webrendest.enabled:true gfx.webrender.layers-free:true gfx.webrender.blob-images:true image.mem.shared:true layout.display-list.retain:false -a https://bug1830603.bmoattachments.org/attachment.cgi?id=9330872

2:49.71 INFO: Last good revision: 7c4579e705c4a3a3610183fe6f44affff3ad57ef (2017-12-19)
2:49.71 INFO: First bad revision: 62dd5404cf55e29412d5fff8fe9105076b1ca437 (2017-12-20)
2:49.71 INFO: Pushlog:
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=7c4579e705c4a3a3610183fe6f44affff3ad57ef&tochange=62dd5404cf55e29412d5fff8fe9105076b1ca437

autoland builds are gone.
Likely:

16240aca46cbdcc67b48e5f47bfc92ef852a3e70 Kartikaya Gupta — Bug 1424631 - Update webrender to commit 1142dfc557c319119a5117450718c5b67a93cb9f. r=jrmuizel

= https://github.com/servo/webrender/compare/f9bc4a5c263e707e3498bea47d3ec9096cc3d099...1142dfc557c319119a5117450718c5b67a93cb9f


When the pink border temporarily became darker at 4 overlapping places:
MOZ_DISABLE_CONTENT_SANDBOX=1 mozregression --good 2017-01-01 --bad 2018-01-01 --pref gfx.webrender.all:true layers.acceleration.force-enabled:true gfx.webrender.enabled:true gfx.webrendest.enabled:true gfx.webrender.layers-free:true gfx.webrender.blob-images:true image.mem.shared:true layout.display-list.retain:false -a https://bug1830603.bmoattachments.org/attachment.cgi?id=9330872

6:14.18 INFO: Last good revision: 8e98dab5054dd093a37ba20c62cf0523e484cfbd (2017-05-19)
6:14.18 INFO: First bad revision: 8d60d0f825110cfb646ac31dc16dc011708bcf34 (2017-05-20)
6:14.18 INFO: Pushlog:
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=8e98dab5054dd093a37ba20c62cf0523e484cfbd&tochange=8d60d0f825110cfb646ac31dc16dc011708bcf34

OS: Unspecified → All
Regressed by: 1424631
Hardware: Unspecified → All

:kats, since you are the author of the regressor, bug 1424631, could you take a look?

For more information, please visit BugBot documentation.

Flags: needinfo?(kats)
Flags: needinfo?(kats)
Flags: needinfo?(gwatson)
Severity: -- → S3
Flags: needinfo?(gwatson)

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

background-clip: padding-box|content-box clips to the inner border edge, which
css-backgrounds-3 4.4 defines as concentric with the outer edge with radii of
outer-minus-border-width. Those can exceed the padding box and still describe a
valid shape: the arc centre falls outside the rect and the arc is cut by the far
edges. clamped_radius() scaled them down, making the clip larger than the
border's inner curve, so the background spilled under the border and showed
through wherever it was translucent.

Only constrain an edge when both of its corners are curved, which is the only
way two arcs can overlap each other.

This can't be a blanket rule. A box-shadow's spread-adjusted radii are a plain
rounded rect and do take the css-backgrounds-3 5.5 reduction; Chrome agrees on
both counts, and the two cases can't be told apart from the radii alone. So
zero-blur box-shadows, which desugar into rounded-rect clips, are normalised at
the producer instead.

Assignee: nobody → mozilla
Status: NEW → ASSIGNED
Pushed by gwatson@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/25e660c8c349 https://hg.mozilla.org/integration/autoland/rev/9bf7613c28dd Don't re-normalise a lone oversized corner radius on a clip r=gfx-reviewers,nical
Status: ASSIGNED → RESOLVED
Closed: 9 days ago
Resolution: --- → FIXED
Target Milestone: --- → 155 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: