1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:38:11 +00:00

LibWeb: Ignore whitespace around easing function argument values

This makes our css-animations.html test file actually parse :^)
This commit is contained in:
Andreas Kling 2023-07-25 06:32:02 +02:00
parent 8d2ccf0f4f
commit 902e76baff

View file

@ -6372,6 +6372,9 @@ ErrorOr<RefPtr<StyleValue>> Parser::parse_easing_value(TokenStream<ComponentValu
return nullptr;
}
for (auto& argument_values : arguments_values) {
// Prune any whitespace before and after the actual argument values.
argument_values.remove_all_matching([](auto& value) { return value.is(Token::Type::Whitespace); });
if (argument_values.size() != 1) {
dbgln_if(CSS_PARSER_DEBUG, "Too many values in argument to {}. max: 1", name);
return nullptr;