1
0
Fork 0
firefox/layout/reftests/svg/sizing/canvas-drawImage-height-with-no-width-ref.html
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

22 lines
796 B
HTML

<!DOCTYPE HTML>
<html class="reftest-wait">
<script src="svg-image-util.js"></script>
<style>
canvas {
background: blue;
}
</style>
<body>
<script>
let viewBoxesAndWidths = [{viewBox: null, width: "300px"}, {viewBox: "0 0 50 50",width: "200px"}, {viewBox: "0 0 50 20", width: "500px"}];
let promises = [];
for (viewBoxAndWidth of viewBoxesAndWidths) {
// 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", viewBoxAndWidth.width, "200px", viewBoxAndWidth.viewBox));
}
Promise.all(promises).then(() => { document.documentElement.className = "" });
</script>
<!-- Body gets populated by script -->
</body>
</html>