Let LengthPercentage::maybe_to_used_value() accept Option<Au> (#33450)

Bump Stylo to servo/stylo#75 and remove conversions that are no longer
necessary.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
Oriol Brufau 2024-09-16 10:08:54 +02:00 committed by GitHub
parent 9f2306f760
commit 17f796dfc1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 26 additions and 32 deletions

View file

@ -525,7 +525,7 @@ pub fn style_length(style_length: &Size, container_size: Option<Au>) -> MaybeAut
match style_length {
Size::Auto => MaybeAuto::Auto,
Size::LengthPercentage(ref lp) => {
MaybeAuto::from_option(lp.0.maybe_to_used_value(container_size.map(|l| l.into())))
MaybeAuto::from_option(lp.0.maybe_to_used_value(container_size))
},
}
}