mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Upgrade Stylo to 2025-02-03 (#35289)
* Upgrade Stylo to 2025-02-03 Signed-off-by: Oriol Brufau <obrufau@igalia.com> * Fixup for https://phabricator.services.mozilla.com/D233218 Signed-off-by: Oriol Brufau <obrufau@igalia.com> * Fixup for https://phabricator.services.mozilla.com/D233758 Signed-off-by: Oriol Brufau <obrufau@igalia.com> * Fixup for https://phabricator.services.mozilla.com/D231255 Signed-off-by: Oriol Brufau <obrufau@igalia.com> * Update test expectations Signed-off-by: Oriol Brufau <obrufau@igalia.com> --------- Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
parent
e2bb772669
commit
fdbfecf7dd
16 changed files with 44 additions and 197 deletions
|
@ -408,7 +408,7 @@ fn gradient_items_to_color_stops(
|
|||
|
||||
/// <https://drafts.csswg.org/css-images-4/#color-stop-fixup>
|
||||
fn fixup_stops(stops: &mut [ColorStop<ColorF, f32>]) -> Vec<wr::GradientStop> {
|
||||
assert!(stops.len() >= 2);
|
||||
assert!(!stops.is_empty());
|
||||
|
||||
// https://drafts.csswg.org/css-images-4/#color-stop-fixup
|
||||
if let first_position @ None = &mut stops.first_mut().unwrap().position {
|
||||
|
@ -438,6 +438,9 @@ fn fixup_stops(stops: &mut [ColorStop<ColorF, f32>]) -> Vec<wr::GradientStop> {
|
|||
offset: first_stop_position,
|
||||
color: first.color,
|
||||
});
|
||||
if stops.len() == 1 {
|
||||
wr_stops.push(wr_stops[0]);
|
||||
}
|
||||
|
||||
let mut last_positioned_stop_index = 0;
|
||||
let mut last_positioned_stop_position = first_stop_position;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue