blob: cbda9a1cec8001a533075c63e98d9053b180252a (
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
|
<html>
<head>
<style>
body {
direction: rtl;
margin: 0px;
background-color: red;
}
.positioned {
position: absolute;
top: 50px;
left: 50px;
width: 100px;
height: 100px;
}
.indicator {
background-color: red;
}
.layer {
transform:translateZ(0);
background-color: green;
}
#root {
width: 100%;
height: 100%;
/* root element should exactly cover red background */
background-color: white;
}
#layertree {
position: absolute;
top: 10000px;
left: 0px;
}
</style>
<script>
function doTest() {
if (window.testRunner) {
if (top == self)
document.getElementById('layertree').innerText = window.internals.layerTreeAsText(document);
testRunner.dumpAsTextWithPixelResults();
}
}
window.addEventListener('load', doTest, false);
</script>
<body>
<div id="root"></div>
<div class="positioned indicator"></div>
<div class="positioned layer"></div>
<pre id="layertree"></pre>
</body>
</html>
|