trisquel-icecat/icecat/layout/reftests/svg/sizing/canvas-drawImage-height-with-no-width.html
2025-10-06 02:35:48 -06:00

22 lines
657 B
HTML

<!DOCTYPE HTML>
<html class="reftest-wait">
<script src="svg-image-util.js"></script>
<style>
canvas {
background: blue;
}
</style>
<body>
<script>
let viewBoxes = [null, "0 0 50 50", "0 0 50 20"];
let promises = [];
for (viewBox of viewBoxes) {
// Without a given width the viewBox should be used to determine an aspect
// ratio and that applied to the height gives the width.
promises.push(generateCanvasDrawImageSVG("350", "200", null, "200px", viewBox));
}
Promise.all(promises).then(() => { document.documentElement.className = "" });
</script>
<!-- Body gets populated by script -->
</body>
</html>