tor-browser

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

helper_hittest_bug1916028.html (1394B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <head>
      4  <title>Hit-testing on a `pointer-events: auto` element in a `pointer-events: none` ancestor</title>
      5  <script type="application/javascript" src="apz_test_utils.js"></script>
      6  <script type="application/javascript" src="apz_test_native_event_utils.js"></script>
      7  <script src="/tests/SimpleTest/paint_listener.js"></script>
      8  <meta name="viewport" content="width=device-width"/>
      9 <style>
     10 body {
     11  margin: 0;
     12  padding: 0;
     13  overflow: hidden;
     14  touch-action: none;
     15  pointer-events: none;
     16 }
     17 div {
     18  font-size: 40px;
     19  display: flex;
     20  justify-content: center;
     21  align-items: center;
     22  width: 100vw;
     23  height: 100vh;
     24 }
     25 </style>
     26 </head>
     27 <body>
     28 <div style="pointer-events: auto;"></div>
     29 <script type="application/javascript">
     30 
     31 async function test() {
     32  const config = getHitTestConfig();
     33  const utils = config.utils;
     34 
     35  checkHitResult(hitTest(centerOf(document.body)),
     36                 APZHitResultFlags.VISIBLE |
     37                 APZHitResultFlags.PAN_X_DISABLED |
     38                 APZHitResultFlags.PAN_Y_DISABLED |
     39                 APZHitResultFlags.PINCH_ZOOM_DISABLED |
     40                 APZHitResultFlags.DOUBLE_TAP_ZOOM_DISABLED,
     41                 utils.getViewId(document.scrollingElement),
     42                 utils.getLayersId(),
     43                 "pointer-events: auto");
     44 }
     45 
     46 waitUntilApzStable()
     47 .then(test)
     48 .then(subtestDone, subtestFailed);
     49 
     50 </script>
     51 </html>