mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-28 15:28:55 +00:00
LibWeb: Always flush character insertions before exiting HTML parser
This fixes an issue where document.write() with only text input would leave all the character data as unflushed text in the parser. This fixes many of the WPT tests for document.write().
This commit is contained in:
parent
089139f09d
commit
a0ed12e839
Notes:
github-actions[bot]
2024-09-21 13:51:07 +00:00
Author: https://github.com/awesomekling
Commit: a0ed12e839
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1469
3 changed files with 8 additions and 1 deletions
|
@ -177,7 +177,7 @@ void HTMLParser::run(HTMLTokenizer::StopAtInsertionPoint stop_at_insertion_point
|
|||
for (;;) {
|
||||
// FIXME: Find a better way to say that we come from Document::close() and want to process EOF.
|
||||
if (!m_tokenizer.is_eof_inserted() && m_tokenizer.is_insertion_point_reached())
|
||||
return;
|
||||
break;
|
||||
|
||||
auto optional_token = m_tokenizer.next_token(stop_at_insertion_point);
|
||||
if (!optional_token.has_value())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue