| <!DOCTYPE html> |
| <html> |
| <head> |
| <style> |
| .negative-z { |
| position: absolute; |
| top: 20px; |
| left: 20px; |
| z-index: -1; |
| width: 20px; |
| height: 20px; |
| border: 1px solid blue; |
| } |
| |
| .transformed { |
| transform: translateZ(0); |
| } |
| |
| .relpos { |
| position: relative; |
| height: 650px; |
| height: 770px; |
| margin: 20px 40px; |
| border: 2px solid gray; |
| } |
| |
| .popover { |
| position: relative; |
| margin: 0px auto; |
| width: 100%; |
| height: 100%; |
| background-color: rgba(0, 0, 0, 0.5); |
| overflow: hidden; |
| display: block; |
| } |
| |
| .abspos { |
| position: absolute; |
| z-index: 2; |
| width: 500px; |
| height: 165px; |
| background-color: green; |
| } |
| </style> |
| <script> |
| if (window.testRunner) { |
| testRunner.dumpAsText(); |
| testRunner.waitUntilDone(); |
| } |
| |
| function showPopover() |
| { |
| let popover = document.querySelector('.popover'); |
| popover.showPopover(); |
| } |
| |
| window.addEventListener('load', () => { |
| setTimeout(() => { |
| showPopover(); |
| if (window.testRunner) |
| testRunner.notifyDone(); |
| }, 0); |
| }, false); |
| </script> |
| </head> |
| <body> |
| <div class="negative-z"> |
| x |
| <div class="negative-z transformed">x</div> |
| </div> |
| <div class="relpos"> |
| <div popover class="popover" id="mypopover"> |
| <div class="abspos"> |
| Test passes if it does not crash. |
| </div> |
| </div> |
| </div> |
| </body> |
| </html> |