LibWeb: Move Transformation::to_matrix to new CSV resolve methods

This gains us 2 WPT passes as we now correctly disallow relative lengths
in more places in the `DOMMatrix` constructor.
This commit is contained in:
Callum Law 2025-07-17 00:27:13 +12:00 committed by Jelle Raaijmakers
commit 3d7c5115d8
Notes: github-actions[bot] 2025-07-17 06:33:04 +00:00
3 changed files with 12 additions and 8 deletions

View file

@ -3798,7 +3798,9 @@ RefPtr<CSSStyleValue const> Parser::parse_calculated_value(ComponentValue const&
// The scale family of functions treats percentages as numbers.
if (function.name.is_one_of_ignoring_ascii_case(
"scale"sv, "scalex"sv, "scaley"sv, "scalez"sv, "scale3d"sv)) {
return CalculationContext { .percentages_resolve_as = ValueType::Number };
// NOTE: Resolving percentages as numbers isn't supported by the spec and we instead expect the
// caller to handle the resolved value being a percentage.
return CalculationContext {};
}
// FIXME: Add other functions that provide a context for resolving values
return {};