tor-browser

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

auto-001.html (867B)


      1 <!DOCTYPE html>
      2 <link rel="help" href="https://drafts.csswg.org/css-sizing-4/#last-remembered">
      3 <script src="/resources/testharness.js"></script>
      4 <script src="/resources/testharnessreport.js"></script>
      5 
      6 <div id="log"></div>
      7 
      8 <div style="height: 2000px;"></div>
      9 
     10 <div style="contain-intrinsic-size: auto 1px;" id="test">
     11  <div style="height: 50px;"></div> <!-- make 'test' have a 50px height -->
     12 </div>
     13 
     14 <script>
     15 function finalize() {
     16  el.style.contentVisibility = "auto";
     17  log.innerText = el.offsetHeight;
     18  assert_equals(el.offsetHeight, 50);
     19 }
     20 
     21 var t = async_test("contain-intrinsic-size: auto");
     22 
     23 var log = document.getElementById("log");
     24 var el = document.getElementById("test");
     25 var observer = new ResizeObserver(function() {
     26  requestAnimationFrame(t.step_func_done(finalize));
     27  observer.unobserve(el);
     28 });
     29 
     30 observer.observe(el);
     31 el.offsetWidth;
     32 
     33 </script>