forked from WebKit/WebKit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoverlay-element-overflow.html
91 lines (83 loc) · 2 KB
/
overlay-element-overflow.html
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<!DOCTYPE html> <!-- webkit-test-runner [ AsyncOverflowScrollingEnabled=true AsyncFrameScrollingEnabled=true ] -->
<html>
<head>
<meta charset="utf-8" />
<style>
body { margin: 0; padding: 0; font-family: -apple-system; }
h1, h2 { margin: 0; padding: 0; line-height: 50px; }
h2 { font-size: 1.1em; }
#test {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
overflow: scroll;
}
.fixed-overlay {
position: fixed;
top: 10px;
left: 10px;
right: 10px;
bottom: 10px;
display: flex;
justify-content: center;
align-items: center;
background: #F67280;
z-index: 100;
}
.long {
position: relative;
height: 1000px;
background: #355C7D;
}
.long::before {
content: "↓";
color: white;
font-size: 20em;
text-align: center;
position: absolute;
top: 400px;
left: 0;
right: 0;
}
</style>
<script src="../resources/ui-helper.js"></script>
</head>
<body>
<section id="test">
<div class="fixed-overlay">
<h1>This is a fixed overlay</h1>
</div>
<div class="long">
</div>
<div class="long">
</div>
<div class="long">
</div>
<div class="long">
</div>
<div class="long">
</div>
<div class="long">
</div>
<div class="long">
</div>
</section>
<pre id="results"></pre>
<script>
if (window.testRunner) {
testRunner.waitUntilDone();
testRunner.dumpAsText();
}
window.onload = async function () {
if (!window.internals)
return;
await UIHelper.ensureStablePresentationUpdate();
results.textContent = await UIHelper.getUIViewTree();
document.getElementById('test').remove();
testRunner.notifyDone();
};
</script>
</body>
</html>