| <!DOCTYPE html> |
| |
| <!-- |
| Check that removing the preserve-3d attribute from a layer has the intended |
| effect. See https://bugs.webkit.org/show_bug.cgi?id=95732. |
| |
| Passing criteria: green box shown without any visible red. |
| --> |
| |
| <html> |
| <head> |
| <style type="text/css" media="screen"> |
| body { |
| -webkit-perspective: 400px; |
| } |
| |
| .transformed-container { |
| -webkit-transform-style: preserve-3d; |
| -webkit-transform: rotateX(90deg); |
| } |
| |
| .reverse-transformed-child { |
| -webkit-transform: rotateX(-90deg); |
| } |
| |
| .box { |
| width: 100px; |
| height: 100px; |
| } |
| |
| .indicator { |
| background: red; |
| } |
| |
| .test { |
| position: absolute; |
| -webkit-transform: translateZ(0); |
| background: green; |
| } |
| </style> |
| |
| <script type="text/javascript"> |
| function doTest() { |
| if (window.testRunner) { |
| window.testRunner.dumpAsText(true); |
| window.testRunner.waitUntilDone(); |
| } |
| window.setTimeout(function() { |
| document.getElementById('container').style.webkitTransformStyle = 'flat'; |
| if (window.testRunner) |
| window.testRunner.notifyDone(); |
| }, 0); |
| } |
| window.addEventListener('load', doTest); |
| </script> |
| </head> |
| |
| <body> |
| <div class="test box"></div> |
| <div id="container" class="transformed-container box"> |
| <div class="reverse-transformed-child indicator box"></div> |
| </div> |
| </body> |
| </html> |