LibWeb: Set numeric type of asin, acos, atan calculation results

Previously we were omitting the numeric type which meant these functions
weren't valid in some cases e.g. within rotate() functions.
This commit is contained in:
Callum Law 2025-06-25 14:25:20 +12:00 committed by Tim Ledbetter
commit 536f8c395c
Notes: github-actions[bot] 2025-06-25 04:20:13 +00:00
5 changed files with 254 additions and 1 deletions

View file

@ -1702,7 +1702,7 @@ static Optional<CalculatedStyleValue::CalculationResult> run_asin_acos_or_atan_o
break;
}
return CalculatedStyleValue::CalculationResult { result, CSSNumericType {}.made_consistent_with(child.numeric_type().value()) };
return CalculatedStyleValue::CalculationResult { result, CSSNumericType { CSSNumericType::BaseType::Angle, 1 }.made_consistent_with(child.numeric_type().value()) };
}
// https://drafts.csswg.org/css-values-4/#funcdef-asin