| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 | 2 |
| 3 <!-- | 3 <!-- |
| 4 Check that removing the preserve-3d attribute from a layer has the intended | 4 Check that removing the preserve-3d attribute from a layer has the intended |
| 5 effect. See https://bugs.webkit.org/show_bug.cgi?id=95732. | 5 effect. See https://bugs.webkit.org/show_bug.cgi?id=95732. |
| 6 | 6 |
| 7 Passing criteria: green box shown without any visible red. | 7 Passing criteria: green box shown without any visible red. |
| 8 --> | 8 --> |
| 9 | 9 |
| 10 <html> | 10 <html> |
| 11 <head> | 11 <head> |
| 12 <style type="text/css" media="screen"> | 12 <style type="text/css" media="screen"> |
| 13 body { | 13 body { |
| 14 -webkit-perspective: 400px; | 14 -webkit-perspective: 400px; |
| 15 } | 15 } |
| 16 | 16 |
| 17 .transformed-container { | 17 .transformed-container { |
| 18 -webkit-transform-style: preserve-3d; | 18 -webkit-transform-style: preserve-3d; |
| 19 -webkit-transform: rotateX(90deg); | 19 transform: rotateX(90deg); |
| 20 } | 20 } |
| 21 | 21 |
| 22 .reverse-transformed-child { | 22 .reverse-transformed-child { |
| 23 -webkit-transform: rotateX(-90deg); | 23 transform: rotateX(-90deg); |
| 24 } | 24 } |
| 25 | 25 |
| 26 .box { | 26 .box { |
| 27 width: 100px; | 27 width: 100px; |
| 28 height: 100px; | 28 height: 100px; |
| 29 } | 29 } |
| 30 | 30 |
| 31 .indicator { | 31 .indicator { |
| 32 background: red; | 32 background: red; |
| 33 } | 33 } |
| 34 | 34 |
| 35 .test { | 35 .test { |
| 36 position: absolute; | 36 position: absolute; |
| 37 -webkit-transform: translateZ(0); | 37 transform: translateZ(0); |
| 38 background: green; | 38 background: green; |
| 39 } | 39 } |
| 40 </style> | 40 </style> |
| 41 | 41 |
| 42 <script type="text/javascript"> | 42 <script type="text/javascript"> |
| 43 function doTest() { | 43 function doTest() { |
| 44 if (window.testRunner) { | 44 if (window.testRunner) { |
| 45 window.testRunner.dumpAsTextWithPixelResults(); | 45 window.testRunner.dumpAsTextWithPixelResults(); |
| 46 window.testRunner.waitUntilDone(); | 46 window.testRunner.waitUntilDone(); |
| 47 } | 47 } |
| 48 window.setTimeout(function() { | 48 window.setTimeout(function() { |
| 49 document.getElementById('container').style.webkitTransformStyle = 'fla
t'; | 49 document.getElementById('container').style.webkitTransformStyle = 'fla
t'; |
| 50 if (window.testRunner) | 50 if (window.testRunner) |
| 51 window.testRunner.notifyDone(); | 51 window.testRunner.notifyDone(); |
| 52 }, 0); | 52 }, 0); |
| 53 } | 53 } |
| 54 window.addEventListener('load', doTest); | 54 window.addEventListener('load', doTest); |
| 55 </script> | 55 </script> |
| 56 </head> | 56 </head> |
| 57 | 57 |
| 58 <body> | 58 <body> |
| 59 <div class="test box"></div> | 59 <div class="test box"></div> |
| 60 <div id="container" class="transformed-container box"> | 60 <div id="container" class="transformed-container box"> |
| 61 <div class="reverse-transformed-child indicator box"></div> | 61 <div class="reverse-transformed-child indicator box"></div> |
| 62 </div> | 62 </div> |
| 63 </body> | 63 </body> |
| 64 </html> | 64 </html> |
| OLD | NEW |