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

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/reftests/abs-pos/fixed-pos-auto-offset-1a.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,42 @@
     1.4 +<!DOCTYPE html>
     1.5 +<html class="reftest-wait">
     1.6 +<head>
     1.7 +  <title>Testcase Bug 851514</title>
     1.8 +  <style>
     1.9 +  #parent {
    1.10 +    position: fixed;
    1.11 +    height: 30px;
    1.12 +    width: 30px;
    1.13 +    background: green;
    1.14 +    left: 70px;
    1.15 +    top: 70px;
    1.16 +    overflow:hidden;
    1.17 +    display: none; /* So we can make sure there is only one frame construction
    1.18 +                      and one reflow for the parent + child thing */
    1.19 +  }
    1.20 +  #child {
    1.21 +    position: fixed;
    1.22 +    top: auto;
    1.23 +    left: auto;
    1.24 +    width: 10px;
    1.25 +    height: 10px;
    1.26 +    background: purple;
    1.27 +  }
    1.28 +  </style>
    1.29 +  <script>
    1.30 +    function doTest() {
    1.31 +      var par = document.getElementById("parent");
    1.32 +      // Flush layout
    1.33 +      par.getBoundingClientRect();
    1.34 +      par.style.display = "block";
    1.35 +      document.documentElement.className = "";
    1.36 +    }
    1.37 +  </script>
    1.38 +</head>
    1.39 +<body onload="doTest();">
    1.40 +  <div id="parent">
    1.41 +    <div id="child"></div>
    1.42 +  </div>
    1.43 +  The purple block should be inside the green block.
    1.44 +</body>
    1.45 +</html>

mercurial