ladybird/Tests/LibWeb/Text/input/HTML/scrollParent-infinite-loop.html
Andreas Kling b3d9e39bad 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. :^)
2025-06-30 20:38:21 +01:00

9 lines
206 B
HTML

<!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>