ladybird/Libraries/LibWeb/HTML/Parser
Andreas Kling 171e3adf01 LibWeb: Replace the HTML tokenizer with Rust
Replace the C++ HTML tokenizer with a Rust implementation behind the
existing HTMLTokenizer API.

Keep the parser-facing integration points for streaming input,
insertion points, document.write(), EOF insertion, parser aborts,
speculative parser input, and last start tag tracking. The generated
FFI handle stays an implementation detail of HTMLTokenizer, so callers
keep a single tokenizer class.

Preserve duplicate attributes through FFI so C++ token normalization can
record the duplicate-attribute signal used by CSP nonce checks. Keep
bulk tag-name and attribute scans capped at the active insertion point
so streamed parser input is spliced at the right offset.

Use generated DAFSA tables for named character references and intern
common tag and attribute names to reduce FFI marshalling overhead. This
also fixes attribute name source positions, nested old insertion points,
and aborted fast-path handling.

TestHTMLTokenizer covers duplicate attributes and insertion points in
fast tag-name, attribute-name, and quoted-value scans. A CSP text test
covers duplicate nonce attributes on parser-created script elements.
The tokenizer dump fixtures still match, TestHTMLTokenizer passes, and
the full release test-web run passes with 6981 tests and 226 skipped.
2026-05-15 21:01:40 +02:00
..
Rust LibWeb: Replace the HTML tokenizer with Rust 2026-05-15 21:01:40 +02:00
Entities.cpp LibWeb/HTML: Improve data structure of named character reference data 2025-07-14 09:43:08 +02:00
Entities.h LibWeb/HTML: Improve data structure of named character reference data 2025-07-14 09:43:08 +02:00
Entities.json LibWeb: Make named character references more spec-compliant & efficient 2025-03-22 16:03:44 +01:00
HTMLEncodingDetection.cpp LibWeb: Extract some CORS and MIME Fetch helpers to their own files 2025-11-27 14:57:29 +01:00
HTMLEncodingDetection.h LibWeb: Extract some CORS and MIME Fetch helpers to their own files 2025-11-27 14:57:29 +01:00
HTMLParser.cpp LibWeb: Let document.write() reenter parser from parser-blocking scripts 2026-05-15 19:49:45 +02:00
HTMLParser.h LibWeb/HTML: Support align attributes on table sections and rows 2026-04-30 15:20:22 +02:00
HTMLToken.cpp LibWeb: Track if element was created from token with dupe attributes 2025-07-09 15:52:54 -06:00
HTMLToken.h LibWeb: Reduce size of Optional<HTMLToken> 2026-03-20 12:03:36 +01:00
HTMLTokenizer.cpp LibWeb: Replace the HTML tokenizer with Rust 2026-05-15 21:01:40 +02:00
HTMLTokenizer.h LibWeb: Replace the HTML tokenizer with Rust 2026-05-15 21:01:40 +02:00
IncrementalDocumentParser.cpp LibWeb: Add incremental HTML parsing 2026-04-29 04:12:44 +02:00
IncrementalDocumentParser.h LibWeb: Add incremental HTML parsing 2026-04-29 04:12:44 +02:00
ListOfActiveFormattingElements.cpp LibWeb: Keep the tokens in ListOfActiveFormattingElements 2025-10-21 23:36:07 +02:00
ListOfActiveFormattingElements.h LibWeb: Keep the tokens in ListOfActiveFormattingElements 2025-10-21 23:36:07 +02:00
ParserScriptingMode.h LibWeb: Set fragment scripting mode from the context document 2026-04-14 23:01:36 +02:00
SpeculativeHTMLParser.cpp Revert "LibWeb: Have speculative HTML parser populate the preload map" 2026-04-30 04:55:31 +02:00
SpeculativeHTMLParser.h LibWeb: Implement the speculative HTML parser 2026-04-26 18:48:29 +02:00
SpeculativeMockElement.cpp LibWeb: Implement the speculative HTML parser 2026-04-26 18:48:29 +02:00
SpeculativeMockElement.h LibWeb: Implement the speculative HTML parser 2026-04-26 18:48:29 +02:00
StackOfOpenElements.cpp LibWeb: Add HTMLSelectedContentElement for customizable select 2025-12-12 12:06:24 +00:00
StackOfOpenElements.h LibWeb: Add HTMLSelectedContentElement for customizable select 2025-12-12 12:06:24 +00:00