ladybird/Tests/LibWeb/Text/input/html-parser-text-in-table-hoisting.html
Andreas Kling 5cdb394400 LibWeb: Make HTML parser flush all pending tokens in "in table text"
There were multiple bugs in the parsing algorithm for handling text
occurring inside a `table` element:

- When there was pending non-whitespace text inside a table, we only
  flushed one token instead of all pending tokens.

- Also, we didn't even flush one of the right tokens, but instead the
  token that caused the flush to happen.

- Once we started flushing the right tokens, it turned out we had not
  yet implemented character insertion points expressed as "before X".

- Finally, we were not exiting the "in table text" mode after flushing
  pending tokens, effectively getting us stuck in that mode until EOF.
2023-07-03 11:50:58 +02:00

11 lines
329 B
HTML

<script src="include.js"></script>
<body><table><tr>PASS</tr></table></body>
<script>
test(() => {
// Remove the table. "PASS" should still be visible,
// as the HTML parser inserts it *before* the table
// under these circumstances.
document.querySelector("table").remove()
});
</script>