Commit 15d8be74 authored by Noam Rosenthal's avatar Noam Rosenthal Committed by aborovova@mozilla.com
Browse files

Bug 1967761 [wpt PR 52694] - corner-shape: render color-join for overlapping corners,

Automatic update from web-platform-tests
corner-shape: render color-join for overlapping corners

Instead of relying on the existing polygon, clip the following
when concave corners are present in the border side, or the border
side is going to overlap some other concave corner:

1. Clip the inner border of the side, inclusive without taking
   color joins into account. Always antialiased.
2. Clip out the area of each corner that should be hidden because of
   the color join.

Moved tests for this out of WPT to internal web tests,
as color-joins are not specified in an interoperable way anyway.

This algorithm might still output some antialiasing artifacts, but
otherwise it should mostly work.

See illustration:
https://docs.google.com/document/d/1z8CkPaOZCz49OywDEwQR7m7VfWkfhxdmAglBD-b6nCw

Bug: 399449172
Change-Id: I2ea20f48ad59754d6bfd2ab8d5e990c1a5167d90
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6469836
Reviewed-by: default avatarFlorin Malita <fmalita@chromium.org>
Commit-Queue: Noam Rosenthal <nrosenthal@google.com>
Cr-Commit-Position: refs/heads/main@{#1463611}

--

wpt-commits: 9a60d0a285c47810dd0536b9614143e127c1720d
wpt-pr: 52694

Differential Revision: https://phabricator.services.mozilla.com/D250980
parent d728e4fa
Loading
Loading
Loading
Loading
+0 −2
Changes for testing/web-platform/tests/css/css-borders/tentative/corner-shape/corner-shape-render-fuzzy.html: 0 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -4,9 +4,7 @@
<link rel="help" href="https://drafts.csswg.org/css-borders-4/#corner-shaping">
<link rel="match" href="corner-shape-any-ref.html">
<meta name="fuzzy" content="maxDifference=0-200;totalPixels=0-550">
<meta name="variant" content="?corner-shape=scoop&border-radius=20%&border-width=20px&border-top-color=rebeccapurple&border-bottom-color=blue">
<meta name="variant" content="?corner-shape=scoop&border-radius=20%&border-width=20px">
<meta name="variant" content="?corner-top-left-shape=notch&border-radius=40px&border-width=10px&border-color=blue&border-left-color=yellow">
<meta name="variant" content="?corner-shape=superellipse(-2)&border-radius=20%&border-width=20px">
<meta name="variant" content="?corner-top-left-shape=bevel&border-radius=40px&border-width=10px">
<meta name="variant" content="?corner-top-left-shape=scoop&corner-top-right-shape=scoop&border-radius=50%">