OLD | NEW |
1 <!DOCTYPE HTML> | 1 <!DOCTYPE HTML> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <style> | 4 <style> |
5 canvas { | 5 canvas { |
6 background-color: gray; | 6 background-color: gray; |
7 border-radius: 40px 200px 10px 200px; | 7 border-radius: 40px 200px 10px 200px; |
8 padding: 10px; | 8 padding: 10px; |
9 margin: 20px; | 9 margin: 20px; |
10 border: 5px solid red; | 10 border: 5px solid red; |
11 -webkit-transform: translateZ(0); | 11 transform: translateZ(0); |
12 } | 12 } |
13 </style> | 13 </style> |
14 </head> | 14 </head> |
15 <body> | 15 <body> |
16 <h3>It passes if:</h3> | 16 <h3>It passes if:</h3> |
17 <ul> | 17 <ul> |
18 <li>the 10px gray background is visible around the canvas content</li> | 18 <li>the 10px gray background is visible around the canvas content</li> |
19 <li>has 5px solid red border</li> | 19 <li>has 5px solid red border</li> |
20 <li>all the corners for border and padding are rounded</li> | 20 <li>all the corners for border and padding are rounded</li> |
21 <li>the bottom right corner of canvas content is NOT rounded</li> | 21 <li>the bottom right corner of canvas content is NOT rounded</li> |
22 </ul> | 22 </ul> |
23 <canvas id="theCanvas" width="257" height="257"></canvas> | 23 <canvas id="theCanvas" width="257" height="257"></canvas> |
24 <script> | 24 <script> |
25 if (window.internals) { | 25 if (window.internals) { |
26 internals.settings.setAccelerated2dCanvasEnabled(false); | 26 internals.settings.setAccelerated2dCanvasEnabled(false); |
27 } | 27 } |
28 var context = theCanvas.getContext('2d'); | 28 var context = theCanvas.getContext('2d'); |
29 context.fillStyle = 'green'; | 29 context.fillStyle = 'green'; |
30 context.fillRect(0, 0, theCanvas.width, theCanvas.width); | 30 context.fillRect(0, 0, theCanvas.width, theCanvas.width); |
31 </script> | 31 </script> |
32 </body> | 32 </body> |
33 </html> | 33 </html> |
OLD | NEW |