summaryrefslogtreecommitdiffstats
path: root/layout/generic/test/file_scroll_position_restore_no_bfcache.html
blob: 5e55771d42131f4919e8d442b69e357751a950f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<!doctype html>
<style>
body {
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  margin: 0;
}
#scroll {
  overflow-y: auto;
  max-height: 100vh;
}
#padding {
  height: 100vh;
}
</style>
<script>
  window.addEventListener("unload", () => { /* prevent bfcaching */ });
  window.addEventListener("pageshow", function(e) {
    window.opener.handlePageShow(e.persisted);
  });
</script>
<!-- This is important as it delays layout, so that stuff goes through PresShell::Initialize under `mDelayedLayoutStart` instead of ContentAppended -->
<link rel="stylesheet" href="slow-stylesheet.sjs">
<div id="scroll">
  <div id="padding"></div>
  <a href="t1.html">t1.html</a>
  <div id="padding"></div>
</div>