1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 23:17:46 +00:00

LibWeb: Fix infinite loop in ChildNode's before() and after()

The loop that was supposed to check the chain of previous or next
siblings had a logic mistake where it would never traverse the chain,
so we would get stuck looking at the immediate sibling forever.
This commit is contained in:
Andreas Kling 2024-03-11 15:27:23 +01:00
parent ad843b6e4a
commit 35f359c51c
5 changed files with 47 additions and 11 deletions

View file

@ -0,0 +1,5 @@
<DIV id="one" >
<DIV id="two" >
<DIV id="two" >
<DIV id="one" >
PASS (didn't crash)

View file

@ -0,0 +1,5 @@
<DIV id="one" >
<DIV id="two" >
<DIV id="two" >
<DIV id="one" >
PASS (didn't crash)