mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +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)) => {
|
(&GenericGradientItem::ColorStop(ref a), &GenericGradientItem::ColorStop(ref b)) => {
|
||||||
match (&a.position, &b.position) {
|
match (&a.position, &b.position) {
|
||||||
(&Some(LengthOrPercentage::Percentage(a)), &Some(LengthOrPercentage::Percentage(b))) => {
|
(&Some(LengthOrPercentage::Percentage(a)), &Some(LengthOrPercentage::Percentage(b))) => {
|
||||||
let ordering = a.0.partial_cmp(&b.0).unwrap_or(Ordering::Equal);
|
return a.0.partial_cmp(&b.0).unwrap_or(Ordering::Equal);
|
||||||
if ordering != Ordering::Equal {
|
|
||||||
return ordering;
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
_ => {},
|
_ => {},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue