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:
Oriol Brufau 2025-02-05 03:35:58 +01:00 committed by GitHub
parent e2bb772669
commit fdbfecf7dd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 44 additions and 197 deletions

View file

@ -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;

View file

@ -7,6 +7,7 @@ use bitflags::bitflags;
use fonts::{FontMetrics, GlyphStore};
use itertools::Either;
use servo_arc::Arc;
use style::computed_values::position::T as Position;
use style::computed_values::white_space_collapse::T as WhiteSpaceCollapse;
use style::properties::ComputedValues;
use style::values::generics::box_::{GenericVerticalAlign, VerticalAlignKeyword};
@ -419,7 +420,7 @@ impl LineItemLayout<'_, '_> {
// Relative adjustment should not affect the rest of line layout, so we can
// do it right before creating the Fragment.
let style = &inline_box.style;
if style.clone_position().is_relative() {
if style.get_box().position == Position::Relative {
content_rect.start_corner += relative_adjustement(style, self.layout.containing_block);
}
@ -598,7 +599,7 @@ impl LineItemLayout<'_, '_> {
padding_border_margin_sides.block_start,
};
if atomic.fragment.style.clone_position().is_relative() {
if atomic.fragment.style.get_box().position == Position::Relative {
atomic_offset +=
relative_adjustement(&atomic.fragment.style, self.layout.containing_block);
}