Use natural ratio for object-fit (#34413)

We were using the preferred aspect ratio provided by the `aspect-ratio`
property instead of the natural aspect ratio. However, the preferred
aspect ratio should only be used to size the replaced element. To paint
the replaced contents into that element we need the natural ratio.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
Oriol Brufau 2024-11-28 13:57:38 +01:00 committed by GitHub
parent 895b8d30ea
commit a37ccc3e64
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 10 additions and 32 deletions

View file

@ -1986,7 +1986,6 @@ impl FlexItem<'_> {
let fragments = replaced.contents.make_fragments(
&replaced.style,
containing_block,
size.to_physical_size(container_writing_mode),
);