зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1699601 - Rename promiseApzRepaintsFlushed to promiseOnlyApzControllerFlushed. r=botond
This was a mechanical search-and-replace operation, plus adding some docs on renamed function. Differential Revision: https://phabricator.services.mozilla.com/D109245
This commit is contained in:
Родитель
a0fc34d157
Коммит
4b1b64c91f
|
@ -61,7 +61,7 @@ function runTest() {
|
|||
}
|
||||
}, true);
|
||||
|
||||
promiseApzRepaintsFlushed(win).then(function() {
|
||||
promiseOnlyApzControllerFlushed(win).then(function() {
|
||||
scrollDown150PxWithPixelScrolling(scrollbox);
|
||||
});
|
||||
}, win);
|
||||
|
|
|
@ -249,7 +249,13 @@ function promiseAfterPaint() {
|
|||
});
|
||||
}
|
||||
|
||||
function promiseApzRepaintsFlushed(aWindow = window) {
|
||||
// This waits until any pending events on the APZ controller thread are
|
||||
// processed, and any resulting repaint requests are received by the main
|
||||
// thread. Note that while the repaint requests do get processed by the
|
||||
// APZ handler on the main thread, the repaints themselves may not have
|
||||
// occurred by the the returned promise resolves. If you want to wait
|
||||
// for those repaints, consider using promiseApzFlushedRepaints instead.
|
||||
function promiseOnlyApzControllerFlushed(aWindow = window) {
|
||||
return new Promise(function(resolve, reject) {
|
||||
var repaintDone = function() {
|
||||
dump("PromiseApzRepaintsFlushed: APZ flush done\n");
|
||||
|
@ -284,7 +290,7 @@ function promiseApzRepaintsFlushed(aWindow = window) {
|
|||
// most tests.
|
||||
async function promiseApzFlushedRepaints() {
|
||||
await promiseAllPaintsDone();
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
await promiseAllPaintsDone();
|
||||
}
|
||||
|
||||
|
@ -583,7 +589,7 @@ async function waitUntilApzStable() {
|
|||
dump("WaitUntilApzStable: done promiseFocus\n");
|
||||
await promiseAllPaintsDone();
|
||||
dump("WaitUntilApzStable: done promiseAllPaintsDone\n");
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
dump("WaitUntilApzStable: all done\n");
|
||||
}
|
||||
|
||||
|
@ -609,7 +615,7 @@ async function forceLayerTreeToCompositor() {
|
|||
}
|
||||
}
|
||||
await promiseAllPaintsDone(null, true);
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
}
|
||||
|
||||
function isApzEnabled() {
|
||||
|
@ -1148,7 +1154,7 @@ function assertNotCheckerboarded(utils, scrollerId, msgPrefix) {
|
|||
async function waitToClearOutAnyPotentialScrolls(aWindow) {
|
||||
await promiseFrame(aWindow);
|
||||
await promiseFrame(aWindow);
|
||||
await promiseApzRepaintsFlushed(aWindow);
|
||||
await promiseOnlyApzControllerFlushed(aWindow);
|
||||
await promiseFrame(aWindow);
|
||||
await promiseFrame(aWindow);
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ add_task(async function test_main() {
|
|||
utils.restoreNormalRefresh();
|
||||
// Flush pending APZ repaints, then read the main-thread scroll
|
||||
// position
|
||||
await content.window.wrappedJSObject.promiseApzRepaintsFlushed(
|
||||
await content.window.wrappedJSObject.promiseOnlyApzControllerFlushed(
|
||||
content.window
|
||||
);
|
||||
return content.window.scrollY;
|
||||
|
|
|
@ -16,7 +16,7 @@ Services.scriptloader.loadSubScript(
|
|||
this
|
||||
);
|
||||
|
||||
// This is a simplified/combined version of promiseApzRepaintsFlushed and
|
||||
// This is a simplified/combined version of promiseOnlyApzControllerFlushed and
|
||||
// promiseAllPaintsDone. We need this function because, unfortunately, there is
|
||||
// no easy way to use paint_listeners.js' functions and apz_test_utils.js'
|
||||
// functions in popup contents opened by extensions either as scripts in the
|
||||
|
|
|
@ -19,7 +19,7 @@ async function test() {
|
|||
|
||||
// wait for it to layerize fully and then try again
|
||||
await promiseAllPaintsDone();
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
scrollerPos = scroller.scrollTop;
|
||||
|
||||
await promiseMoveMouseAndScrollWheelOver(scroller, dx, dy);
|
||||
|
|
|
@ -29,7 +29,7 @@ async function test() {
|
|||
// scrolling is happening in APZ and is not reflected in the main-thread
|
||||
// scroll position (it is stored in the callback transform instead). We check
|
||||
// this by checking the scroll offset.
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
is(window.scrollY, 0, "Main-thread scroll position is still at 0");
|
||||
|
||||
// Scroll the iframe by 150px.
|
||||
|
|
|
@ -40,7 +40,7 @@ async function test() {
|
|||
await dragFinisher();
|
||||
|
||||
// Flush everything just to be safe
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
|
||||
// After dragging the scrollbar 20px on a 200px-high scrollable div, we should
|
||||
// have scrolled approx 10% of the 2000px high content. There might have been
|
||||
|
|
|
@ -29,7 +29,7 @@ async function test() {
|
|||
await dragFinisher();
|
||||
|
||||
// Flush everything just to be safe
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
|
||||
// After dragging the scrollbar 20px on a 200px-high scrollable div, we should
|
||||
// have scrolled approx 10% of the 2000px high content. There might have been
|
||||
|
|
|
@ -33,7 +33,7 @@ async function test() {
|
|||
await dragFinisher();
|
||||
|
||||
// Flush everything just to be safe
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
|
||||
// In this case we just want to make sure the scroll position moved from 0
|
||||
// which indicates the thumb dragging worked properly.
|
||||
|
|
|
@ -38,7 +38,7 @@ async function test() {
|
|||
await dragFinisher();
|
||||
|
||||
// Flush everything just to be safe
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
|
||||
// In this case we just want to make sure the scroll position moved from 0
|
||||
// which indicates the thumb dragging worked properly.
|
||||
|
|
|
@ -38,7 +38,7 @@ async function test() {
|
|||
await dragFinisher();
|
||||
|
||||
// Flush everything just to be safe
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
|
||||
// In this case we just want to make sure the scroll position moved from 0
|
||||
// which indicates the thumb dragging worked properly.
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
await new Promise(resolve => {
|
||||
synthesizeNativeTouchDrag(target, 10, 10, 200, -10, resolve);
|
||||
});
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
apzFlushed = true;
|
||||
|
||||
setTimeout(checkForTestEnd, 0);
|
||||
|
|
|
@ -37,7 +37,7 @@ async function test() {
|
|||
await dragFinisher();
|
||||
|
||||
// Flush everything just to be safe
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
|
||||
// In this case we just want to make sure the scroll position moved from 0
|
||||
// which indicates the thumb dragging worked properly.
|
||||
|
|
|
@ -36,7 +36,7 @@ async function test() {
|
|||
await dragFinisher();
|
||||
|
||||
// Flush everything just to be safe
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
|
||||
// Ensure the scroll position ended up roughly where we wanted it (around
|
||||
// 50px, but definitely less than 1300px).
|
||||
|
|
|
@ -58,7 +58,7 @@ async function test() {
|
|||
window.scrollBy({top: 500, left: 0, behavior: 'auto'});
|
||||
is(window.scrollY, 500, "document got scrolled instantly");
|
||||
|
||||
// Note that at this point we must NOT call promiseApzRepaintsFlushed, because
|
||||
// Note that at this point we must NOT call promiseOnlyApzControllerFlushed, because
|
||||
// otherwise APZCCallbackHelper::NotifyFlushComplete will trigger a repaint
|
||||
// (for unrelated reasons), and the repaint will clear the checkerboard
|
||||
// state. We do, however, want to wait for a "steady state" here that
|
||||
|
|
|
@ -18,7 +18,7 @@ async function clickButton() {
|
|||
// force a dispatch-to-content region on the document
|
||||
document.addEventListener("wheel", function() { /* no-op */ }, { passive: false });
|
||||
await promiseAllPaintsDone();
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
}
|
||||
|
||||
synthesizeNativeMouseEventWithAPZ(
|
||||
|
|
|
@ -52,7 +52,7 @@ async function test() {
|
|||
for (let i = 0; i < 5; i++) {
|
||||
utils.advanceTimeAndRefresh(16);
|
||||
}
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
|
||||
let curPos = scroller.scrollTop;
|
||||
ok(curPos > 0,
|
||||
|
@ -69,7 +69,7 @@ async function test() {
|
|||
for (let i = 0; i < 1000; i++) {
|
||||
utils.advanceTimeAndRefresh(16);
|
||||
}
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
|
||||
// Ensure the scroll position hasn't changed since the last time we checked,
|
||||
// which indicates the animation got interrupted.
|
||||
|
|
|
@ -18,7 +18,7 @@ async function test() {
|
|||
await transformEndPromise;
|
||||
|
||||
dump("Transform complete; flushing repaints...\n");
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
|
||||
var outerScroll = document.getElementById("outer").scrollTop;
|
||||
is(outerScroll, 50, "check that the div scrolled");
|
||||
|
|
|
@ -36,7 +36,7 @@ async function test() {
|
|||
await dragFinisher();
|
||||
|
||||
// Flush everything just to be safe
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
|
||||
// After dragging the scrollbar 20px on a 1000px-high viewport, we should
|
||||
// have scrolled approx 2% of the 5000px high content. There might have been
|
||||
|
|
|
@ -21,7 +21,7 @@ async function loaded() {
|
|||
window.dispatchEvent(new Event("FissionTestHelper:Init"));
|
||||
// Wait a couple of animation frames before sending the load, to ensure that
|
||||
// this OOPIF's layer tree has been sent to the compositor. We use this
|
||||
// instead of things like promiseApzRepaintsFlushed and/or promiseAllPaintsDone because
|
||||
// instead of things like promiseOnlyApzControllerFlushed and/or promiseAllPaintsDone because
|
||||
// this page is running without SpecialPowers and I couldn't figure out a good
|
||||
// way to get a hold of a things like Services.obs or DOMWindowUtils easily.
|
||||
await promiseFrame();
|
||||
|
|
|
@ -70,7 +70,7 @@ async function test() {
|
|||
utils.advanceTimeAndRefresh(16);
|
||||
}
|
||||
utils.restoreNormalRefresh();
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
|
||||
ok(!wheeled, "OOPIF correctly did not get wheel event");
|
||||
ok(!scrolled, "OOPIF correctly did not scroll");
|
||||
|
|
|
@ -113,7 +113,7 @@ async function test() {
|
|||
}
|
||||
utils.restoreNormalRefresh();
|
||||
// Let the repaint requests get processed
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
await promiseAllPaintsDone();
|
||||
|
||||
ok(window.scrollY > 5, "window has scrolled by " + window.scrollY + " pixels");
|
||||
|
|
|
@ -19,7 +19,7 @@ async function test() {
|
|||
await transformEndPromise;
|
||||
|
||||
dump("Transform complete; flushing repaints...\n");
|
||||
await promiseApzRepaintsFlushed(outer.contentWindow);
|
||||
await promiseOnlyApzControllerFlushed(outer.contentWindow);
|
||||
|
||||
var outerScroll = outer.contentWindow.scrollY;
|
||||
if (getPlatform() == "windows") {
|
||||
|
|
|
@ -58,7 +58,7 @@ function recordEvent(e) {
|
|||
if (eventsFired == 7) {
|
||||
removeMouseEventListeners(target);
|
||||
dump("Finished waiting for events, doing an APZ flush to see if any more unexpected events come through...\n");
|
||||
promiseApzRepaintsFlushed().then(function() {
|
||||
promiseOnlyApzControllerFlushed().then(function() {
|
||||
dump("Done APZ flush, ending test...\n");
|
||||
subtestDone();
|
||||
});
|
||||
|
@ -82,7 +82,7 @@ function recordEvent(e) {
|
|||
removeMouseEventListeners(target);
|
||||
synthesizeNativeTouch(target, 5, 5, SpecialPowers.DOMWindowUtils.TOUCH_REMOVE, function() {
|
||||
dump("Finished synthesizing touch-end, doing an APZ flush to see if any more unexpected events come through...\n");
|
||||
promiseApzRepaintsFlushed().then(function() {
|
||||
promiseOnlyApzControllerFlushed().then(function() {
|
||||
dump("Done APZ flush, ending test...\n");
|
||||
subtestDone();
|
||||
});
|
||||
|
|
|
@ -37,7 +37,7 @@ async function test() {
|
|||
dump("Finished native wheel, waiting for listener to run...\n");
|
||||
|
||||
await wheelEventPromise;
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
|
||||
is(window.scrollY, 0, "check that the window didn't scroll");
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ async function test() {
|
|||
ok(fpos.scrollTop > scrollPos, "scrollable item inside fixed-pos element scrolled");
|
||||
// wait for it to layerize fully and then try again
|
||||
await promiseAllPaintsDone();
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
scrollPos = fpos.scrollTop;
|
||||
await promiseMoveMouseAndScrollWheelOver(fpos, 50, 150);
|
||||
ok(fpos.scrollTop > scrollPos, "scrollable item inside fixed-pos element scrolled after layerization");
|
||||
|
|
|
@ -122,7 +122,7 @@ async function test() {
|
|||
type: "mouseup",
|
||||
});
|
||||
// Flush everything just to be safe
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
|
||||
ok(scrollableDiv.scrollTop == savedScrollPos, "Final scroll position was " + scrollableDiv.scrollTop);
|
||||
}
|
||||
|
|
|
@ -25,12 +25,12 @@ async function test() {
|
|||
// in the scroll position not advancing at all.
|
||||
for (let i = 0; i < 100; i++) {
|
||||
document.scrollingElement.scrollBy({top:60, behavior: "smooth"});
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
utils.advanceTimeAndRefresh(16);
|
||||
}
|
||||
|
||||
utils.restoreNormalRefresh();
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
|
||||
let scrollPos = document.scrollingElement.scrollTop;
|
||||
ok(scrollPos > 60, `Scrolled ${scrollPos}px, should be more than 60`);
|
||||
|
|
|
@ -22,12 +22,12 @@ async function test() {
|
|||
for (let i = 0; i < 100; i++) {
|
||||
s1.scrollBy({top:60, behavior: "smooth"});
|
||||
s2.scrollBy({top:60, behavior: "smooth"});
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
utils.advanceTimeAndRefresh(16);
|
||||
}
|
||||
|
||||
utils.restoreNormalRefresh();
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
|
||||
let s1pos = s1.scrollTop;
|
||||
let s2pos = s2.scrollTop;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
async function doZoomIn() {
|
||||
await waitUntilApzStable();
|
||||
await pinchZoomInWithTouch(100, 100);
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
}
|
||||
|
||||
// Silence SimpleTest warning about missing assertions by having it wait
|
||||
|
|
|
@ -22,21 +22,21 @@ async function test() {
|
|||
ok(synthesizeNativeTouchDrag(target, 10, 100, 0, -50),
|
||||
"Synthesized native vertical drag (1), waiting for touch-end event...");
|
||||
await touchEndPromise;
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
checkScroll(0, 50, "After first vertical drag, with pan-y" );
|
||||
|
||||
// switch style to pan-x
|
||||
document.body.style.touchAction = "pan-x";
|
||||
ok(true, "Waiting for pan-x to propagate...");
|
||||
await promiseAllPaintsDone(null, true);
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
|
||||
// drag the page up to scroll down by 50px, but it won't happen because pan-x
|
||||
touchEndPromise = promiseTouchEnd(document.body);
|
||||
ok(synthesizeNativeTouchDrag(target, 10, 100, 0, -50),
|
||||
"Synthesized native vertical drag (2), waiting for touch-end event...");
|
||||
await touchEndPromise;
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
checkScroll(0, 50, "After second vertical drag, with pan-x");
|
||||
|
||||
// drag the page left to scroll right by 50px
|
||||
|
@ -44,7 +44,7 @@ async function test() {
|
|||
ok(synthesizeNativeTouchDrag(target, 100, 10, -50, 0),
|
||||
"Synthesized horizontal drag (1), waiting for touch-end event...");
|
||||
await touchEndPromise;
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
checkScroll(50, 50, "After first horizontal drag, with pan-x");
|
||||
|
||||
// drag the page diagonally right/down to scroll up/left by 40px each axis;
|
||||
|
@ -53,14 +53,14 @@ async function test() {
|
|||
ok(synthesizeNativeTouchDrag(target, 10, 10, 40, 40),
|
||||
"Synthesized diagonal drag (1), waiting for touch-end event...");
|
||||
await touchEndPromise;
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
checkScroll(10, 50, "After first diagonal drag, with pan-x");
|
||||
|
||||
// switch style back to pan-y
|
||||
document.body.style.touchAction = "pan-y";
|
||||
ok(true, "Waiting for pan-y to propagate...");
|
||||
await promiseAllPaintsDone(null, true);
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
|
||||
// drag the page diagonally right/down to scroll up/left by 40px each axis;
|
||||
// only the y-axis will actually scroll because pan-y
|
||||
|
@ -68,14 +68,14 @@ async function test() {
|
|||
ok(synthesizeNativeTouchDrag(target, 10, 10, 40, 40),
|
||||
"Synthesized diagonal drag (2), waiting for touch-end event...");
|
||||
await touchEndPromise;
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
checkScroll(10, 10, "After second diagonal drag, with pan-y");
|
||||
|
||||
// switch style to none
|
||||
document.body.style.touchAction = "none";
|
||||
ok(true, "Waiting for none to propagate...");
|
||||
await promiseAllPaintsDone(null, true);
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
|
||||
// drag the page diagonally up/left to scroll down/right by 40px each axis;
|
||||
// neither will scroll because of touch-action
|
||||
|
@ -83,13 +83,13 @@ async function test() {
|
|||
ok(synthesizeNativeTouchDrag(target, 100, 100, -40, -40),
|
||||
"Synthesized diagonal drag (3), waiting for touch-end event...");
|
||||
await touchEndPromise;
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
checkScroll(10, 10, "After third diagonal drag, with none");
|
||||
|
||||
document.body.style.touchAction = "manipulation";
|
||||
ok(true, "Waiting for manipulation to propagate...");
|
||||
await promiseAllPaintsDone(null, true);
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
|
||||
// drag the page diagonally up/left to scroll down/right by 40px each axis;
|
||||
// both will scroll because of touch-action
|
||||
|
@ -97,7 +97,7 @@ async function test() {
|
|||
ok(synthesizeNativeTouchDrag(target, 100, 100, -40, -40),
|
||||
"Synthesized diagonal drag (4), waiting for touch-end event...");
|
||||
await touchEndPromise;
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
checkScroll(50, 50, "After fourth diagonal drag, with manipulation");
|
||||
}
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ async function resetConfiguration(config) {
|
|||
s.scrollTop = 0;
|
||||
|
||||
await promiseAllPaintsDone();
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
}
|
||||
|
||||
async function test() {
|
||||
|
@ -63,7 +63,7 @@ async function test() {
|
|||
"Synthesized drag of (" + dx + ", " + dy + ") on configuration " + configuration);
|
||||
await touchEndPromise;
|
||||
await promiseAllPaintsDone();
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
// Check for expected scroll position
|
||||
checkScroll(scrollframe, ex, ey, "configuration " + configuration + " " + desc);
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
"Synthesized native vertical drag, waiting for touch-end event...");
|
||||
await touchEndPromise;
|
||||
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
|
||||
is(window.scrollX, 0, "X scroll offset didn't change");
|
||||
is(window.scrollY, 50, "Y scroll offset changed");
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
"Synthesized native vertical drag, waiting for touch-end event...");
|
||||
await touchEndPromise;
|
||||
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
|
||||
is(window.scrollX, 0, "X scroll offset didn't change");
|
||||
is(window.scrollY, 50, "Y scroll offset changed");
|
||||
|
|
|
@ -18,7 +18,7 @@ async function test() {
|
|||
"Synthesized native vertical drag, waiting for touch-end event...");
|
||||
await touchEndPromise;
|
||||
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
|
||||
is(window.scrollX, 0, "X scroll offset didn't change");
|
||||
is(window.scrollY, 0, "Y scroll offset didn't change");
|
||||
|
|
|
@ -18,7 +18,7 @@ async function doubleTapOn(element, x, y) {
|
|||
await transformEndPromise;
|
||||
|
||||
// Flush state so we can query an accurate resolution
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
}
|
||||
|
||||
async function test() {
|
||||
|
|
|
@ -19,7 +19,7 @@ async function doubleTapOn(element, x, y) {
|
|||
await transformEndPromise;
|
||||
|
||||
// Flush state so we can query an accurate resolution
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
}
|
||||
|
||||
async function test() {
|
||||
|
|
|
@ -53,7 +53,7 @@ async function test() {
|
|||
for (let i = 0; i < 1000; i++) {
|
||||
utils.advanceTimeAndRefresh(16);
|
||||
}
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
|
||||
let pageScrollAmount = scroller.scrollTop;
|
||||
ok(pageScrollAmount > scroller.clientHeight / 2,
|
||||
|
@ -71,7 +71,7 @@ async function test() {
|
|||
for (let i = 0; i < 5; i++) {
|
||||
utils.advanceTimeAndRefresh(16);
|
||||
}
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
let curPos = scroller.scrollTop;
|
||||
ok(curPos > pageScrollAmount, `Scroll offset has increased to ${curPos}`);
|
||||
ok(curPos < pageScrollAmount * 2, "Second page-scroll is not yet complete");
|
||||
|
@ -87,7 +87,7 @@ async function test() {
|
|||
for (let i = 0; i < 1000; i++) {
|
||||
utils.advanceTimeAndRefresh(16);
|
||||
}
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
curPos = scroller.scrollTop;
|
||||
ok(Math.abs(curPos - (pageScrollAmount * 3)) < 3,
|
||||
`Final scroll offset ${curPos} is close to 3x${pageScrollAmount}`);
|
||||
|
|
|
@ -32,7 +32,7 @@ async function test() {
|
|||
// Scrolling over outer1 should layerize outer1, but not inner1.
|
||||
await promiseMoveMouseAndScrollWheelOver(no_layer, 10, 10, true);
|
||||
await promiseAllPaintsDone();
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
|
||||
ok(container.scrollTop > 0, "We should have scrolled the body");
|
||||
ok(!isLayerized("no_layer"), "no_layer should still not be layerized");
|
||||
|
|
|
@ -27,7 +27,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1277814
|
|||
// Wait for the layer tree with any updated dispatch-to-content region to
|
||||
// get pushed over to the APZ
|
||||
await promiseAllPaintsDone();
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
|
||||
// Trigger layerization of the subframe by scrolling the wheel over it
|
||||
await promiseMoveMouseAndScrollWheelOver(subframe, 10, 10);
|
||||
|
|
|
@ -37,7 +37,7 @@ async function test() {
|
|||
// Set margins on the element, to ensure it is layerized
|
||||
utils.setDisplayPortMarginsForElement(0, 0, 0, 0, elm, /* priority*/ 1);
|
||||
await promiseAllPaintsDone();
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
|
||||
// Take control of the refresh driver
|
||||
utils.advanceTimeAndRefresh(0);
|
||||
|
@ -62,7 +62,7 @@ async function test() {
|
|||
}
|
||||
utils.restoreNormalRefresh();
|
||||
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
is(elm.scrollTop, 100, "The scrollTop now should be y=100");
|
||||
}
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ async function test() {
|
|||
// Set margins on the element, to ensure it is layerized
|
||||
utils.setDisplayPortMarginsForElement(0, 0, 0, 0, elm, /* priority*/ 1);
|
||||
await promiseAllPaintsDone();
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
|
||||
// Take control of the refresh driver
|
||||
utils.advanceTimeAndRefresh(0);
|
||||
|
@ -66,7 +66,7 @@ async function test() {
|
|||
}
|
||||
utils.restoreNormalRefresh();
|
||||
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
is(elm.scrollTop, 100, "The scrollTop now should be y=100");
|
||||
}
|
||||
|
||||
|
|
|
@ -157,7 +157,7 @@
|
|||
async function test() {
|
||||
var elm = document.getElementsByClassName("inner")[0];
|
||||
elm.scrollTop = 0;
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
|
||||
// Take over control of the refresh driver and compositor
|
||||
var utils = SpecialPowers.DOMWindowUtils;
|
||||
|
@ -170,7 +170,7 @@ async function test() {
|
|||
// Let's do a couple of frames of the animation, and make sure it's going
|
||||
utils.advanceTimeAndRefresh(16);
|
||||
utils.advanceTimeAndRefresh(16);
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
ok(elm.scrollTop > 0, "APZ animation in progress, scrollTop is now " + elm.scrollTop);
|
||||
ok(elm.scrollTop < 200, "APZ animation not yet completed, scrollTop is now " + elm.scrollTop);
|
||||
|
||||
|
@ -190,7 +190,7 @@ async function test() {
|
|||
// and the frame reconstruction
|
||||
utils.advanceTimeAndRefresh(16);
|
||||
utils.advanceTimeAndRefresh(16);
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
ok(elm.scrollTop < 200, "APZ animation not yet completed, scrollTop is now " + elm.scrollTop);
|
||||
ok(frameReconstructionTriggered > 0, "Frame reconstruction triggered, reconstruction triggered " + frameReconstructionTriggered + " times");
|
||||
|
||||
|
@ -200,7 +200,7 @@ async function test() {
|
|||
}
|
||||
utils.restoreNormalRefresh();
|
||||
await promiseAllPaintsDone();
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
|
||||
is(elm.scrollTop, 200, "Element should have scrolled by 200px");
|
||||
}
|
||||
|
|
|
@ -610,7 +610,7 @@ async function test() {
|
|||
var maxScroll = elm.scrollTopMax;
|
||||
elm.scrollTop = maxScroll;
|
||||
await promiseAllPaintsDone();
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
|
||||
// Take control of the refresh driver
|
||||
utils.advanceTimeAndRefresh(0);
|
||||
|
|
|
@ -139,7 +139,7 @@ async function test() {
|
|||
// Scrolling over outer1 should activate outer1 directly, but not inner1.
|
||||
await scrollWheelOver(document.getElementById("outer1"));
|
||||
await promiseAllPaintsDone();
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
ok(checkDirectActivation("outer1"),
|
||||
"scrolling 'outer1' should activate it directly");
|
||||
ok(checkInactive("inner1"),
|
||||
|
@ -148,7 +148,7 @@ async function test() {
|
|||
// Scrolling over inner2 should activate inner2 directly, but outer2 only ancestrally.
|
||||
await scrollWheelOver(document.getElementById("inner2"));
|
||||
await promiseAllPaintsDone();
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
ok(checkDirectActivation("inner2"),
|
||||
"scrolling 'inner2' should cause it to be directly activated");
|
||||
ok(checkAncestorActivation("outer2"),
|
||||
|
@ -160,7 +160,7 @@ async function test() {
|
|||
// Scrolling over outer3 should activate outer3 directly, but not inner3.
|
||||
await scrollWheelOver(outer3Doc.documentElement);
|
||||
await promiseAllPaintsDone();
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
ok(checkDirectActivation("outer3"), "scrolling 'outer3' should cause it to be directly activated");
|
||||
ok(checkInactive("inner3", outer3Doc),
|
||||
"scrolling 'outer3' should not cause 'inner3' to be activated");
|
||||
|
@ -168,7 +168,7 @@ async function test() {
|
|||
// Scrolling over inner4 should activate inner4 directly, but outer4 only ancestrally.
|
||||
await scrollWheelOver(outer4Doc.getElementById("inner4"));
|
||||
await promiseAllPaintsDone();
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
ok(checkDirectActivation("inner4", outer4Doc),
|
||||
"scrolling 'inner4' should cause it to be directly activated");
|
||||
ok(checkAncestorActivation("outer4"),
|
||||
|
@ -194,7 +194,7 @@ async function test() {
|
|||
// Expire displayport with scrolling on outer1
|
||||
await scrollWheelOver(document.getElementById("outer1"));
|
||||
await promiseAllPaintsDone();
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
await SpecialPowers.promiseTimeout(DISPLAYPORT_EXPIRY);
|
||||
await promiseAllPaintsDone();
|
||||
ok(checkInactive("outer1"), "outer1 is inactive after displayport expiry");
|
||||
|
@ -203,7 +203,7 @@ async function test() {
|
|||
// Expire displayport with scrolling on inner2
|
||||
await scrollWheelOver(document.getElementById("inner2"));
|
||||
await promiseAllPaintsDone();
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
// Once the expiry elapses, it will trigger expiry on outer2, so we check
|
||||
// both, one at a time.
|
||||
await SpecialPowers.promiseTimeout(DISPLAYPORT_EXPIRY);
|
||||
|
@ -239,7 +239,7 @@ async function test() {
|
|||
let inner3 = outer3Doc.getElementById("inner3");
|
||||
await scrollWheelOver(inner3);
|
||||
await promiseAllPaintsDone();
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
let timerPromise = new Promise(resolve => {
|
||||
var timeoutTarget = function() {
|
||||
inner3.removeEventListener("scroll", timeoutResetter);
|
||||
|
@ -272,7 +272,7 @@ async function test() {
|
|||
// inner4 is still layerized
|
||||
await scrollWheelOver(outer4Doc.documentElement);
|
||||
await promiseAllPaintsDone();
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
// Wait for the expiry to elapse
|
||||
await SpecialPowers.promiseTimeout(DISPLAYPORT_EXPIRY);
|
||||
await promiseAllPaintsDone();
|
||||
|
|
|
@ -76,7 +76,7 @@ async function test() {
|
|||
|
||||
// Let the event regions and layerization propagate to the APZ
|
||||
await promiseAllPaintsDone();
|
||||
await promiseApzRepaintsFlushed();
|
||||
await promiseOnlyApzControllerFlushed();
|
||||
|
||||
await promiseNativeMouseEventWithAPZAndWaitForEvent({
|
||||
type: "mousemove",
|
||||
|
|
Загрузка…
Ссылка в новой задаче