LibWeb: Avoid infinite loop in HTMLElement.scrollParent

We were failing to actually climb up the containing block chain,
causing this API to infinite loop for anything but the most
trivial cases.

By fixing the loop structure, we also make a bunch of the already
imported WPT tests pass. :^)
This commit is contained in:
Andreas Kling
2025-06-30 15:11:44 +02:00
committed by Tim Ledbetter
parent 8d1c860fcd
commit b3d9e39bad
Notes: github-actions[bot] 2025-06-30 19:39:31 +00:00
6 changed files with 33 additions and 15 deletions

View File

@@ -0,0 +1,9 @@
<!doctype html>
<script src="../include.js"></script>
<body><div id=foo><div id=bar></div></div>
<script>
test(() => {
bar.scrollParent;
println("PASS (didn't hang)");
});
</script>