mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Fix color stop sorting in -webkit-gradient
This commit is contained in:
parent
d16ef3cd33
commit
26ad2a1331
1 changed files with 1 additions and 4 deletions
|
@ -433,10 +433,7 @@ impl Gradient {
|
|||
(&GenericGradientItem::ColorStop(ref a), &GenericGradientItem::ColorStop(ref b)) => {
|
||||
match (&a.position, &b.position) {
|
||||
(&Some(LengthOrPercentage::Percentage(a)), &Some(LengthOrPercentage::Percentage(b))) => {
|
||||
let ordering = a.0.partial_cmp(&b.0).unwrap_or(Ordering::Equal);
|
||||
if ordering != Ordering::Equal {
|
||||
return ordering;
|
||||
}
|
||||
return a.0.partial_cmp(&b.0).unwrap_or(Ordering::Equal);
|
||||
},
|
||||
_ => {},
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue