wpt / css / cssom-view / elementFromPoint-subpixel.html

Status: FAIL | Duration: 48ms | Subtests: 1/4 | Open test on wpt.live | wpt.fyi

Data from commit:
1884860 Copy-on-write style attribute blocks that are in the rule tree (#831) (2026-09-02)

SubtestStatusMessage
Hit test top left corner of boxFAILcannot convert 'null' or 'undefined' to object
Hit test top right corner of boxFAILcannot convert 'null' or 'undefined' to object
Hit test bottom left corner of boxFAILcannot convert 'null' or 'undefined' to object
Hit test lower left corner of boxPASS

/css/cssom-view/elementFromPoint-subpixel.html

<!DOCTYPE html>
<html>
<head>
  <title>CSSOM View - extensions to the Document interface</title>
  <link rel="author" title="Xiaocheng Hu" href="mailto:xiaochengh@chromium.org">
  <link rel="help" href="http://www.w3.org/TR/cssom-view/#extensions-to-the-document-interface">
  <script src="/resources/testharness.js"></script>
  <script src="/resources/testharnessreport.js"></script>
  <style>
    .container {
      display: flex;
      width: 500px;
      height: 100px;
    }

    .map {
      flex: 1 1 auto;
      position: relative;
    }

    .box {
      flex: 0 0 auto;
    }

    .child {
      width: 183.66px;
    }
  </style>
</head>
<body>
  <div class="container">
    <div class="map"></div>
    <div class="box" id="box">
      <div class="child"></div>
    </div>
  </div>

  <script>
    const box = document.getElementById('box');
    const rect = box.getBoundingClientRect();

    test(() => {
      assert_equals(document.elementFromPoint(rect.x, rect.y), box);
    }, 'Hit test top left corner of box');

    test(() => {
      assert_equals(document.elementFromPoint(rect.x + rect.width - 1, rect.y), box);
    }, 'Hit test top right corner of box');

    test(() => {
      assert_equals(document.elementFromPoint(rect.x, rect.y + rect.height - 1), box);
    }, 'Hit test bottom left corner of box');

    test(() => {
      assert_equals(document.elementFromPoint(rect.x + rect.width - 1, rect.y + rect.height - 1), box);
    }, 'Hit test lower left corner of box');
  </script>
</body>
</html>