mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 12:57:35 +00:00
LibWeb: Allow (explicitly) converting CSSPixels to float and int
...and remove some unnecessary cast chains.
This commit is contained in:
parent
c20df34b79
commit
5f0d3c083f
11 changed files with 16 additions and 14 deletions
|
@ -112,7 +112,7 @@ static ColorStopData resolve_color_stop_positions(auto const& color_stop_list, a
|
|||
LinearGradientData resolve_linear_gradient_data(Layout::Node const& node, CSSPixelSize gradient_size, CSS::LinearGradientStyleValue const& linear_gradient)
|
||||
{
|
||||
auto gradient_angle = linear_gradient.angle_degrees(gradient_size);
|
||||
auto gradient_length_px = Gfx::calculate_gradient_length(gradient_size.to_type<double>().to_type<float>(), gradient_angle);
|
||||
auto gradient_length_px = Gfx::calculate_gradient_length(gradient_size.to_type<float>(), gradient_angle);
|
||||
|
||||
auto resolved_color_stops = resolve_color_stop_positions(
|
||||
linear_gradient.color_stop_list(), [&](auto const& length_percentage) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue