| <!DOCTYPE html> |
| <meta charset="utf-8"> |
| <title>CSS Overflow: elementFromPoint for ::scroll-marker is scroller</title> |
| <link rel="help" href="https://drafts.csswg.org/css-overflow-5/#scroll-marker"> |
| <link rel="help" href="https://drafts.csswg.org/cssom-view/#dom-document-elementfrompoint"> |
| <script src="/resources/testharness.js"></script> |
| <script src="/resources/testharnessreport.js"></script> |
| <style> |
| body { |
| margin: 0; |
| } |
| |
| #scroller { |
| scroll-marker-group: before; |
| width: 600px; |
| height: 300px; |
| overflow: auto; |
| white-space: nowrap; |
| } |
| |
| #scroller div { |
| display: inline-block; |
| width: 600px; |
| height: 200px; |
| } |
| |
| #scroller::scroll-marker-group { |
| display: flex; |
| height: 20px; |
| width: 40px; |
| } |
| |
| #scroller div::scroll-marker { |
| content: ""; |
| width: 100px; |
| height: 20px; |
| display: inline-block; |
| } |
| </style> |
| <div id="scroller"> |
| <div id="target"></div> |
| <div></div> |
| </div> |
| <script> |
| test(() => { |
| assert_equals(document.elementFromPoint(10, 10), target); |
| }); |
| </script> |