| <!DOCTYPE html> |
| <script src="../../fast/repaint/resources/text-based-repaint.js"></script> |
| <script> |
| function repaintTest() { |
| document.getElementById("rect").setAttribute('fill', 'green'); |
| } |
| onload = function() { |
| window.scrollTo(400, 400); |
| runRepaintTest(); |
| } |
| </script> |
| <style> |
| div { |
| position: absolute; |
| top: 400px; |
| left: 400px; |
| width:100px; |
| height:100px; |
| } |
| body { |
| margin: 0; |
| width: 2000px; |
| height: 2000px; |
| } |
| </style> |
| Tests if svg is correctly repainted in a scrolled view. The result repaint rects should contain (400, 400, 100, 100) only. |
| <div> |
| <svg id="svg" height="100" width="100" viewbox="0 0 100 100"> |
| <rect id="rect" width="100" height="100" fill="red"/> |
| </svg> |
| </div> |