| background-color: yellow; |
| -webkit-transform:translateZ(0); |
| -webkit-transform:translateZ(0); |
| result = "First (small layer):<br>" + window.internals.layerTreeAsText(document); |
| document.getElementById('container').style.height = "5000px"; |
| document.getElementById('blue-box').style.top = "4700px"; |
| result += "<br><br>Second (huge layer):<br>" + window.internals.layerTreeAsText(document); |
| document.getElementById('container').style.height = "500px"; |
| document.getElementById('blue-box').style.top = "200px"; |
| result += "<br><br>Third (small layer):<br>" + window.internals.layerTreeAsText(document); |
| document.getElementById('layers').innerHTML = result; |
| window.addEventListener('load', testOnLoad, false); |
| The yellow box should be 500 x 500 on startup. Then it should |
| stretch to be 500 x 5000, then shrink back down to 500 x 500. |
| This tests that we can resize to a huge layer and back again |
| and still maintain integrity of the layer tree. |
| <div class="box at-the-top"></div> |
| <div id="blue-box" class="box at-the-bottom"></div> |
| <pre id="layers">Layer tree appears here in DRT.</pre> |