tor-browser

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

display-change-with-transform.html (762B)


      1 <!DOCTYPE html>
      2 <title>Layout Instability: change display type with transform</title>
      3 <link rel="help" href="https://wicg.github.io/layout-instability/" />
      4 <style>
      5  div {
      6    width: 100px;
      7    height: 100px;
      8    background: blue;
      9  }
     10  #target {
     11    transform: translateX(0);
     12  }
     13 </style>
     14 <div id=target>
     15  <div id=shift>test</div>
     16 </div>
     17 <script src="/resources/testharness.js"></script>
     18 <script src="/resources/testharnessreport.js"></script>
     19 <script src="resources/util.js"></script>
     20 <script>
     21 
     22 promise_test(async () => {
     23  const watcher = new ScoreWatcher;
     24  await waitForAnimationFrames(2);
     25 
     26  target.style.display = 'flex';
     27 
     28  await waitForAnimationFrames(1);
     29 
     30  assert_equals(watcher.score, 0);
     31 }, 'Shift accompanied by body display change.');
     32 
     33 </script>