LibWeb/Meta: Compute the accepted value range for CalculationContexts

This currently only applies to property-level calculation contexts, more
work to be done to generate accepted ranges for other calculation
contexts (e.g. within transformation functions, color functions, etc)
This commit is contained in:
Callum Law 2025-08-06 16:09:09 +12:00 committed by Sam Atkins
commit 6025805f19
Notes: github-actions[bot] 2025-08-11 16:11:46 +00:00
3 changed files with 73 additions and 0 deletions

View file

@ -4076,6 +4076,7 @@ RefPtr<StyleValue const> Parser::parse_calculated_value(ComponentValue const& co
return CalculationContext {
.percentages_resolve_as = property_resolves_percentages_relative_to(property_id),
.resolve_numbers_as_integers = property_accepts_type(property_id, ValueType::Integer),
.accepted_type_ranges = property_accepted_type_ranges(property_id),
};
},
[](FunctionContext const& function) -> Optional<CalculationContext> {