mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 10:07:44 +00:00
LibWeb: Use border box rect in getBoundingClientRect()
With this change we scroll to correct position on Acid2 :)
This commit is contained in:
parent
ef71f46da6
commit
6bed27cca9
3 changed files with 20 additions and 1 deletions
18
Tests/LibWeb/Text/input/get-bounding-client-rect.html
Normal file
18
Tests/LibWeb/Text/input/get-bounding-client-rect.html
Normal file
|
@ -0,0 +1,18 @@
|
|||
<!DOCTYPE html>
|
||||
<style type="text/css">
|
||||
#box {
|
||||
margin-top: 500px;
|
||||
padding-top: 100px;
|
||||
background-color: navy;
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
}
|
||||
</style>
|
||||
<div id="box"></div>
|
||||
<script src="include.js"></script>
|
||||
<script>
|
||||
test(() => {
|
||||
const rect = document.getElementById("box").getBoundingClientRect();
|
||||
println(JSON.stringify(rect));
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue