LibWeb: Fix document element's .scrollHeight and .scrollWidth

We were using the viewport's size as the viewport scrolling area, but
those are completely different things.
This commit is contained in:
Jelle Raaijmakers 2025-06-17 16:55:24 +02:00 committed by Tim Ledbetter
commit e8e6dbcee0
Notes: github-actions[bot] 2025-06-17 16:18:46 +00:00
8 changed files with 36 additions and 16 deletions

View file

@ -0,0 +1,16 @@
<!DOCTYPE html>
<style>
#a {
background: red;
height: 1432px;
width: 1234px;
}
</style>
<div id="a"></div>
<script src="../include.js"></script>
<script>
test(() => {
println(`document.documentElement.scrollWidth: ${document.documentElement.scrollWidth}`);
println(`document.documentElement.scrollHeight: ${document.documentElement.scrollHeight}`);
});
</script>