mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-16 13:09:41 +00:00
LibWeb/CSS: Use generated FooUnit types instead of Foo::Type
I've also renamed the `m_type` and `type()` members to be `m_unit` and `unit()` instead, to match what they actually are.
This commit is contained in:
parent
bda4f8cbe8
commit
b3e32445d3
Notes:
github-actions[bot]
2025-09-11 16:08:15 +00:00
Author: https://github.com/AtkinsSJ
Commit: b3e32445d3
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6071
29 changed files with 232 additions and 669 deletions
|
@ -1235,7 +1235,7 @@ static RefPtr<StyleValue const> interpolate_value_impl(DOM::Element& element, Ca
|
|||
auto const& from_length = from.as_length().length();
|
||||
auto const& to_length = to.as_length().length();
|
||||
auto interpolated_value = interpolate_raw(from_length.raw_value(), to_length.raw_value(), delta, calculation_context.accepted_type_ranges.get(ValueType::Length));
|
||||
return LengthStyleValue::create(Length(interpolated_value, from_length.type()));
|
||||
return LengthStyleValue::create(Length(interpolated_value, from_length.unit()));
|
||||
}
|
||||
case StyleValue::Type::Number: {
|
||||
auto interpolated_value = interpolate_raw(from.as_number().number(), to.as_number().number(), delta, calculation_context.accepted_type_ranges.get(ValueType::Number));
|
||||
|
@ -1287,7 +1287,7 @@ static RefPtr<StyleValue const> interpolate_value_impl(DOM::Element& element, Ca
|
|||
return LengthOrAuto::make_auto();
|
||||
// FIXME: Actually handle the units not matching.
|
||||
auto interpolated_value = interpolate_raw(from.length().raw_value(), to.length().raw_value(), delta, calculation_context.accepted_type_ranges.get(ValueType::Rect));
|
||||
return LengthOrAuto { Length { interpolated_value, from.length().type() } };
|
||||
return LengthOrAuto { Length { interpolated_value, from.length().unit() } };
|
||||
};
|
||||
|
||||
return RectStyleValue::create({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue