layout/reftests/abs-pos/fixed-pos-auto-offset-1a.html

Wed, 31 Dec 2014 13:27:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 13:27:57 +0100
branch
TOR_BUG_3246
changeset 6
8bccb770b82d
permissions
-rw-r--r--

Ignore runtime configuration files generated during quality assurance.

     1 <!DOCTYPE html>
     2 <html class="reftest-wait">
     3 <head>
     4   <title>Testcase Bug 851514</title>
     5   <style>
     6   #parent {
     7     position: fixed;
     8     height: 30px;
     9     width: 30px;
    10     background: green;
    11     left: 70px;
    12     top: 70px;
    13     overflow:hidden;
    14     display: none; /* So we can make sure there is only one frame construction
    15                       and one reflow for the parent + child thing */
    16   }
    17   #child {
    18     position: fixed;
    19     top: auto;
    20     left: auto;
    21     width: 10px;
    22     height: 10px;
    23     background: purple;
    24   }
    25   </style>
    26   <script>
    27     function doTest() {
    28       var par = document.getElementById("parent");
    29       // Flush layout
    30       par.getBoundingClientRect();
    31       par.style.display = "block";
    32       document.documentElement.className = "";
    33     }
    34   </script>
    35 </head>
    36 <body onload="doTest();">
    37   <div id="parent">
    38     <div id="child"></div>
    39   </div>
    40   The purple block should be inside the green block.
    41 </body>
    42 </html>

mercurial