Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/gfx/layers/apz/test/mochitest/   (Browser von der Mozilla Stiftung Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 2 kB image not shown  

Quelle  helper_bug1462961.html   Sprache: HTML

 
 products/Sources/formale Sprachen/C/Firefox/gfx/layers/apz/test/mochitest/helper_bug1462961.html


<!DOCTYPE HTML>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width; initial-scale=1.0">
  <title>Dragging the mouse on a transformed scrollframe inside a fixed-pos element</title>
  <script type="application/javascript" src="apz_test_native_event_utils.js"></script>
  <script type="application/javascript" src="apz_test_utils.js"></script>
  <script src="/tests/SimpleTest/paint_listener.js"></script>
  <script type="text/javascript">

async function test() {
  var scrollableDiv = document.getElementById("scrollable");
  let scrollPromise = new Promise(resolve => {
    scrollableDiv.addEventListener("scroll", resolve, {once: true});
  });

  // Scroll down a small amount (10px). The bug in this case is that the
  // scrollthumb remains a little "above" where it's supposed to be, so if the
  // bug manifests here, then the thumb will remain at the top of the track
  // and the scroll position will remain at 0.
  var dragFinisher = await promiseVerticalScrollbarDrag(scrollableDiv, 10, 10);
  if (!dragFinisher) {
    ok(true, "No scrollbar, can't do this test");
    return;
  }

  // the events above might be stuck in APZ input queue for a bit until the
  // layer is activated, so we wait here until the scroll event listener is
  // triggered.
  await scrollPromise;

  await dragFinisher();

  // Flush everything just to be safe
  await promiseOnlyApzControllerFlushed();

  // In this case we just want to make sure the scroll position moved from 0
  // which indicates the thumb dragging worked properly.
  ok(scrollableDiv.scrollTop > 0, "Scrollbar drag resulted in a scroll position of " + scrollableDiv.scrollTop);
}

waitUntilApzStable()
.then(test)
.then(subtestDone, subtestFailed);

  </script>
  <style>
    #fixed {
      position: fixed;
      left: 0;
      top: 0;
      width: 300px;
      height: 100%;
    }
    #scrollable {
      transform: translateY(100px);
      overflow: scroll;
      height: 100%;
    }
    #content {
      height: 5000px;
      background-image: linear-gradient(red,blue);
    }
  </style>
</head>
<body>
<div id="fixed">
  <div id="scrollable">
    <div id="content"></div>
  </div>
</div>
</body>
</html>

Messung V0.5
C=95 H=95 G=94

¤ Dauer der Verarbeitung: 0.18 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.