mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:47:35 +00:00
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.
This commit is contained in:
parent
8c3e5137f7
commit
5cdb394400
3 changed files with 25 additions and 12 deletions
|
@ -0,0 +1,10 @@
|
|||
<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>
|
Loading…
Add table
Add a link
Reference in a new issue