ladybird/Libraries/LibWeb/CSS/Parser
Andreas Kling f4960d9d7d LibWeb: Honor requested CSS tokenizer encoding
Keep decoded CSS text separate from tokenizer byte input. CSSOM and
already-decoded stylesheet text preserve code point preprocessing, so a
lone surrogate maps to one replacement character instead of being
re-decoded as malformed UTF-8 bytes.

Decode tokenizer byte input with the requested encoding unless that
encoding is UTF-8 and the byte stream is strictly valid UTF-8. Keep the
fast path by constructing the decoded string without validating twice
after strict validation succeeds.

Preserve UTF-8 decoder behavior on the byte fast path by stripping an
initial UTF-8 BOM and rejecting encoded surrogate bytes. Invalid UTF-8
still goes through the decoder. Add tokenizer coverage for both the C++
and Rust backends across decoded text, UTF-8 aliases, BOM-prefixed
input, invalid UTF-8, and non-UTF requested encodings.
2026-05-18 14:08:22 +02:00
..
ArbitrarySubstitutionFunctions.cpp LibWeb: Give BooleanExpression an evaluation context 2026-05-13 11:05:31 +01:00
ArbitrarySubstitutionFunctions.h LibWeb: Implement CSS inherit() function 2026-03-19 10:25:37 +01:00
ComponentValue.cpp LibWeb: Parse CSS image-set() 2026-04-25 14:54:10 +02:00
ComponentValue.h LibWeb: Parse CSS image-set() 2026-04-25 14:54:10 +02:00
DescriptorParsing.cpp LibWeb: Support multiple keywords in parse_specific_keyword_value 2026-05-13 11:00:07 +01:00
ErrorReporter.cpp WebContent+LibWeb/CSS: Add debug request to dump CSS errors 2025-08-04 10:50:09 +01:00
ErrorReporter.h LibWeb: Enable EXPLICIT_SYMBOL_EXPORT 2025-08-23 16:04:36 -06:00
GradientParsing.cpp LibWeb: Explicitly pass calculation context when parsing 2026-04-22 14:24:12 +01:00
Helpers.cpp LibWeb: Preserve immutable consumed body bytes 2026-05-18 01:21:34 +02:00
MediaParsing.cpp LibWeb: Explicitly pass calculation context when parsing 2026-04-22 14:24:12 +01:00
Parser.cpp LibWeb: Give BooleanExpression an evaluation context 2026-05-13 11:05:31 +01:00
Parser.h LibWeb: Preserve immutable consumed body bytes 2026-05-18 01:21:34 +02:00
PropertyParsing.cpp LibWeb: Support multiple keywords in parse_specific_keyword_value 2026-05-13 11:00:07 +01:00
RuleContext.cpp LibWeb/CSS: Implement initial parsing for @container rules 2026-03-30 14:49:24 +01:00
RuleContext.h LibWeb/CSS: Implement initial parsing for @container rules 2026-03-30 14:49:24 +01:00
RuleParsing.cpp LibWeb/CSS: Update grammar for @container 2026-05-13 11:05:31 +01:00
RustTokenizer.cpp LibWeb: Honor requested CSS tokenizer encoding 2026-05-18 14:08:22 +02:00
RustTokenizer.h LibWeb: Honor requested CSS tokenizer encoding 2026-05-18 14:08:22 +02:00
SelectorParsing.cpp LibWeb/CSS: Insert a combinator before all pseudo-element selectors 2026-05-13 11:03:02 +01:00
Syntax.cpp LibWeb: Limit <ident> to <custom-ident> in @property/syntax 2026-03-26 01:11:39 +00:00
Syntax.h LibWeb: Limit <ident> to <custom-ident> in @property/syntax 2026-03-26 01:11:39 +00:00
SyntaxParsing.cpp LibWeb: Explicitly pass calculation context when parsing 2026-04-22 14:24:12 +01:00
SyntaxParsing.h LibWeb: Expose parse_syntax_component 2026-03-27 11:19:28 +00:00
Token.cpp LibWeb/CSS: Port the CSS Tokenizer to Rust 2026-05-03 09:49:00 +02:00
Token.h LibWeb/CSS: Port the CSS Tokenizer to Rust 2026-05-03 09:49:00 +02:00
Tokenizer.cpp LibWeb: Honor requested CSS tokenizer encoding 2026-05-18 14:08:22 +02:00
Tokenizer.h LibWeb: Honor requested CSS tokenizer encoding 2026-05-18 14:08:22 +02:00
TokenStream.h LibWeb/CSS: Un-deprecate TokenStream::peek_token() 2026-04-16 14:52:22 +01:00
Types.cpp LibWeb: Move ASF presence checking into Parser 2026-03-30 19:57:36 +01:00
Types.h LibWeb: Move ASF presence checking into Parser 2026-03-30 19:57:36 +01:00
ValueParsing.cpp LibWeb: Generate CSS <paint> parsing 2026-05-13 11:26:20 +01:00