Allow creating a ContentSizes from Au (#33208)

No change in behavior, it just simplies some code a little bit.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
Oriol Brufau 2024-08-27 17:22:47 +02:00 committed by GitHub
parent dbd0a79b3e
commit 50eb69a7e0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 21 additions and 36 deletions

View file

@ -255,14 +255,10 @@ impl ReplacedContent {
// FIXME: min/max-content of replaced elements is not defined in
// https://dbaron.org/css/intrinsic/
// This seems sensible?
let inline = self
.flow_relative_intrinsic_size(style)
self.flow_relative_intrinsic_size(style)
.inline
.unwrap_or(Au::zero());
ContentSizes {
min_content: inline,
max_content: inline,
}
.unwrap_or(Au::zero())
.into()
}
pub fn make_fragments(