LibWeb: Apply clip rect before painting images

Previously, the clip property was ignored when painting images.
This commit is contained in:
Tim Ledbetter 2025-06-23 14:06:56 +01:00 committed by Sam Atkins
commit 2ff9e1d038
Notes: github-actions[bot] 2025-06-24 11:57:59 +00:00
2 changed files with 16 additions and 0 deletions

View file

@ -0,0 +1,14 @@
<!DOCTYPE html>
<link rel="match" href="../../../../Assets/blank.html" />
<style>
img {
position: absolute;
clip: rect(0px, 0px, 0px, 0px)
}
.translated {
translate: 120px 120px;
}
</style>
<div>blank page</div>
<img alt="This shouldn't be visible" src="../../../../Assets/120.png">
<img class="translated" alt="This also shouldn't be visible" src="../../../../Assets/120.png">