mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-08 09:09:43 +00:00
LibWeb: Don't crash when encountering calc() inside a CSS rect() value
This allows us to run the WPT tests under quirks/unitless-length/ without crashing, giving us over 4600 new passing subtests. :^)
This commit is contained in:
parent
5e240f997c
commit
5df6c6eecf
Notes:
github-actions[bot]
2024-10-09 13:15:10 +00:00
Author: https://github.com/awesomekling
Commit: 5df6c6eecf
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1698
Reviewed-by: https://github.com/tcl3 ✅
3 changed files with 20 additions and 1 deletions
|
@ -2710,7 +2710,10 @@ RefPtr<CSSStyleValue> Parser::parse_rect_value(TokenStream<ComponentValue>& toke
|
|||
auto maybe_length = parse_length(argument_tokens);
|
||||
if (!maybe_length.has_value())
|
||||
return nullptr;
|
||||
// FIXME: Support calculated lengths
|
||||
if (maybe_length.value().is_calculated()) {
|
||||
dbgln("FIXME: Support calculated lengths in rect(): {}", maybe_length.value().calculated()->to_string());
|
||||
return nullptr;
|
||||
}
|
||||
params.append(maybe_length.value().value());
|
||||
}
|
||||
argument_tokens.skip_whitespace();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue