OLD | NEW |
1 <!DOCTYPE HTML> | 1 <!DOCTYPE HTML> |
2 <html> | 2 <html> |
3 <body> | 3 <body> |
4 Test that verifies that CSS clip paths apply correctly to canvas elements. The t
est should show a green square inside a larger yellow square. | 4 Test that verifies that CSS clip paths apply correctly to canvas elements. The t
est should show a green square inside a larger yellow square. |
5 <div style="background-color: yellow; width:100px; height:100px"> | 5 <div style="background-color: yellow; width:100px; height:100px"> |
6 <canvas id="c" style="-webkit-clip-path: rectangle(10px, 10px, 80px, 80px);" wid
th="100" height="100"></canvas> | 6 <canvas id="c" style="-webkit-clip-path: inset(10px);" width="100" height="100">
</canvas> |
7 </div> | 7 </div> |
8 <script> | 8 <script> |
9 var context = document.getElementById('c').getContext('2d'); | 9 var context = document.getElementById('c').getContext('2d'); |
10 context.fillStyle = 'green'; | 10 context.fillStyle = 'green'; |
11 context.fillRect(0, 0, 300, 300); | 11 context.fillRect(0, 0, 300, 300); |
12 </script> | 12 </script> |
13 </body> | 13 </body> |
14 </html> | 14 </html> |
OLD | NEW |