From 4f17b17082a1a72c8f9470f22f8018f1cb0e41ab Mon Sep 17 00:00:00 2001 From: Pyfisch Date: Mon, 1 May 2017 14:19:35 +0200 Subject: [PATCH] Correct virtual gradient ray length of radial gradients. The length should be the horizontal radius and not the hypotenuse. --- components/layout/display_list_builder.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/components/layout/display_list_builder.rs b/components/layout/display_list_builder.rs index edf3775d338..4b358944d33 100644 --- a/components/layout/display_list_builder.rs +++ b/components/layout/display_list_builder.rs @@ -1167,9 +1167,8 @@ impl FragmentDisplayListBuilding for Fragment { EndingShape::Ellipse(LengthOrPercentageOrKeyword::Keyword(word)) => convert_ellipse_size_keyword(word, &bounds.size, ¢er), }; - let length = Au::from_f32_px(radius.width.to_f32_px().hypot(radius.height.to_f32_px())); - let mut stops = convert_gradient_stops(stops, length, style); + let mut stops = convert_gradient_stops(stops, radius.width, style); if !repeating { fix_gradient_stops(&mut stops); }