LibWeb: Don't end parsing after reaching the insertion point

This commit is contained in:
Gingeh 2024-11-26 21:07:09 +11:00 committed by Andreas Kling
parent e176871fdf
commit 0adf261c32
Notes: github-actions[bot] 2024-11-26 22:51:12 +00:00
6 changed files with 128 additions and 9 deletions

View file

@ -191,10 +191,6 @@ void HTMLParser::run(HTMLTokenizer::StopAtInsertionPoint stop_at_insertion_point
m_stop_parsing = false;
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())
break;
auto optional_token = m_tokenizer.next_token(stop_at_insertion_point);
if (!optional_token.has_value())
break;