1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 06:47:35 +00:00

LibWeb: Fix border painting with border-radius and zero-width sides

When joined border width is zero width, then the midpoint
of the joined corner is no longer need to be computed
anymore. Just set the mid point to be the endpoint of the
corner.
This commit is contained in:
zhiyuang 2023-07-24 19:09:34 +08:00 committed by Andreas Kling
parent 8f7b269bf1
commit 94491ead67
2 changed files with 71 additions and 41 deletions

View file

@ -70,6 +70,22 @@
border-left: 20px solid blue;
}
.box-1-13 {
border-radius: 15px;
border-color: black;
border: 3px solid black;
border-top-width: 0;
border-bottom-width: 0;
}
.box-1-14 {
border-radius: 15px;
border-color: black;
border: 3px solid black;
border-left-width: 0;
border-right-width: 0;
}
.box-3 {
border: 1px solid black;
border-top-right-radius: 10px;
@ -418,6 +434,12 @@
<em>Four border with different colors</em>
<div class="box box-1-12"></div>
<br>
<em>Border radius with top and bottom zero width</em>
<div class="box box-1-13"></div>
<br>
<em>Border radius with left and right zero width</em>
<div class="box box-1-14"></div>
<br>
<em>top-left 10px</em>
<div class="box box-2"></div>
<br>