| <!DOCTYPE html> |
| |
| <html> |
| <head> |
| <style> |
| .box { |
| height: 400px; |
| width: 400px; |
| top: 0; |
| left: 0; |
| } |
| |
| .child { |
| position: absolute; |
| height: 400px; |
| width: 400px; |
| background-color: red; |
| } |
| |
| .composited { |
| -webkit-transform: translateZ(0); |
| } |
| |
| .fixed { |
| position: fixed; |
| top: -1000px; |
| } |
| </style> |
| <script> |
| if (window.testRunner) { |
| testRunner.dumpAsText(); |
| testRunner.waitUntilDone(); |
| } |
| |
| window.addEventListener('load', function() { |
| window.setTimeout(function() { |
| var box = document.getElementById('child'); |
| box.classList.remove('fixed'); |
| |
| var box = document.getElementById('box'); |
| box.classList.add('composited'); |
| if (window.testRunner) |
| testRunner.notifyDone(); |
| }, 0); |
| }, false); |
| </script> |
| </head> |
| <body> |
| <p>This test should not assert</p> |
| <div id="box" class="box"> |
| <div id="child" class="fixed child"> |
| </div> |
| </div> |
| </body> |
| </html> |