Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <html> | |
| 2 <head> | |
|
esprehn
2014/08/06 17:25:09
Leave out html, body and head elements.
| |
| 3 <script src="../../fast/repaint/resources/text-based-repaint.js"></script> | |
| 4 <script> | |
| 5 window.testIsAsync = true; | |
| 6 function finishTest() { | |
| 7 finishRepaintTest(); | |
| 8 } | |
| 9 | |
| 10 function repaintTest() | |
| 11 { | |
| 12 document.querySelector('circle').setAttribute('r', 1); | |
| 13 setTimeout(finishTest, 0); | |
| 14 } | |
| 15 </script> | |
| 16 <style> | |
| 17 .error { | |
| 18 width: 100px; | |
| 19 height: 100px; | |
| 20 background-color: red; | |
| 21 position: absolute; | |
| 22 } | |
| 23 .clipped { | |
| 24 width: 100px; | |
| 25 height: 100px; | |
| 26 background-color: green; | |
| 27 -webkit-clip-path: url(#svgPath); | |
| 28 clip-path: url(#svgPath); | |
| 29 } | |
| 30 </style> | |
| 31 </head> | |
| 32 <body onload="runRepaintAndPixelTest()"> | |
| 33 <div class="error"></div> | |
| 34 <div class="clipped"></div> | |
| 35 <svg id="svgElement" height="0" width="0"> | |
| 36 <defs> | |
| 37 <clipPath id="svgPath" clipPathUnits="objectBoundingBox"> | |
| 38 <circle cx="0.5" cy="0.5" r="0.5"> | |
| 39 </circle> | |
| 40 </clipPath> | |
| 41 </defs> | |
| 42 </svg> | |
| 43 </body> | |
| 44 </html> | |
| OLD | NEW |