mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-19 15:43:20 +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
|
@ -292,7 +292,7 @@ RefPtr<LinearGradientStyleValue const> Parser::parse_linear_gradient_function(To
|
|||
tokens.discard_a_token(); // <angle>
|
||||
auto angle_value = first_param.token().dimension_value();
|
||||
auto unit_string = first_param.token().dimension_unit();
|
||||
auto angle_type = Angle::unit_from_name(unit_string);
|
||||
auto angle_type = string_to_angle_unit(unit_string);
|
||||
|
||||
if (!angle_type.has_value())
|
||||
return nullptr;
|
||||
|
@ -395,7 +395,7 @@ RefPtr<ConicGradientStyleValue const> Parser::parse_conic_gradient_function(Toke
|
|||
if (!tokens.has_next_token())
|
||||
return nullptr;
|
||||
|
||||
Angle from_angle(0, Angle::Type::Deg);
|
||||
auto from_angle = Angle::make_degrees(0);
|
||||
RefPtr<PositionStyleValue const> at_position;
|
||||
Optional<InterpolationMethod> maybe_interpolation_method;
|
||||
|
||||
|
@ -426,7 +426,7 @@ RefPtr<ConicGradientStyleValue const> Parser::parse_conic_gradient_function(Toke
|
|||
if (angle_token.is(Token::Type::Dimension)) {
|
||||
auto angle = angle_token.token().dimension_value();
|
||||
auto angle_unit = angle_token.token().dimension_unit();
|
||||
auto angle_type = Angle::unit_from_name(angle_unit);
|
||||
auto angle_type = string_to_angle_unit(angle_unit);
|
||||
if (!angle_type.has_value())
|
||||
return nullptr;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue