mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 20:17:34 +00:00
LibWeb: Don't use CSSPixels when resolving radial gradient color stops
CSSPixels are not precise enough to resolve gradient positions, which leads to visual artifacts.
This commit is contained in:
parent
fa7a2269cd
commit
6c9f1c396a
1 changed files with 1 additions and 1 deletions
|
@ -140,7 +140,7 @@ RadialGradientData resolve_radial_gradient_data(Layout::NodeWithStyleAndBoxModel
|
||||||
// Start center, goes right to ending point, where the gradient line intersects the ending shape
|
// Start center, goes right to ending point, where the gradient line intersects the ending shape
|
||||||
auto resolved_color_stops = resolve_color_stop_positions(
|
auto resolved_color_stops = resolve_color_stop_positions(
|
||||||
node, radial_gradient.color_stop_list(), [&](auto const& length_percentage) {
|
node, radial_gradient.color_stop_list(), [&](auto const& length_percentage) {
|
||||||
return (length_percentage.to_px(node, gradient_size.width()) / gradient_size.width()).to_float();
|
return length_percentage.to_px(node, gradient_size.width()).to_float() / gradient_size.width().to_float();
|
||||||
},
|
},
|
||||||
radial_gradient.is_repeating());
|
radial_gradient.is_repeating());
|
||||||
return { resolved_color_stops };
|
return { resolved_color_stops };
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue