blob: 2e530a2fb29fa7b5ae354d63c63509db86097bdb (
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
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
|
<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
body {
height: 1000px;
}
.green {
background-color: green;
}
.fixed {
position: fixed;
top: 0px;
left: 0px;
}
.box {
width: 300px;
height: 300px;
}
.container {
position: relative;
}
.perspective {
-webkit-perspective: 1px;
}
</style>
<script src="../../../resources/run-after-layout-and-paint.js"></script>
<script>
if (window.testRunner) {
testRunner.dumpAsTextWithPixelResults();
}
function doTest()
{
if (window.testRunner)
testRunner.waitUntilDone();
// Any scroll should keep the fixed-position element where it is.
// If it stutters or disappears incorrectly, then the red background will be revealed.
window.scrollTo(0, 150);
if (window.testRunner) {
runAfterLayoutAndPaint(function() {
testRunner.notifyDone();
});
}
}
window.addEventListener('load', doTest, false);
</script>
</head>
<body>
<div class="green fixed box">
<div class="container">
<div class="perspective"></div>
</div>
</div>
</body>
</html>
|