mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 17:55:07 +02:00
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:
committed by
Tim Ledbetter
parent
8d1c860fcd
commit
b3d9e39bad
Notes:
github-actions[bot]
2025-06-30 19:39:31 +00:00
Author: https://github.com/awesomekling Commit: https://github.com/LadybirdBrowser/ladybird/commit/b3d9e39bad4 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5248 Reviewed-by: https://github.com/tcl3 ✅
@@ -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>
|
||||
Reference in New Issue
Block a user