tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

exclude-inline.html (788B)


      1 <!DOCTYPE html>
      2 <link rel="help" href="https://drafts.csswg.org/css-scroll-anchoring/">
      3 <script src="/resources/testharness.js"></script>
      4 <script src="/resources/testharnessreport.js"></script>
      5 <style>
      6 
      7 #expander {
      8  margin-bottom: 50px;
      9 }
     10 #no {
     11  overflow-anchor: none;
     12 }
     13 #spacing {
     14  margin-bottom: 300vh;
     15 }
     16 
     17 </style>
     18 <span>out of view</span>
     19 <div id="expander"></div>
     20 <span id="no">excluded subtree <span>[nested inline]</span></span>
     21 <div id="spacing"></div>
     22 <script>
     23 
     24 // Tests that an inline element can be an excluded subtree.
     25 
     26 test(() => {
     27  scrollTo(0, 50);
     28  document.querySelector('#expander').style = "margin-bottom: 100px";
     29  assert_equals(document.scrollingElement.scrollTop, 50,
     30      "Scroll anchoring should not anchor within the span.");
     31  scrollTo(0, 0);
     32 });
     33 
     34 </script>