mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-02 14:19:48 +00:00
Tests: Regression test recent image rendering bug when scrolling
e055927ead
introduced a regression that caused images to not be rendered when the page was scrolled. This was subsequently reverted in16b14273d1
. To ensure this mistake cannot happen again, this commit introduces a regression test for that error case.
This commit is contained in:
parent
0e1eb4d4a7
commit
5d3b45127e
Notes:
github-actions[bot]
2025-03-10 16:15:10 +00:00
Author: https://github.com/InvalidUsernameException
Commit: 5d3b45127e
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3854
2 changed files with 46 additions and 0 deletions
|
@ -0,0 +1,19 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<style>
|
||||||
|
html { scrollbar-width: none; }
|
||||||
|
body {
|
||||||
|
position: relative;
|
||||||
|
height: 400vh;
|
||||||
|
}
|
||||||
|
#background-image {
|
||||||
|
display: inline-block;
|
||||||
|
width: 120px;
|
||||||
|
height: 120px;
|
||||||
|
background-image: url("../../Assets/120.png");
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<div id="container">
|
||||||
|
<img src="../../Assets/120.png" />
|
||||||
|
<div id="background-image"></div>
|
||||||
|
</div>
|
27
Tests/LibWeb/Ref/input/bitmaps-with-scroll-offset.html
Normal file
27
Tests/LibWeb/Ref/input/bitmaps-with-scroll-offset.html
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<link rel="match" href="../expected/bitmaps-with-scroll-offset-ref.html" />
|
||||||
|
<style>
|
||||||
|
html { scrollbar-width: none; }
|
||||||
|
body {
|
||||||
|
position: relative;
|
||||||
|
height: 400vh;
|
||||||
|
}
|
||||||
|
#container {
|
||||||
|
position: absolute;
|
||||||
|
top: 200px;
|
||||||
|
}
|
||||||
|
#background-image {
|
||||||
|
display: inline-block;
|
||||||
|
width: 120px;
|
||||||
|
height: 120px;
|
||||||
|
background-image: url("../../Assets/120.png");
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<div id="container">
|
||||||
|
<img src="../../Assets/120.png" />
|
||||||
|
<div id="background-image"></div>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
window.scrollTo(0, 200);
|
||||||
|
</script>
|
Loading…
Add table
Add a link
Reference in a new issue