mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +01: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))
|
EndingShape::Ellipse(LengthOrPercentageOrKeyword::Keyword(word))
|
||||||
=> convert_ellipse_size_keyword(word, &bounds.size, ¢er),
|
=> 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 {
|
if !repeating {
|
||||||
fix_gradient_stops(&mut stops);
|
fix_gradient_stops(&mut stops);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue