mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-22 16:09:23 +00:00
LibWeb: Clamp calculated steps()
interval count using normal system
Previously we were doing this ad-hoc later in the process but we now have the `calc` clamping system which can simplify things. This reveals some false-positives in that we don't handle relative lengths within these `calc`s but these are fixed in the next commit
This commit is contained in:
parent
06a57a280d
commit
ad41f053b8
Notes:
github-actions[bot]
2025-10-20 10:29:14 +00:00
Author: https://github.com/Calme1709
Commit: ad41f053b8
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6459
Reviewed-by: https://github.com/AtkinsSJ ✅
5 changed files with 25 additions and 23 deletions
|
@ -320,7 +320,7 @@ EasingFunction EasingFunction::from_style_value(StyleValue const& style_value)
|
|||
return CubicBezierEasingFunction { resolved_x1, resolved_y1, resolved_x2, resolved_y2, cubic_bezier.to_string(SerializationMode::Normal) };
|
||||
},
|
||||
[](EasingStyleValue::Steps const& steps) -> EasingFunction {
|
||||
auto resolved_interval_count = max(steps.number_of_intervals.resolved({}).value_or(1), steps.position == StepPosition::JumpNone ? 2 : 1);
|
||||
auto resolved_interval_count = steps.number_of_intervals.resolved({}).value_or(1);
|
||||
|
||||
return StepsEasingFunction { resolved_interval_count, steps.position, steps.to_string(SerializationMode::ResolvedValue) };
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue