| 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 top layer element's containing block is the initial containing | 
|  | 12 block. The dialog is positioned at (1200, 1200) and the window is scrolled to | 
|  | 13 (1000, 1000) so the dialog should be positioned at (200, 200) relative to the | 
|  | 14 viewport. | 
|  | 15 </p> | 
|  | 16 <div style="position: absolute; top: 5000px; left: 5000px; width: 20px;"> | 
|  | 17     <dialog id="dialog" style="top: 1200px; left: 1200px; right: auto; height: 2
    50px; width: 50%; background-color: yellow"> | 
|  | 18         This dialog should be onscreen with a width of 50% of the viewport. It i
    s the child of an narrow element | 
|  | 19         positioned off screen, but its containing block is the initial containin
    g block, so its | 
|  | 20         position and percent lengths are relative to that. | 
|  | 21     </dialog> | 
|  | 22 </div> | 
|  | 23 <script> | 
|  | 24 window.scroll(1000, 1000); | 
|  | 25 document.getElementById('dialog').showModal(); | 
|  | 26 </script> | 
|  | 27 </body> | 
|  | 28 </html> | 
| OLD | NEW | 
|---|