Repository navigation
Commit be31281
committed
fix(html): halt streaming on any mid-stack open-stack removal
`removeOpenAt` only halted when the removed element was already entered.
An element the walk had not entered yet is just as unsafe: it leaves the
stack while descendants stay open, and the next sync enters those
descendants against an open stack that no longer describes their parent.
A document that crosses the streaming threshold before reaching
`<form><div></form><p>y</p></div>` lost the div and its paragraph
entirely — main visits eight nodes there, the streamed walk visited four.
Key the halt on the mid-stack test alone. Removing the top of the stack,
which is the common `</form>` after implied end tags, still streams: 40k
forms retain 2.80 MiB against main's 9.50 MiB.1 parent 657f73d commit be31281
2 files changed
Lines changed: 28 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5280 | 5280 | | |
5281 | 5281 | | |
5282 | 5282 | | |
5283 | | - | |
5284 | | - | |
5285 | | - | |
5286 | | - | |
5287 | | - | |
5288 | | - | |
| 5283 | + | |
| 5284 | + | |
| 5285 | + | |
| 5286 | + | |
| 5287 | + | |
| 5288 | + | |
5289 | 5289 | | |
5290 | 5290 | | |
5291 | 5291 | | |
5292 | | - | |
5293 | 5292 | | |
5294 | 5293 | | |
5295 | 5294 | | |
5296 | | - | |
5297 | | - | |
5298 | | - | |
| 5295 | + | |
5299 | 5296 | | |
5300 | 5297 | | |
5301 | 5298 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4428 | 4428 | | |
4429 | 4429 | | |
4430 | 4430 | | |
| 4431 | + | |
| 4432 | + | |
| 4433 | + | |
| 4434 | + | |
| 4435 | + | |
| 4436 | + | |
| 4437 | + | |
| 4438 | + | |
| 4439 | + | |
| 4440 | + | |
| 4441 | + | |
| 4442 | + | |
| 4443 | + | |
| 4444 | + | |
| 4445 | + | |
| 4446 | + | |
| 4447 | + | |
| 4448 | + | |
| 4449 | + | |
| 4450 | + | |
| 4451 | + | |
4431 | 4452 | | |
4432 | 4453 | | |
4433 | 4454 | | |
| |||
0 commit comments