LibWeb: Clamp calc()'d shadow blur radius to positive values
Some checks are pending
CI / macOS, arm64, Sanitizer, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / 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 commit is contained in:
Callum Law 2025-09-16 10:50:37 +12:00 committed by Sam Atkins
commit 004bd3dc8f
Notes: github-actions[bot] 2025-09-18 14:23:31 +00:00
5 changed files with 8 additions and 4 deletions

View file

@ -4107,6 +4107,8 @@ RefPtr<StyleValue const> Parser::parse_calculated_value(ComponentValue const& co
},
[](SpecialContext special_context) -> Optional<CalculationContext> {
switch (special_context) {
case SpecialContext::ShadowBlurRadius:
return CalculationContext { .accepted_type_ranges = { { ValueType::Length, { 0, NumericLimits<float>::max() } } } };
case SpecialContext::TranslateZArgument:
// Percentages are disallowed for the Z axis
return CalculationContext {};