tor-browser

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

block-in-inline-hittest-001.html (990B)


      1 <!DOCTYPE html>
      2 <meta name="assert" content="Test hit-testing when block-in-inline is in culled inline">
      3 <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level">
      4 <link rel="help" href="https://drafts.csswg.org/cssom-view/#dom-document-elementfrompoint">
      5 <link rel="author" title="Koji Ishii" href="mailto:kojii@chromium.org" />
      6 <script src="/resources/testharness.js"></script>
      7 <script src="/resources/testharnessreport.js"></script>
      8 <body>
      9  <div>
     10    <span>
     11      <span style="outline: 1px solid blue">
     12        <div id="target">
     13          <div style="width: 64px; height: 26px;">
     14          </div>
     15        </div>
     16      </span>
     17    </span>
     18  </div>
     19 <script>
     20 test(() => {
     21  const target = document.getElementById('target');
     22  const bounds = target.getBoundingClientRect();
     23  const x = bounds.x + bounds.width / 2;
     24  const y = bounds.y + bounds.height / 2;
     25  const result = document.elementFromPoint(x, y);
     26  assert_equals(result, target);
     27 });
     28 </script>
     29 </body>