mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 19:59:17 +00:00
LibWeb/SVG: Disallow negative stroke-dasharray
values
Some checks are pending
CI / macOS, arm64, Sanitizer_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, 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
Some checks are pending
CI / macOS, arm64, Sanitizer_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, 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:
parent
0c8a90166f
commit
ac25f47e8f
Notes:
github-actions[bot]
2025-06-27 21:01:48 +00:00
Author: https://github.com/tcl3
Commit: ac25f47e8f
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5238
Reviewed-by: https://github.com/gmta ✅
3 changed files with 44 additions and 0 deletions
|
@ -2045,12 +2045,19 @@ RefPtr<CSSStyleValue const> Parser::parse_stroke_dasharray_value(TokenStream<Com
|
|||
|
||||
// A <dasharray> is a list of comma and/or white space separated <number> or <length-percentage> values. A <number> value represents a value in user units.
|
||||
auto value = parse_number_value(tokens);
|
||||
if (value && value->is_number() && value->as_number().value() < 0)
|
||||
return {};
|
||||
|
||||
if (value) {
|
||||
dashes.append(value.release_nonnull());
|
||||
} else {
|
||||
auto value = parse_length_percentage_value(tokens);
|
||||
if (!value)
|
||||
return {};
|
||||
if (value->is_percentage() && value->as_percentage().value() < 0)
|
||||
return {};
|
||||
if (value->is_length() && value->as_length().length().raw_value() < 0)
|
||||
return {};
|
||||
dashes.append(value.release_nonnull());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue