layout/reftests/position-sticky/scrollframe-reflow-2.html

Thu, 15 Jan 2015 15:59:08 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:59:08 +0100
branch
TOR_BUG_9701
changeset 10
ac0c01689b40
permissions
-rw-r--r--

Implement a real Private Browsing Mode condition by changing the API/ABI;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

     1 <!DOCTYPE html>
     2 <!-- Any copyright is dedicated to the Public Domain.
     3    - http://creativecommons.org/publicdomain/zero/1.0/ -->
     4 <!-- When the scroll container is resized (without reflowing its contents),
     5    - offsets for sticky elements inside it should be recomputed -->
     6 <html>
     7   <head>
     8     <link rel="author" title="Corey Ford" href="mailto:cford@mozilla.com">
     9     <link rel="match" href="scrollframe-reflow-2-ref.html">
    10     <meta name="flags" content="dom">
    11     <style>
    12       #scroll {
    13         height: 100px;
    14         overflow: hidden;
    15         border: 1px solid black;
    16       }
    17       #sticky {
    18         position: sticky;
    19         height: 10px;
    20         top: 50%;
    21         background-color: black;
    22       }
    23       .fill {
    24         height: 1000px;
    25       }
    26     </style>
    27   <body>
    28     <div id="scroll">
    29       <div id="sticky"></div>
    30       <div class="fill"></div>
    31     </div>
    32     <script type="text/javascript">
    33       document.getElementById("scroll").style.height = "120px";
    34     </script>
    35   </body>
    36 </html>

mercurial