mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-05 07:39:16 +00:00
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:
parent
2af7016a77
commit
6025805f19
Notes:
github-actions[bot]
2025-08-11 16:11:46 +00:00
Author: https://github.com/Calme1709
Commit: 6025805f19
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5734
Reviewed-by: https://github.com/AtkinsSJ ✅
Reviewed-by: https://github.com/Hendiadyoin1
Reviewed-by: https://github.com/gmta
Reviewed-by: https://github.com/tcl3
3 changed files with 73 additions and 0 deletions
|
@ -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> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue