mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 1580703 - Use wider spacers to ensure that the given scroll position is outside of the display port. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D45814 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
e6e6a5947c
commit
1785543e7b
@ -14,6 +14,5 @@ skip-if = true || e10s # Bug 1207012 - Permaorange from an uncaught exception th
|
||||
skip-if = true # Bug 987616
|
||||
[browser_docshell_type_editor.js]
|
||||
[browser_offscreen_image_in_out_of_process_iframe.js]
|
||||
skip-if = (webrender && os == 'win') # bug 1580703
|
||||
support-files =
|
||||
empty.html
|
||||
|
@ -43,7 +43,7 @@ add_task(async function() {
|
||||
|
||||
// Make a space bigger than display port.
|
||||
const spacer = content.document.createElement("div");
|
||||
spacer.style = "width: 100%; height: 5000px;";
|
||||
spacer.style = "width: 100%; height: 10000px;";
|
||||
scroller.appendChild(spacer);
|
||||
|
||||
const iframe = content.document.createElement("iframe");
|
||||
@ -65,7 +65,7 @@ add_task(async function() {
|
||||
content.document.body.appendChild(img);
|
||||
|
||||
const spacer = content.document.createElement("div");
|
||||
spacer.style = "width: 100%; height: 5000px;";
|
||||
spacer.style = "width: 100%; height: 10000px;";
|
||||
content.document.body.appendChild(spacer);
|
||||
await new Promise(resolve => {
|
||||
img.addEventListener("load", resolve, { once: true });
|
||||
@ -129,7 +129,7 @@ add_task(async function() {
|
||||
// Scroll the iframe into view.
|
||||
await SpecialPowers.spawn(browser, [], async () => {
|
||||
const scroller = content.document.getElementById("scroller");
|
||||
scroller.scrollTo({ left: 0, top: 4800, behavior: "smooth" });
|
||||
scroller.scrollTo({ left: 0, top: 9800, behavior: "smooth" });
|
||||
await new Promise(resolve => content.window.setTimeout(resolve, 1000));
|
||||
});
|
||||
|
||||
@ -144,7 +144,7 @@ add_task(async function() {
|
||||
const img = content.document.getElementById("img");
|
||||
// Move the image outside of the scroll port. 'position: absolute' causes
|
||||
// a relow on the image element.
|
||||
img.style = "position: absolute; top: 4000px;";
|
||||
img.style = "position: absolute; top: 9000px;";
|
||||
await new Promise(resolve =>
|
||||
content.window.requestAnimationFrame(resolve)
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user