LibWeb+Tests: Continue variable expansion if CSS-wide keyword is parsed
Some checks are pending
CI / Lagom (arm64, Sanitizer_CI, false, macos-15, macOS, Clang) (push) Waiting to run
CI / Lagom (x86_64, Fuzzers_CI, false, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, false, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, true, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (arm64, macos-15, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (x86_64, ubuntu-24.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run

This allows the existing fallback logic in `Parser::expand_variables` to
run when a CSS-wide keyword is encountered.
This commit is contained in:
rmg-x 2025-05-16 06:07:33 -05:00 committed by Sam Atkins
parent ab051f2e12
commit e2fa8cf7a8
Notes: github-actions[bot] 2025-05-19 15:33:07 +00:00
3 changed files with 22 additions and 0 deletions

View file

@ -4051,6 +4051,9 @@ bool Parser::expand_variables(DOM::Element& element, Optional<PseudoElement> pse
};
while (source.has_next_token()) {
// FIXME: We should properly cascade here instead of doing a basic fallback for CSS-wide keywords.
if (auto builtin_value = parse_builtin_value(source))
continue;
auto const& value = source.consume_a_token();
if (value.is_block()) {
auto const& source_block = value.block();