Home | History | Annotate | Download | only in compositing
      1 <!DOCTYPE html>
      2 <html>
      3 <head>
      4   <style>
      5     body {
      6       height: 2000px;
      7       margin: 0px;
      8       padding: 0px;
      9     }
     10     .main {
     11       position: fixed;
     12     }
     13     .fixed {
     14       position: fixed;
     15       width: 100%;
     16       height: 100px;
     17       left: 0px;
     18       bottom: -100px;
     19       background-color: red;
     20     }
     21   </style>
     22 </head>
     23 
     24 <body>
     25   <div class="main">
     26     This test is applicable on platforms that do accelerated compositing, can prepaint out-of-view contents and can scroll the contents into the viewport without repainting them.<p>
     27     The following settings need to be enabled:<p>
     28     - acceleratedCompositingForFixedPositionEnabled<br>
     29     - fixedPositionCreatesStackingContext<p>
     30     To test, scroll the page up and down. The test passes if there is no temporary or permanent red in the page.
     31   </div>
     32 
     33   <!-- An out-of-view fixed element that should be never visible -->
     34   <div class="fixed"></div>
     35 </body>
     36 </html>
     37 
     38