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