async function test() { var utils = SpecialPowers.DOMWindowUtils; var elm = document.getElementById("outer");
// Set margins on the element, to ensure it is layerized
utils.setDisplayPortMarginsForElement(0, 0, 0, 0, elm, /* priority*/ 1);
await promiseAllPaintsDone();
await promiseOnlyApzControllerFlushed();
// Take control of the refresh driver
utils.advanceTimeAndRefresh(0);
// Start a smooth-scroll animation in the compositor and let it go a few
// frames, so that there is some "user scrolling" going on (per the comment
// in AsyncPanZoomController::NotifyLayersUpdated)
elm.scrollTop = 10;
utils.advanceTimeAndRefresh(16);
utils.advanceTimeAndRefresh(16);
utils.advanceTimeAndRefresh(16);
utils.advanceTimeAndRefresh(16);
// Do another scroll update but also do a frame reconstruction within the same
// tick of the refresh driver.
elm.classList.add("instant");
elm.scrollTop = 100;
elm.classList.add("contentBefore");
// Now let everything settle and all the animations run out
for (var i = 0; i < 60; i++) {
utils.advanceTimeAndRefresh(16);
}
utils.restoreNormalRefresh();
await promiseOnlyApzControllerFlushed();
is(elm.scrollTop, 100, "The scrollTop now should be y=100");
}
</script>
</head>
<body>
<div id="outer">
<div id="inner">
this is some scrollable text.<br>
this is a second line to make the scrolling more obvious.<br>
and a third for good measure.<br>
this is some scrollable text.<br>
this is a second line to make the scrolling more obvious.<br>
and a third for good measure.<br>
this is some scrollable text.<br>
this is a second line to make the scrolling more obvious.<br>
and a third for good measure.<br>
this is some scrollable text.<br>
this is a second line to make the scrolling more obvious.<br>
and a third for good measure.<br>
this is some scrollable text.<br>
this is a second line to make the scrolling more obvious.<br>
and a third for good measure.<br>
this is some scrollable text.<br>
this is a second line to make the scrolling more obvious.<br>
and a third for good measure.<br>
this is some scrollable text.<br>
this is a second line to make the scrolling more obvious.<br>
and a third for good measure.<br>
this is some scrollable text.<br>
this is a second line to make the scrolling more obvious.<br>
and a third for good measure.<br>
this is some scrollable text.<br>
this is a second line to make the scrolling more obvious.<br>
and a third for good measure.<br>
this is some scrollable text.<br>
this is a second line to make the scrolling more obvious.<br>
and a third for good measure.<br>
this is some scrollable text.<br>
this is a second line to make the scrolling more obvious.<br>
and a third for good measure.<br>
this is some scrollable text.<br>
this is a second line to make the scrolling more obvious.<br>
and a third for good measure.<br>
this is some scrollable text.<br>
this is a second line to make the scrolling more obvious.<br>
and a third for good measure.<br>
this is some scrollable text.<br>
this is a second line to make the scrolling more obvious.<br>
and a third for good measure.<br>
this is some scrollable text.<br>
this is a second line to make the scrolling more obvious.<br>
and a third for good measure.<br>
</div>
</div>
</body>
</html>
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.11 Sekunden
(vorverarbeitet am 2026-06-10)
¤
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.