| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <style> | 4 <style> |
| 5 #indicator { | 5 #indicator { |
| 6 position: absolute; | 6 position: absolute; |
| 7 top: 0px; | 7 top: 0px; |
| 8 left: 0px; | 8 left: 0px; |
| 9 height: 100px; | 9 height: 100px; |
| 10 width: 100px; | 10 width: 100px; |
| 11 background-color: red; | 11 background-color: red; |
| 12 } | 12 } |
| 13 #clipper { | 13 #clipper { |
| 14 -webkit-transform:translateZ(0); | 14 -webkit-transform:translateZ(0); |
| 15 position: absolute; | 15 position: absolute; |
| 16 top: 0px; | 16 top: 0px; |
| 17 left: 0px; | 17 left: 0px; |
| 18 height: 100px; | 18 height: 100px; |
| 19 width: 100px; | 19 width: 100px; |
| 20 background-color: green; | 20 background-color: green; |
| 21 clip: rect(25px, 75px, 75px, 25px); | 21 clip: rect(25px, 75px, 75px, 25px); |
| 22 } | 22 } |
| 23 </style> | 23 </style> |
| 24 <script> | 24 <script> |
| 25 if (window.testRunner) | 25 if (window.testRunner) |
| 26 testRunner.dumpAsText(true); | 26 testRunner.dumpAsTextWithPixelResults(); |
| 27 function doTest() { | 27 function doTest() { |
| 28 if (window.testRunner) | 28 if (window.testRunner) |
| 29 testRunner.display(); | 29 testRunner.display(); |
| 30 // The change in clip style should be reflected immediately in the size | 30 // The change in clip style should be reflected immediately in the size |
| 31 // of the composited clipper layer. After changing the clip, it should | 31 // of the composited clipper layer. After changing the clip, it should |
| 32 // entirely cover the indicator. | 32 // entirely cover the indicator. |
| 33 var clipper = document.getElementById("clipper"); | 33 var clipper = document.getElementById("clipper"); |
| 34 clipper.style.clip = "rect(0px, 100px, 100px, 0px)"; | 34 clipper.style.clip = "rect(0px, 100px, 100px, 0px)"; |
| 35 } | 35 } |
| 36 window.addEventListener("load", doTest, false); | 36 window.addEventListener("load", doTest, false); |
| 37 </script> | 37 </script> |
| 38 </head> | 38 </head> |
| 39 <body> | 39 <body> |
| 40 <div id="indicator"></div> | 40 <div id="indicator"></div> |
| 41 <div id="clipper"></div> | 41 <div id="clipper"></div> |
| 42 </body> | 42 </body> |
| 43 </html> | 43 </html> |
| OLD | NEW |