tor-browser

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

content-visibility-svg.html (934B)


      1 <!DOCTYPE html>
      2 <link rel="author" href="mailto:jarhar@chromium.org">
      3 <link rel="help" href="http://crbug.com/1247417">
      4 <script src="/resources/testharness.js"></script>
      5 <script src="/resources/testharnessreport.js"></script>
      6 
      7 <div style="content-visibility:hidden">
      8  <svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg">
      9    <g id="group_text_1">
     10      <text x="5" y="16" transform="scale(2, 2)">Hello World!</text>
     11      <text x="8" y="32" transform="translate(0 20) scale(1.25 1)">Hello World Again!</text>
     12    </g>
     13  </svg>
     14 </div>
     15 
     16 <script>
     17  test(() => {
     18    const groupElement = document.getElementById('group_text_1');
     19    const bbox = groupElement.getBBox();
     20    assert_not_equals(bbox.width, 0, 'width');
     21    assert_not_equals(bbox.height, 0, 'height');
     22    assert_not_equals(bbox.x, 0, 'x');
     23    assert_not_equals(bbox.y, 0, 'y');
     24  }, `getBBox() should return nonzero values in a c-v:hidden subtree.`);
     25 </script>