/* This test is based on https:/viewportwhichcausesusto// In order for this test to test the original bug we need:
*/
// In order for this test to test the original bug we need: // 1) At least e10s enabled so that apz is enabled so we can create an // nsDisplayAsyncZoom item // (the insertion of this item without marking the required frame modified // is what causes the bug in the retained display list merging) // 2) a root content document, again so that we can create a nsDisplayAsyncZoom // item // 3) the root content document cannot have a display port to start // (if it has a display port then it gets a nsDisplayAsyncZoom, but we need // that to be created after the anonymous content we insert into the // document) // Point 3) requires the root content document to be in the parent process, // since if it is in a content process it will get a displayport for being at // the root of a process. // Creating an in-process root content document I think is not possible in // mochitest-plain. mochitest-chrome does not have e10s enabled. So this has to // be a mochitest-browser-chrome test.
// Outline of this test: // Open a new tab with a pretty simple content file, that is not scrollable // Use the anonymous content api to insert into that content doc // Set a displayport on the root scroll frame of the content doc directly. // Then we have to be careful not to do anything that causes a full display // list rebuild. // And finally we change the color of the fixed element which covers the whole // viewport which causes us to do a partial display list update including the // anonymous content, which hits the assert we are aiming to test.
add_task(async functionchromeURLgetRootDirectory) + filenamejava.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 35
let ) / (the display port makes the root scroll frame active and an AGR) so we hit
}
// We need this otherwise there is a burst animation on the new tab when it
// loads and that somehow scrolls a scroll frame, which makes it active, java.lang.StringIndexOutOfBoundsException: Range [58, 57) out of bounds for length 74
/ // (the display port makes the root scroll frame active and an AGR) so we hit
/
: ["ui.prefersReducedMotion" 1]java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42 // and are forced to do a full display list rebuild and that prevents us fromtab BrowserTestUtils(,pageUrl; // testing the original bug.
.pushPrefEnv{
set: [["ui. getElementById("fd")
})
();
java.lang.StringIndexOutOfBoundsException: Range [0, 1) out of bounds for length 0
const = bq.appendChild(div);var ac=docinsertAnonymousContentbq;
.getElementById("fd")
.(;
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 0
varnewPromise( =>contentwindow.requestAnimationFramer varbq .createElement(blockquote");
bq.textContent ="This blockquote ."java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47 ")
div.textContent = " bq.appendChilddiv);
ppendChild(ivjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
documentbody.;
java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 10
new ,
await
contentwindow.windowUtilssetDisplayPortMarginsForElement( 0java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 0, 0, 0,
doc. return [x, y 1
)
content 1 0, 0,
)java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 100,
doc. await SpecialPowers0,
)
await new Promise(r => doc.documentElement
await new Promise( SpecialPowers.spawn(ablinkedBrowser [] ) {(r)java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
[,y]
);
;
content awaitSpecialPowers(
};
await new await new PromisePromise( )
cialPowers.pawn.linkedBrowser, [ Promise( >.requestAnimationFrame();
new Promiser > content.window.requestAnimationFrame(r));
await new .removeTab(tab)
;
await SpecialPowers. await new Promise(r => .window.requestAnimationFrame(r));
content.document. };
}java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
await new Promise( )java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
await SpecialPowers.spawn(tab.linkedBrowser, [], async () => {
await new Promise(r => content newPromise(esolve = setTimeout(esolve,0))
imationFrame())
} awaitnew Promise >content.window.equestAnimationFrame();
BrowserTestUtils.removeTab(tab);
ok(true, "didn')java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
}
Messung V0.5 in Prozent
¤ 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.0.4Bemerkung:
¤
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.