gfx/layers/apz/test/mochitest/test_group_hittest-1.html
author James Teh <jteh@mozilla.com>
Wed, 01 Feb 2023 05:02:01 +0000
changeset 651150 dd0fdd1daa69783be36acd5c50544f3694eaa8f9
parent 576266 82cf330340dc0e9703b5774c3af1f9ffbf394de3
permissions -rw-r--r--
Bug 1813980: Check IsDoc before Parent in RemoteAccessibleBase::ApplyCrossDocOffset. r=morgan We call this function on every ancestor when calculating bounds. RemoteParent() currently requires a hash lookup, so it's more efficient to early return for !IsDoc() first. This is a micro-optimisation, but it might have some impact given that we call this on every ancestor, especially when hit testing, where we call Bounds() a lot. As a bit of drive-by cleanup, use RemoteParent() rather than calling Parent() and IsRemote/AsRemote(). Differential Revision: https://phabricator.services.mozilla.com/D168346

<!DOCTYPE HTML>
<html>
<head>
  <meta charset="utf-8">
  <title>Various hit-testing tests that spawn in new windows - Part 1</title>
  <script src="/tests/SimpleTest/SimpleTest.js"></script>
  <script type="application/javascript" src="apz_test_utils.js"></script>
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
  <script type="application/javascript">

var prefs = [
  // Turn off displayport expiry so that we don't miss failures where the
  // displayport is set and then expires before we get around to doing the
  // hit-test inside the activated scrollframe.
  ["apz.displayport_expiry_ms", 0],
  // Always layerize the scrollbar track, so as to get consistent results
  // across platforms. Eventually we should probably get rid of this and make
  // the tests more robust in terms of testing all the different cross-platform
  // variations.
  ["layout.scrollbars.always-layerize-track", true],
  // We need this pref to allow the synthetic mouse events to propagate to APZ,
  // and to allow the MozMouseHittest event in particular to be dispatched to
  // APZ as a MouseInput so the hit result is recorded.
  ["test.events.async.enabled", true],
  // Turns on APZTestData logging which we use to obtain the hit test results.
  ["apz.test.logging_enabled", true],
];

var overscroll_prefs = [...prefs,
                        ["apz.overscroll.enabled", true],
                        ["apz.overscroll.test_async_scroll_offset.enabled", true],
                       ];

var subtests = [
  {"file": "helper_hittest_basic.html", "prefs": prefs},
  {"file": "helper_hittest_fixed_in_scrolled_transform.html", "prefs": prefs},
  {"file": "helper_hittest_float_bug1434846.html", "prefs": prefs},
  {"file": "helper_hittest_float_bug1443518.html", "prefs": prefs},
  {"file": "helper_hittest_checkerboard.html", "prefs": prefs},
  {"file": "helper_hittest_backface_hidden.html", "prefs": prefs},
  {"file": "helper_hittest_touchaction.html", "prefs": prefs},
  {"file": "helper_hittest_nested_transforms_bug1459696.html", "prefs": prefs},
  {"file": "helper_hittest_sticky_bug1478304.html", "prefs": prefs},
  {"file": "helper_hittest_clipped_fixed_modal.html", "prefs": prefs},
];

if (isApzEnabled()) {
  SimpleTest.waitForExplicitFinish();
  window.onload = function() {
    runSubtestsSeriallyInFreshWindows(subtests)
    .then(SimpleTest.finish, SimpleTest.finishWithFailure);
  };
}

  </script>
</head>
<body>
</body>
</html>