blob: 97ffbf28bfb0276c1a6a75873992c506e9bf7126 [file] [log] [blame]
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" onload="runRepaintAndPixelTest();">
<!--
Test for https://bugs.webkit.org/show_bug.cgi?id=79682.
-->
<script xlink:href="../resources/text-based-repaint.js" type="text/javascript"></script>
<defs>
<mask id="mask1">
<text id="text1" x="10" y="20" fill="#fff" font-size="20px"></text>
</mask>
<mask id="mask2">
<text id="text2" x="10" y="50" fill="#fff" font-size="20px">FAIL</text>
</mask>
</defs>
<!-- the updated mask should be "PASS" -->
<rect width="100" height="50" fill="green" mask="url(#mask1)"/>
<!-- the updated mask should be empty -->
<rect width="100" height="50" fill="red" mask="url(#mask2)"/>
<script>
function repaintTest() {
var txt = document.createTextNode('PASS');
document.getElementById('text1').appendChild(txt);
var node = document.getElementById('text2');
node.removeChild(node.firstChild);
}
</script>
</svg>