Files
ladybird/Libraries/LibWeb/HTML/Parser/HTMLTokenizer.cpp
Aliaksandr Kalenik c8368882b8 LibWeb: Allow tokenizer to run out of characters mid-tokenization
Add can_run_out_of_characters() and use it in the
NamedCharacterReference state and consume_next_if_match() so that an
open input stream gets the same code-point-at-a-time treatment as an
active document.write insertion point. Without this, a network chunk
that ends partway through a named character reference or a
multi-character match would make the tokenizer commit to a "no match"
decision before the remaining bytes arrive.

No behavior change for existing callers: the new helper still returns
false once the input stream is closed (which the StringView constructor
sets immediately).
2026-04-29 04:12:44 +02:00

119 KiB