tor-browser

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

inline-block.html (626B)


      1 <!DOCTYPE html>
      2 <script src="/resources/testharness.js"></script>
      3 <script src="/resources/testharnessreport.js"></script>
      4 <style>
      5 
      6 body { height: 4000px }
      7 #outer { line-height: 100px }
      8 #ib1, #ib2 { display: inline-block }
      9 
     10 </style>
     11 <span id=outer>
     12  <span id=ib1>abc</span>
     13  <br><br>
     14  <span id=ib2>def</span>
     15 </span>
     16 <script>
     17 
     18 // Tests anchoring to an inline block inside a <span>.
     19 
     20 test(() => {
     21  document.scrollingElement.scrollTop = 150;
     22  document.querySelector("#ib1").style.lineHeight = "150px";
     23  assert_equals(document.scrollingElement.scrollTop, 200);
     24 }, "Anchor selection descent into inline blocks.");
     25 
     26 </script>