| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 | 3 |
| 4 <head> | 4 <head> |
| 5 <style> | 5 <style> |
| 6 | 6 |
| 7 #parent { | 7 #parent { |
| 8 position: absolute; | 8 position: absolute; |
| 9 z-index: 1; | 9 z-index: 1; |
| 10 top: 50px; | 10 top: 50px; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 } | 21 } |
| 22 | 22 |
| 23 #child { | 23 #child { |
| 24 background-color: cyan; | 24 background-color: cyan; |
| 25 width: 50px; | 25 width: 50px; |
| 26 height: 50px; | 26 height: 50px; |
| 27 -webkit-transform: translateZ(0); | 27 -webkit-transform: translateZ(0); |
| 28 } | 28 } |
| 29 </style> | 29 </style> |
| 30 | 30 |
| 31 <script src="../../fast/repaint/resources/text-based-repaint.js"></script> |
| 31 <script> | 32 <script> |
| 32 if (window.testRunner) | 33 function repaintTest() { |
| 33 testRunner.dumpAsText(); | 34 document.getElementById('parent').style.top = "10px"; |
| 35 } |
| 34 | 36 |
| 35 function test() | 37 runRepaintTest(); |
| 36 { | |
| 37 document.body.offsetHeight; | |
| 38 if (window.internals) | |
| 39 window.internals.startTrackingRepaints(document); | |
| 40 | |
| 41 if (window.internals) { | |
| 42 document.getElementById('parent').style.top = "10px"; | |
| 43 document.getElementById('layers').textContent = window.internals.lay
erTreeAsText(document, internals.LAYER_TREE_INCLUDES_REPAINT_RECTS); | |
| 44 } | |
| 45 } | |
| 46 </script> | 38 </script> |
| 47 </head> | 39 </head> |
| 48 | 40 |
| 49 <body onload="test()"> | 41 <body> |
| 50 <!-- | 42 <!-- |
| 51 https://code.google.com/p/chromium/issues/detail?id=256200 | 43 https://code.google.com/p/chromium/issues/detail?id=256200 |
| 52 The parent element is set up uniquely such that it is composited, but it | 44 The parent element is set up uniquely such that it is composited, but it |
| 53 still paints into its composited ancestor. When it works correctly, the | 45 still paints into its composited ancestor. When it works correctly, the |
| 54 parent element should repaint correctly when its position is changed. | 46 parent element should repaint correctly when its position is changed. |
| 55 --> | 47 --> |
| 56 <div id="parent"> | 48 <div id="parent"> |
| 57 <div id="child"></div> | 49 <div id="child"></div> |
| 58 </div> | 50 </div> |
| 59 | |
| 60 <pre id="layers"></pre> | |
| 61 </body> | 51 </body> |
| 62 | 52 |
| 63 </html> | 53 </html> |
| OLD | NEW |