1 <?xml version=
"1.0" encoding=
"utf-8"?>
2 <svg xmlns=
"http://www.w3.org/2000/svg" xmlns:
xlink=
"http://www.w3.org/1999/xlink" onload=
"runRepaintAndPixelTest()">
3 <script xlink:
href=
"../../fast/repaint/resources/text-based-repaint.js"/>
5 window.testIsAsync = true;
7 var maskrect = document.getElementById(
"maskRect");
8 maskrect.setAttribute(
"transform",
"translate(" + x +
"," + y +
")");
10 var rect = document.createElementNS('http://www.w3.org/
2000/svg', 'rect');
11 rect.setAttribute(
"x", x);
12 rect.setAttribute(
"y", y);
13 rect.setAttribute(
"width",
453);
14 rect.setAttribute(
"height",
299);
15 rect.setAttribute(
"fill",
"green");
16 rect.setAttribute(
"mask",
"url(#mask)");
18 var root = document.getElementById(
"root");
19 while (root.firstChild) {
20 root.removeChild(root.firstChild);
22 root.appendChild(rect);
25 function repaintTest() {
27 requestAnimationFrame(function() {
35 <mask id=
"mask" maskUnits=
"userSpaceOnUse" maskContentUnits=
"userSpaceOnUse">
36 <rect id=
"maskRect" x=
"50" y=
"50" width=
"460" height=
"316" fill=
"white" />
40 <rect x=
"50" y=
"50" width=
"453" height=
"299" fill=
"green" mask=
"url(#mask)"/>