mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-18 08:20:44 +00:00
LibWeb: Apply clip rect before painting images
Previously, the clip property was ignored when painting images.
This commit is contained in:
parent
212d748ded
commit
2ff9e1d038
Notes:
github-actions[bot]
2025-06-24 11:57:59 +00:00
Author: https://github.com/tcl3
Commit: 2ff9e1d038
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5185
Reviewed-by: https://github.com/AtkinsSJ ✅
2 changed files with 16 additions and 0 deletions
14
Tests/LibWeb/Ref/input/css/css-masking/clip-image.html
Normal file
14
Tests/LibWeb/Ref/input/css/css-masking/clip-image.html
Normal 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">
|
Loading…
Add table
Add a link
Reference in a new issue