| OLD | NEW |
| 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" | 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" |
| 2 "http://www.w3.org/TR/html4/strict.dtd"> | 2 "http://www.w3.org/TR/html4/strict.dtd"> |
| 3 <html> | 3 <html> |
| 4 <head> | 4 <head> |
| 5 <meta http-equiv="Content-type" content="text/html; charset=utf-8"> | 5 <meta http-equiv="Content-type" content="text/html; charset=utf-8"> |
| 6 <title>Layer repaint</title> | 6 <title>Layer repaint</title> |
| 7 <style type="text/css" media="screen"> | 7 <style type="text/css" media="screen"> |
| 8 body { | 8 body { |
| 9 margin: 0; | 9 margin: 0; |
| 10 } | 10 } |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 background-color: #8888FF; | 22 background-color: #8888FF; |
| 23 width: 200px; | 23 width: 200px; |
| 24 height: 100px; | 24 height: 100px; |
| 25 } | 25 } |
| 26 | 26 |
| 27 #translate { | 27 #translate { |
| 28 top: 10px; | 28 top: 10px; |
| 29 } | 29 } |
| 30 #container.over #translate { | 30 #container.over #translate { |
| 31 transform: translate(200px, 0px); | 31 transform: translate(200px, 0px); |
| 32 -webkit-transition-property: -webkit-transform; | 32 transition-property: transform; |
| 33 -webkit-transition-duration: 0.1s; | 33 transition-duration: 0.1s; |
| 34 } | 34 } |
| 35 #widen { | 35 #widen { |
| 36 top: 120px; | 36 top: 120px; |
| 37 background-color: red !important; | 37 background-color: red !important; |
| 38 } | 38 } |
| 39 #container.over #widen { | 39 #container.over #widen { |
| 40 width: 400px; | 40 width: 400px; |
| 41 -webkit-transition-property: width; | 41 transition-property: width; |
| 42 -webkit-transition-duration: 0.1s; | 42 transition-duration: 0.1s; |
| 43 } | 43 } |
| 44 | 44 |
| 45 #tester { | 45 #tester { |
| 46 position: absolute; | 46 position: absolute; |
| 47 background-color: green; | 47 background-color: green; |
| 48 width: 200px; | 48 width: 200px; |
| 49 height: 100px; | 49 height: 100px; |
| 50 top: 221px; | 50 top: 221px; |
| 51 left: 1px; | 51 left: 1px; |
| 52 } | 52 } |
| 53 </style> | 53 </style> |
| 54 <script type="text/javascript" charset="utf-8"> | 54 <script type="text/javascript" charset="utf-8"> |
| 55 | 55 |
| 56 if (window.testRunner) | 56 if (window.testRunner) |
| 57 testRunner.waitUntilDone(); | 57 testRunner.waitUntilDone(); |
| 58 | 58 |
| 59 function startTest() | 59 function startTest() |
| 60 { | 60 { |
| 61 var container = document.getElementById('container'); | 61 var container = document.getElementById('container'); |
| 62 container.addEventListener('webkitTransitionEnd', function() { | 62 container.addEventListener('transitionend', function() { |
| 63 container.className = ''; | 63 container.className = ''; |
| 64 if (window.testRunner) | 64 if (window.testRunner) |
| 65 testRunner.notifyDone(); | 65 testRunner.notifyDone(); |
| 66 }); | 66 }); |
| 67 container.className = 'over'; | 67 container.className = 'over'; |
| 68 } | 68 } |
| 69 window.addEventListener('load', startTest, false); | 69 window.addEventListener('load', startTest, false); |
| 70 </script> | 70 </script> |
| 71 </head> | 71 </head> |
| 72 <body> | 72 <body> |
| 73 | 73 |
| 74 <p>Tests repaint after a layer stops compositing. You should see no red belo
w after the end of the transition.</p> | 74 <p>Tests repaint after a layer stops compositing. You should see no red belo
w after the end of the transition.</p> |
| 75 <div id="container"> | 75 <div id="container"> |
| 76 <div id="translate"></div> | 76 <div id="translate"></div> |
| 77 <div id="widen"></div> | 77 <div id="widen"></div> |
| 78 </div> | 78 </div> |
| 79 | 79 |
| 80 <div id="tester"></div> | 80 <div id="tester"></div> |
| 81 </body> | 81 </body> |
| 82 </html> | 82 </html> |
| OLD | NEW |