mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-24 09:52:31 +00:00
LibWeb: Absolutize keyframe values before interpolating
This commit is contained in:
parent
71f03cb785
commit
b46378085d
Notes:
github-actions[bot]
2025-06-24 11:38:03 +00:00
Author: https://github.com/tcl3
Commit: b46378085d
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5192
Reviewed-by: https://github.com/AtkinsSJ ✅
Reviewed-by: https://github.com/gmta ✅
8 changed files with 1428 additions and 4 deletions
|
@ -819,7 +819,6 @@ static RefPtr<CSSStyleValue const> interpolate_value_impl(DOM::Element& element,
|
|||
return IntegerStyleValue::create(round_to<i64>(interpolated_value));
|
||||
}
|
||||
case CSSStyleValue::Type::Length: {
|
||||
// FIXME: Absolutize values
|
||||
auto const& from_length = from.as_length().length();
|
||||
auto const& to_length = to.as_length().length();
|
||||
return LengthStyleValue::create(Length(interpolate_raw(from_length.raw_value(), to_length.raw_value(), delta), from_length.type()));
|
||||
|
@ -865,7 +864,6 @@ static RefPtr<CSSStyleValue const> interpolate_value_impl(DOM::Element& element,
|
|||
if (from_rect.top_edge.is_auto() != to_rect.top_edge.is_auto() || from_rect.right_edge.is_auto() != to_rect.right_edge.is_auto() || from_rect.bottom_edge.is_auto() != to_rect.bottom_edge.is_auto() || from_rect.left_edge.is_auto() != to_rect.left_edge.is_auto())
|
||||
return {};
|
||||
|
||||
// FIXME: Absolutize values
|
||||
return RectStyleValue::create({
|
||||
Length(interpolate_raw(from_rect.top_edge.raw_value(), to_rect.top_edge.raw_value(), delta), from_rect.top_edge.type()),
|
||||
Length(interpolate_raw(from_rect.right_edge.raw_value(), to_rect.right_edge.raw_value(), delta), from_rect.right_edge.type()),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue