blob: efa4f09eeb0bba19835e6fa1b9b9872fc94faf9d [file] [log] [blame]
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- Test that a script can change the scale of an svg viewbox and text will be rescaled properly -->
<!-- see: https://bugs.webkit.org/show_bug.cgi?id=75091 -->
<!-- If this test passes there should be 2 rows and 2 columns "PASS" -->
<script src="../resources/text-based-repaint.js"></script>
</head>
<body onload="runRepaintAndPixelTest()">
<svg style="position: absolute; top: 0px; left: 0px; width: 200px; height: 200px">
<svg id="inner1" viewbox="0 0 100 100">
<text x="0.3" y="0.3" font-size="0.1" fill="#080">
PASS
<tspan fill="#080"> PASS</tspan>
</text>
</svg>
<svg id="inner2" y="100" viewbox="0 0 1 1">
<text x="0.3" y="0.3" font-size="0.1" fill="#080">
PASS
<tspan fill="#080"> PASS</tspan>
</text>
</svg>
</svg>
<script>
function repaintTest() {
document.getElementById("inner1").setAttribute('viewBox', '0 0 1 1');
document.getElementById("inner2").setAttribute('viewBox', '0 0 1 1');
}
</script>
</body>
</html>