mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 12:17:44 +00:00
Tests/LibWeb: Add ref test for SVG background without natural size
This commit is contained in:
parent
8c59f359eb
commit
7c162747ef
4 changed files with 42 additions and 0 deletions
4
Tests/LibWeb/Ref/assets/vertical-rect.svg
Normal file
4
Tests/LibWeb/Ref/assets/vertical-rect.svg
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg viewBox="310 30 170 412" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<rect x="314" y="31" width="164" height="409" color="rgb(0, 0, 0)" fill="#4a90d6" stroke="#222" stroke-dashoffset="" stroke-linejoin="round" stroke-width="2"/>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 272 B |
Binary file not shown.
After Width: | Height: | Size: 449 B |
|
@ -0,0 +1,14 @@
|
||||||
|
<style>
|
||||||
|
* {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
body {
|
||||||
|
background-color: white;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<!-- To rebase:
|
||||||
|
1. Open svg-background-no-natural-size.html in Ladybird
|
||||||
|
2. Right click > "Take Full Screenshot"
|
||||||
|
3. Update the image below:
|
||||||
|
-->
|
||||||
|
<img src="./images/svg-background-no-natural-size-ref.png">
|
24
Tests/LibWeb/Ref/svg-background-no-natural-size.html
Normal file
24
Tests/LibWeb/Ref/svg-background-no-natural-size.html
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
<!doctype html>
|
||||||
|
<link rel="match" href="reference/svg-background-no-natural-size-ref.html" />
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
background-color: white;
|
||||||
|
}
|
||||||
|
div {
|
||||||
|
border: 1px solid black;
|
||||||
|
height: 50px;
|
||||||
|
width: 50px;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: 50% 50%;
|
||||||
|
}
|
||||||
|
.svg-rect {
|
||||||
|
background-size: 34%;
|
||||||
|
background-image: url(assets/vertical-rect.svg);
|
||||||
|
}
|
||||||
|
img {
|
||||||
|
width: 100px;
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<div class="svg-rect"></div>
|
||||||
|
<body><span></span><img src="assets/vertical-rect.svg">
|
Loading…
Add table
Add a link
Reference in a new issue