mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Upgrade Stylo to 2025-05-01 (#36835)
This continues #35990 Changelog: - Upstream:4558df359b...ca369cbc83
- Servo fixups:2bc1e5183b...7edd19e2f0
Stylo tracking issue: https://github.com/servo/stylo/issues/178 --------- Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
parent
1f6050f931
commit
2fa96cf961
9 changed files with 64 additions and 41 deletions
|
@ -2238,7 +2238,9 @@ fn block_size_is_zero_or_intrinsic(size: &StyleSize, containing_block: &Containi
|
|||
lp.is_definitely_zero() ||
|
||||
(lp.0.has_percentage() && !containing_block.size.block.is_definite())
|
||||
},
|
||||
StyleSize::AnchorSizeFunction(_) => unreachable!("anchor-size() should be disabled"),
|
||||
StyleSize::AnchorSizeFunction(_) | StyleSize::AnchorContainingCalcFunction(_) => {
|
||||
unreachable!("anchor-size() should be disabled")
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -767,7 +767,9 @@ impl From<StyleSize> for Size<LengthPercentage> {
|
|||
StyleSize::FitContent => Size::FitContent,
|
||||
StyleSize::FitContentFunction(lp) => Size::FitContentFunction(lp.0),
|
||||
StyleSize::Stretch => Size::Stretch,
|
||||
StyleSize::AnchorSizeFunction(_) => unreachable!("anchor-size() should be disabled"),
|
||||
StyleSize::AnchorSizeFunction(_) | StyleSize::AnchorContainingCalcFunction(_) => {
|
||||
unreachable!("anchor-size() should be disabled")
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -782,7 +784,9 @@ impl From<StyleMaxSize> for Size<LengthPercentage> {
|
|||
StyleMaxSize::FitContent => Size::FitContent,
|
||||
StyleMaxSize::FitContentFunction(lp) => Size::FitContentFunction(lp.0),
|
||||
StyleMaxSize::Stretch => Size::Stretch,
|
||||
StyleMaxSize::AnchorSizeFunction(_) => unreachable!("anchor-size() should be disabled"),
|
||||
StyleMaxSize::AnchorSizeFunction(_) | StyleMaxSize::AnchorContainingCalcFunction(_) => {
|
||||
unreachable!("anchor-size() should be disabled")
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -69,7 +69,7 @@ use style::traversal::DomTraversal;
|
|||
use style::traversal_flags::TraversalFlags;
|
||||
use style::values::computed::font::GenericFontFamily;
|
||||
use style::values::computed::{CSSPixelLength, FontSize, Length, NonNegativeLength};
|
||||
use style::values::specified::font::KeywordInfo;
|
||||
use style::values::specified::font::{KeywordInfo, QueryFontMetricsFlags};
|
||||
use style::{Zero, driver};
|
||||
use style_traits::{CSSPixel, SpeculativePainter};
|
||||
use stylo_atoms::Atom;
|
||||
|
@ -1100,8 +1100,7 @@ impl FontMetricsProvider for LayoutFontMetricsProvider {
|
|||
_vertical: bool,
|
||||
font: &Font,
|
||||
base_size: CSSPixelLength,
|
||||
_in_media_query: bool,
|
||||
_retrieve_math_scales: bool,
|
||||
_flags: QueryFontMetricsFlags,
|
||||
) -> FontMetrics {
|
||||
let font_context = &self.0;
|
||||
let font_group = self
|
||||
|
|
|
@ -375,6 +375,9 @@ impl ComputedValuesExt for ComputedValues {
|
|||
Inset::Auto => LengthPercentageOrAuto::Auto,
|
||||
Inset::AnchorFunction(_) => unreachable!("anchor() should be disabled"),
|
||||
Inset::AnchorSizeFunction(_) => unreachable!("anchor-size() should be disabled"),
|
||||
Inset::AnchorContainingCalcFunction(_) => {
|
||||
unreachable!("anchor() and anchor-size() should be disabled")
|
||||
},
|
||||
}
|
||||
}
|
||||
let position = self.get_position();
|
||||
|
@ -495,7 +498,9 @@ impl ComputedValuesExt for ComputedValues {
|
|||
match inset {
|
||||
Margin::LengthPercentage(v) => LengthPercentageOrAuto::LengthPercentage(v),
|
||||
Margin::Auto => LengthPercentageOrAuto::Auto,
|
||||
Margin::AnchorSizeFunction(_) => unreachable!("anchor-size() should be disabled"),
|
||||
Margin::AnchorSizeFunction(_) | Margin::AnchorContainingCalcFunction(_) => {
|
||||
unreachable!("anchor-size() should be disabled")
|
||||
},
|
||||
}
|
||||
}
|
||||
let margin = self.get_margin();
|
||||
|
|
|
@ -59,6 +59,7 @@ pub fn dimension(val: &stylo::Size) -> taffy::Dimension {
|
|||
|
||||
// Anchor positioning will be flagged off for time being
|
||||
stylo::Size::AnchorSizeFunction(_) => unreachable!(),
|
||||
stylo::Size::AnchorContainingCalcFunction(_) => unreachable!(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -77,6 +78,7 @@ pub fn max_size_dimension(val: &stylo::MaxSize) -> taffy::Dimension {
|
|||
|
||||
// Anchor positioning will be flagged off for time being
|
||||
stylo::MaxSize::AnchorSizeFunction(_) => unreachable!(),
|
||||
stylo::MaxSize::AnchorContainingCalcFunction(_) => unreachable!(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -88,6 +90,7 @@ pub fn margin(val: &stylo::MarginVal) -> taffy::LengthPercentageAuto {
|
|||
|
||||
// Anchor positioning will be flagged off for time being
|
||||
stylo::MarginVal::AnchorSizeFunction(_) => unreachable!(),
|
||||
stylo::MarginVal::AnchorContainingCalcFunction(_) => unreachable!(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -100,6 +103,7 @@ pub fn inset(val: &stylo::InsetVal) -> taffy::LengthPercentageAuto {
|
|||
// Anchor positioning will be flagged off for time being
|
||||
stylo::InsetVal::AnchorSizeFunction(_) => unreachable!(),
|
||||
stylo::InsetVal::AnchorFunction(_) => unreachable!(),
|
||||
stylo::InsetVal::AnchorContainingCalcFunction(_) => unreachable!(),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue