mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Correct virtual gradient ray length of radial gradients.
The length should be the horizontal radius and not the hypotenuse.
This commit is contained in:
parent
f7f077c334
commit
4f17b17082
1 changed files with 1 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue