github web-platform-tests/wpt merge_pr_48908

latest releases: merge_pr_49470, epochs/three_hourly/2024-12-03_06H, epochs/six_hourly/2024-12-03_06H...
3 months ago

Properly handle fallback aspect ratio for videos

A <video> element with no source won't have a natural aspect ratio,
but aspect-ratio: auto should still fall back to a ratio of 300/150.

used_size_as_if_inline_element_from_content_box_sizes() was already
handling this, but other consumers of preferred_aspect_ratio() were
wrong. In particular, this resulted in a 0px wide inline-block:

<div style="display: inline-block; border: solid">
  <video style="height: 100px; background: cyan"></video>
</div>

So this patch moves the fallback into preferred_aspect_ratio().

Signed-off-by: Oriol Brufau obrufau@igalia.com

Don't miss a new wpt release

NewReleases is sending notifications on new releases.