mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +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 ✅
@@ -2,8 +2,9 @@ Harness status: OK
|
||||
|
||||
Found 4 tests
|
||||
|
||||
4 Fail
|
||||
Fail scrollParent skips intermediate closed shadow tree nodes
|
||||
3 Pass
|
||||
1 Fail
|
||||
Pass scrollParent skips intermediate closed shadow tree nodes
|
||||
Fail scrollParent skips intermediate open shadow tree nodes
|
||||
Fail scrollParent from inside closed shadow tree
|
||||
Fail scrollParent from inside open shadow tree
|
||||
Pass scrollParent from inside closed shadow tree
|
||||
Pass scrollParent from inside open shadow tree
|
||||
@@ -2,14 +2,14 @@ Harness status: OK
|
||||
|
||||
Found 9 tests
|
||||
|
||||
3 Pass
|
||||
6 Fail
|
||||
Fail scrollParent returns the nearest scroll container.
|
||||
Fail hidden element is a scroll container.
|
||||
7 Pass
|
||||
2 Fail
|
||||
Pass scrollParent returns the nearest scroll container.
|
||||
Pass hidden element is a scroll container.
|
||||
Pass Element with no box has null scrollParent.
|
||||
Fail scrollParent follows absolute positioned containing block chain.
|
||||
Pass scrollParent follows absolute positioned containing block chain.
|
||||
Fail scrollParent follows fixed positioned containing block chain.
|
||||
Pass scrollParent of element fixed to root is null.
|
||||
Fail scrollParent of child in root viewport returns document scrolling element.
|
||||
Fail scrollParent of fixed element contained within root is document scrolling element.
|
||||
Fail scrollParent of element fixed to root is null.
|
||||
Pass scrollParent of child in root viewport returns document scrolling element.
|
||||
Pass scrollParent of fixed element contained within root is document scrolling element.
|
||||
Pass scrollParent of body is null.
|
||||
Reference in New Issue
Block a user