1
0
Fork 0
firefox/layout/reftests/svg/sizing/canvas-drawImage-width-with-no-height-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
806 B
HTML

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