Implement correct corner clipping for background color

Add one regression ref test.

See also #19649
This commit is contained in:
Pyfisch 2017-12-29 21:27:58 +01:00
parent 691bff86b6
commit b3b49e3ff0
4 changed files with 104 additions and 15 deletions

View file

@ -96489,6 +96489,18 @@
{}
]
],
"css/css-backgrounds/background-clip/clip-rounded-corner.html": [
[
"/css/css-backgrounds/background-clip/clip-rounded-corner.html",
[
[
"/css/css-backgrounds/background-clip/clip-rounded-corner-ref.html",
"=="
]
],
{}
]
],
"css/css-backgrounds/background-clip_padding-box.html": [
[
"/css/css-backgrounds/background-clip_padding-box.html",
@ -228178,6 +228190,11 @@
{}
]
],
"css/css-backgrounds/background-clip/clip-rounded-corner-ref.html": [
[
{}
]
],
"css/css-backgrounds/background-clip/list.txt": [
[
{}
@ -463840,6 +463857,14 @@
"0ab3cfb39cd0348b7e28ed7b1405f0c3490808a7",
"visual"
],
"css/css-backgrounds/background-clip/clip-rounded-corner-ref.html": [
"d58d1e2f9fed2d5331db9aaeaeb50e4b3f26a1e6",
"support"
],
"css/css-backgrounds/background-clip/clip-rounded-corner.html": [
"ea68b7be35cb2637bad30119a2d1ee9734dc63ff",
"reftest"
],
"css/css-backgrounds/background-clip/list.txt": [
"51b104b69911943bc5469c093046d5c0eb45334a",
"support"

View file

@ -0,0 +1,26 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>Filled Background with Rounded Corner</title>
<style>
#a {
width: 100px;
height: 80px;
border: 20px blue solid;
border-top-right-radius: 20px;
background-color: green;
background-clip: border-box;
}
#shield {
position: absolute;
width: 30px;
height: 30px;
left: 120px;
top: 5px;
background-color: black;
}
</style>
<body>
<div id="a"></div>
<!-- Hide the curved outside border to deal with imprecise rendering. -->
<div id="shield"></div>
</body>

View file

@ -0,0 +1,28 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>Filled Background with Rounded Corner</title>
<link rel="match" href="clip-rounded-corner-ref.html">
<link rel="help" href="https://drafts.csswg.org/css-backgrounds-3/#corner-clipping">
<style>
#b {
width: 100px;
height: 80px;
border: 20px blue solid;
border-top-right-radius: 20px;
background-color: green;
background-clip: content-box;
}
#shield {
position: absolute;
width: 30px;
height: 30px;
left: 120px;
top: 5px;
background-color: black;
}
</style>
<body>
<div id="b"></div>
<!-- Hide the curved outside border to deal with imprecise rendering. -->
<div id="shield"></div>
</body>