blob: 016a4613d222db13b456283c6da9976f8878108e (
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
65
66
67
68
69
70
71
72
73
74
75
76
|
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
#overlay {
position: absolute;
left: 10px;
top: 10px;
width: 400px;
height: 100px;
z-index: 1;
background-color: rgba(0, 0, 0, 0.5);
}
#container {
position: absolute;
left: 200px;
top: 8px;
width: 200px;
z-index: 2;
border: 2px solid blue;
}
#composited {
transform: translateZ(0);
width: 20px;
height: 20px;
}
#scroller {
height: 200px;
background-color: yellow;
overflow-y: scroll;
}
#scroller > div {
height: 400px;
}
pre {
margin-top: 200px;
}
</style>
<script type="text/javascript" charset="utf-8">
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
function doTest()
{
window.setTimeout(function() {
document.getElementById('scroller').scrollTop = 50;
if (window.testRunner) {
document.getElementById('results').innerText = window.internals.layerTreeAsText(document);
testRunner.notifyDone();
}
}, 20);
}
window.addEventListener('load', doTest, false);
</script>
</head>
<body>
<div id="composited"></div>
<div id="overlay"></div>
<div id="container">
<div id="scroller">
<div>scroll me</div>
</div>
</div>
<pre id="results"></pre>
</body>
</html>
|