forked from WebKit/WebKit-http
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfixed-position-scroll.html
63 lines (59 loc) · 1.45 KB
/
fixed-position-scroll.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
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
.absolute {
background-color: green;
height: 96px;
position: absolute;
top: 0;
left: 0;
width: 100%;
z-index: 2;
}
.fixed {
background-color: red;
height: 32px;
position: fixed;
top: 0;
left: 0;
width: 100%;
z-index: 1;
}
.transformed {
background-color: #6d6d6d;
padding-top: 24px;
margin: 64px 0px 1920px 0px;
width: 100%;
height: 40px;
-webkit-transform: translateZ(0);
}
</style>
<script src="../../fast/repaint/resources/repaint.js"></script>
<script type="text/javascript" charset="utf-8">
if (window.testRunner) {
testRunner.dumpAsText(true);
testRunner.waitUntilDone();
}
function repaintTest()
{
window.scrollBy(0,-96);
if (window.testRunner)
testRunner.notifyDone();
}
function doTest()
{
window.scrollBy(0,-2048);
window.scrollBy(0,160);
runRepaintTest();
}
window.addEventListener('load', doTest, false);
</script>
</head>
<body>
<div class="absolute"></div>
<div class="fixed"></div>
<div class="transformed"></div>
<p> For this test to pass, you should not see a red line when scroll position is less or equal to 64px from the top. </p>
</body>
</html>