ladybird/Tests
Sam Atkins b645e26e9b LibWeb/CSS: Bring TokenStream in line with spec
When the TokenStream code was originally written, there was no such
concept in the CSS Syntax spec. But since then, it's been officially
added, (https://drafts.csswg.org/css-syntax/#css-token-stream) and the
parsing algorithms are described in terms of it. This patch brings our
implementation in line with the spec. A few deprecated TokenStream
methods are left around until their users are also updated to match the
newer spec.

There are a few differences:

- They name things differently. The main confusing one is we had
  `next_token()` which consumed a token and returned it, but the spec
  has a `next_token()` which peeks the next token. The spec names are
  honestly better than what I'd come up with. (`discard_a_token()` is a
  nice addition too!)

- We used to store the index of the token that was just consumed, and
  they instead store the index of the token that will be consumed next.
  This is a perfect breeding ground for off-by-one errors, so I've
  finally added a test suite for TokenStream itself.

- We use a transaction system for rewinding, and the spec uses a stack
  of "marks", which can be manually rewound to. These should be able to
  coexist as long as we stick with marks in the parser spec algorithms,
  and stick with transactions elsewhere.
2024-10-09 17:29:29 +01:00
..
AK AK: Remove unused floating point conversion code 2024-10-08 19:02:51 +02:00
ClangPlugins ClangPlugins: Add -Wno-unqualified-std-cast-call to test compile options 2024-08-26 17:24:53 -04:00
LibCompress Everywhere: Don't install code generators and test binaries 2024-07-10 10:13:21 -06:00
LibCore LibUnicode: Cache the system time zone 2024-08-25 09:47:42 +02:00
LibCrypto LibCrypto: Move some data around earlier in GHash to make it go faster 2024-05-20 08:03:35 +02:00
LibDiff LibDiff: Fix wrong index used when prepending context lines 2023-09-11 12:10:50 +01:00
LibGfx LibGfx: Set correct alpha type for webp decoding 2024-10-02 16:37:22 +01:00
LibJS LibJS+WebContent: Cache the resolved system time zone identifier 2024-09-03 19:26:04 +02:00
LibMedia LibMedia+Ladybird: Use pkg_check_modules to find pulseaudio 2024-10-02 20:23:03 -04:00
LibRegex LibRegex: Restore checkpoints when restoring the state post-fork 2024-10-09 11:20:58 +02:00
LibTest Everywhere: Remove LibSQL, SQLServer, and the sql REPL :^) 2024-06-06 11:27:03 -04:00
LibTextCodec LibTextCodec: Implement iso-2022-jp encoder 2024-08-08 17:49:58 +01:00
LibThreading LibThreading: Remove the thread pool 2024-09-22 14:07:16 -04:00
LibTLS Revert "LibTLS+Everywhere: Switch to using WolfSSL" 2024-07-06 15:15:34 -06:00
LibUnicode LibUnicode: Remove unused emoji support methods 2024-09-06 15:42:33 -04:00
LibURL Meta: Update my e-mail address everywhere 2024-10-04 13:19:50 +02:00
LibWasm LibWasm+LibWeb+test-wasm: Refcount Wasm::Module for function references 2024-08-22 09:36:40 +02:00
LibWeb LibWeb/CSS: Bring TokenStream in line with spec 2024-10-09 17:29:29 +01:00
LibWebView LibWebView: Allow data URLs in sanitize_url 2024-06-24 06:31:17 -04:00
LibXML LibXML: Actually append resolved references when parsing content 2023-07-23 16:09:12 +02:00
Resources Tests: Convert Swift tests to use Testing module where possible 2024-08-28 21:27:35 -06:00
CMakeLists.txt LibMedia: Absorb LibAudio 2024-09-12 10:01:19 +02:00