tor-browser

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

remove-float-then-abspos-in-inline.html (854B)


      1 <!DOCTYPE html>
      2 <title>Removing floats changed to positioned object should not crash</title>
      3 <link rel="author" href="kojii@chromium.org">
      4 <link rel="help" href="https://crbug.com/1101277">
      5 <meta name="assert" content="Removing floats changed to positioned object should not crash">
      6 <style>
      7 .float {
      8  float: left;
      9 }
     10 .abs {
     11  position: absolute;
     12 }
     13 </style>
     14 <script src="/resources/testharness.js"></script>
     15 <script src="/resources/testharnessreport.js"></script>
     16 <body>
     17  <div id="container">text<span id="target" class="float"></span></div>
     18 </body>
     19 <script>
     20 test(() => {
     21  document.body.offsetTop;
     22  let target = document.getElementById('target');
     23 
     24  // Change `#target` from floating object to positioned object.
     25  target.className = 'abs';
     26  document.body.offsetTop;
     27 
     28  // and remove it.
     29  target.remove();
     30 }, 'No crash or DCHECK failure');
     31 </script>