Files
ladybird/Libraries/LibWeb/HTML/Parser/HTMLTokenizer.cpp
Aliaksandr Kalenik c439f810f2 LibWeb: Track input stream closed state in HTMLTokenizer
Add an explicit "input stream closed" flag plus the streaming-input API
(append_to_input_stream, close_input_stream, is_input_stream_closed) to
let a future incremental driver feed bytes as they arrive. Rewrite
should_pause_before_next_input_character so the tokenizer pauses when
the buffer is exhausted but more bytes may still arrive, including the
case where a chunk ends in CR (CRLF normalization needs one code point
of lookahead).

Existing call sites are unaffected: the StringView constructor
immediately marks the input stream closed, and insert_eof() now also
closes the stream so document.close() drives the same exit path.
2026-04-29 04:12:44 +02:00

119 KiB