LibWeb: Don't crash when SVG viewbox has a width of 0

Previously, `SVGSVGBox` would have a natural aspect ratio of 0 if it
had a viewbox with zero width. This led to a division by zero, causing
a crash.

Found by Domato.
This commit is contained in:
Tim Ledbetter 2024-07-21 21:58:24 +01:00 committed by Andreas Kling
commit 4cdafea363
Notes: github-actions[bot] 2024-07-22 07:14:21 +00:00
3 changed files with 14 additions and 2 deletions

View file

@ -0,0 +1 @@
<!DOCTYPE html><html><body><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 0 10"></svg>