Truly independent web browser
<!DOCTYPE html>
<html class="reftest-wait">
<link rel="match" href="../../expected/svg/text-content-paint-server-follows-text-bounding-box-ref.html" />
<style>
@font-face {
font-family: Ahem;
src: url("../../data/fonts/Ahem.ttf");
}
body {
margin: 0;
}
svg {
display: block;
font: 20px Ahem;
}
</style>
<svg width="400" height="80">
<linearGradient id="split">
<stop offset="0.5" stop-color="green" />
<stop offset="0.5" stop-color="orange" />
</linearGradient>
<!-- The <text>'s box grows with its other <tspan>, and the paint server on the first one follows it. -->
<text x="10" y="30"><tspan fill="url(#split)">XXXX</tspan><tspan id="grows">XX</tspan></text>
</svg>
<script>
requestAnimationFrame(() => {
requestAnimationFrame(() => {
document.getElementById("grows").textContent = "XXXX";
requestAnimationFrame(() => {
if (window.internals)
internals.signalTestIsDone("PASS");
else
document.documentElement.classList.remove("reftest-wait");
});
});
});
</script>
</html>