| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <script> |
| 5 if (window.internals) |
| 6 internals.settings.setDialogElementEnabled(true); |
| 7 </script> |
| 8 </head> |
| 9 <body style="height: 10000px; width: 10000px"> |
| 10 <p style="position: fixed"> |
| 11 This tests that a dialog's containing block is the initial containing block. |
| 12 The dialog is positioned at (1200, 1200) and the window is scrolled to (1000, |
| 13 1000) so the dialog should be positioned at (200, 200) relative to the viewport. |
| 14 </p> |
| 15 <div style="position: absolute; top: 5000px; left: 5000px; width: 20px;"> |
| 16 <dialog id="dialog" style="top: 1200px; left: 1200px; right: auto; height: 2
50px; width: 50%; background-color: yellow"> |
| 17 This dialog should be onscreen with a width of 50% of the viewport. It i
s the child of an narrow element |
| 18 positioned off screen, but its containing block is the initial containin
g block, so its |
| 19 position and percent lengths are relative to that. |
| 20 </dialog> |
| 21 </div> |
| 22 <script> |
| 23 window.scroll(1000, 1000); |
| 24 document.getElementById('dialog').show(); |
| 25 </script> |
| 26 </body> |
| 27 </html> |
| OLD | NEW |