is(window.scrollX, 0, "layout viewport didn't scroll");
let visualX = window.visualViewport.pageLeft;
ok(visualX > 0, "visual viewport did scroll");
let topWinUtils;
const isE10s = SpecialPowers.Services.appinfo.browserTabsRemoteAutostart;
// We need to reset the first paint flag on the root document in the process
// this test is loaded in.
if (!isE10s) {
// For non-e10s, such as in Fennec, this means we need the *chrome* window
// as the topmost entitiy in this process.
topWinUtils = SpecialPowers.getDOMWindowUtils(
SpecialPowers._getTopChromeWindow(window));
} else {
topWinUtils = SpecialPowers.getDOMWindowUtils(window);
}
let afterPaintPromise = promiseAfterPaint();
ok(topWinUtils.isFirstPaint === false, "first paint not set");
topWinUtils.isFirstPaint = true;
// do something that forces a paint *and* an APZ update.
document.getElementById("expand").style.width = "6000px";
// Wait for the event listener to fire.
await afterPaintPromise;
ok(true, "MozAfterPaint fired");
// Flush state just to be sure.
await promiseApzFlushedRepaints();
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.