layout/reftests/position-sticky/block-in-inline-3.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/reftests/position-sticky/block-in-inline-3.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,46 @@
     1.4 +<!DOCTYPE html>
     1.5 +<!-- Any copyright is dedicated to the Public Domain.
     1.6 +   - http://creativecommons.org/publicdomain/zero/1.0/ -->
     1.7 +<html>
     1.8 +  <head>
     1.9 +    <title>CSS Test: Sticky Positioning - block inside inline, contained position</title>
    1.10 +    <link rel="author" title="L. David Baron" href="mailto:dbaron@mozilla.com">
    1.11 +    <link rel="match" href="block-in-inline-3-ref.html">
    1.12 +    <meta name="assert" content="Inline elements split because they contain blocks should always have all parts moved the same offset from their normal position">
    1.13 +    <link rel="stylesheet" type="text/css" href="ahem.css">
    1.14 +    <style>
    1.15 +      #scroll {
    1.16 +        height: 100px;
    1.17 +        overflow: hidden;
    1.18 +        font: 20px/1 Ahem;
    1.19 +      }
    1.20 +      #contain {
    1.21 +        height: 100px;
    1.22 +      }
    1.23 +      #sticky {
    1.24 +        display: inline;
    1.25 +        position: sticky;
    1.26 +        top: 10px;
    1.27 +      }
    1.28 +    </style>
    1.29 +  </head>
    1.30 +  <body>
    1.31 +    <div id="scroll">
    1.32 +      <div style="height: 20px"></div>
    1.33 +      <div id="contain">
    1.34 +        before inline
    1.35 +        <div id="sticky">
    1.36 +          before block
    1.37 +          <div>in block</div>
    1.38 +          after block
    1.39 +        </div>
    1.40 +        after inline
    1.41 +      </div>
    1.42 +      <div style="height: 100px"></div>
    1.43 +    </div>
    1.44 +    <script type="application/javascript">
    1.45 +      // should start moving after 40px
    1.46 +      document.getElementById("scroll").scrollTop = 60;
    1.47 +    </script>
    1.48 +  </body>
    1.49 +</html>

mercurial