tor-browser

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

getComputedStyle-insets-absolute-crash.html (848B)


      1 <!DOCTYPE html>
      2 <title>Chromium bug: getComputedStyle() crashes with subtree layout of out-of-flow node</title>
      3 <link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1458561">
      4 
      5 <style>
      6 .container {
      7  position: relative;
      8  width: 100px;
      9  height: 100px;
     10  background: lime;
     11 }
     12 
     13 .oof {
     14  position: absolute;
     15  width: 30px;
     16  height: 30px;
     17  top: 0;
     18  left: 0;
     19  overflow: hidden;
     20  background: hotpink;
     21 }
     22 </style>
     23 
     24 <div class="container">
     25  <div id="target1" class="oof">hi</div>
     26 </div>
     27 <script>
     28 document.body.offsetTop;
     29 target1.innerText = 'boom';
     30 getComputedStyle(target1).top;  // Shouldn't crash
     31 </script>
     32 
     33 <div class="container">
     34  <div id="target2" class="oof"><div>hi</div></div>
     35 </div>
     36 <script>
     37 document.body.offsetTop;
     38 target2.firstChild.innerText = 'boom';
     39 getComputedStyle(target2).top;  // Shouldn't crash
     40 </script>