| <!DOCTYPE html> |
| <!-- Tests that an element composited with transform-style: preserve-3d still renders when switched to transform-style: flat --> |
| <div id="box" style="width:100px; height:100px; background-color: green; -webkit-transform: translateZ(0); -webkit-transform-style: preserve-3d"></div> |
| <script> |
| if (window.testRunner) |
| testRunner.dumpAsText(true); // Only pixel results are useful |
| |
| function test() { |
| document.getElementById("box").style.webkitTransformStyle = "flat"; |
| } |
| |
| if (window.testRunner) { |
| testRunner.displayAndTrackRepaints(); // Force one composite with preserve-3d |
| test(); |
| } else |
| window.setTimeout(test, 0); |
| </script> |