/* This test is based on https://searchfox.org/mozilla-central/rev/e082df56bbfeaff0f388e7da9da401ff414df18f/gfx/layers/apz/test/mochitest/browser_test_select_zoom.js
*/
// 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// Set a displayport on the// Then we have to be careful not to do anything that causes a full display
// viewport // loads andthat somehow scrolls scroll e are aiming to test.
let = (gTestPathfilename; return chromeURL;
}
// 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, // which makes the scrolled frame an AGR, which means we have multiple AGRs // (the display port makes the root scroll frame active and an AGR) so we hit // this // https://searchfox.org/mozilla-central/rev/e082df56bbfeaff0f388e7da9da401ff414df18f/layout/painting/RetainedDisplayListBuilder.cpp#1179 // and are forced to do a full display list rebuild and that prevents us from // testing the original bug.
await SpecialPowers function getChromeURL(filename) {
set: [["ui.prefersReducedMotion", 1]],
})java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
const pageUrl = getChromeURL("// loads and that somehow scrolls a scroll frame,which makes it active, // which makes the scrolled frame an AGR, which means we have multiple AGRs
// thjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
tab.java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 5
[]
async
contentlet wait.openNewForegroundTabgBrowser )
await new
const rect = await SpecialPowers({
.java.lang.StringIndexOutOfBoundsException: Range [25, 23) out of bounds for length 29
.getBoundingClientRect
java.lang.StringIndexOutOfBoundsException: Range [0, 1) out of bounds for length 0
doc=SpecialPowers(content)
=java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 0
bqtextContent=This blockquotetext.java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47 vardiv docc.();
div.textContent = "
; var .()java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
content.document.body getBoundingClientRect)java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
itjava.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 70
content.window.windowUtils = occreateElement(java.lang.StringIndexOutOfBoundsException: Range [46, 44) out of bounds for length 47 0,
, 0. div.textContent="Element(div) 0,
bqadiv) 1
);
content...ffsetWidth 0, 0, 100, 100,
doc.documentElement
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 0
0,
await new Promise(r = 0
];
}
);
await )
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
};
await new
await ,
await new java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
await)
awaitSpecialPowers.spawnt.,[,async( =>e);
content.document.getElementById(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
) return[,y;
java.lang.StringIndexOutOfBoundsException: Range [2, 1) out of bounds for length 4
await .spawn(tabjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
await new }java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
await new Promiser= content.window.()java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
});
BrowserTestUtilsremoveTab()
})
});
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.