LibWeb: Fallback to auto when aspect ratio is degenerate as per spec

When aspect-ratio is degenerate (e.g. 0/1 or 1/0) we should
fallback to the same behaviour as `aspect-ratio: auto` according to spec
This commit explicitly handles this case and fixes five WPT test in
css/css-sizing/aspect-ratio (zero-or-infinity-[006-010])
This commit is contained in:
Magnus Johansson 2024-10-24 21:03:49 +02:00 committed by Andreas Kling
commit c6f77f4818
Notes: github-actions[bot] 2024-10-27 10:12:32 +00:00
3 changed files with 22 additions and 1 deletions

View file

@ -0,0 +1,6 @@
<!doctype html><style>
img {
width: 200px;
aspect-ratio: 0/1;
}
</style><img src="120.png"/>