blob: 7cf25f9c8e6957f88e7603ea9c8ab1817f724073 (
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
77
78
79
80
81
82
83
84
|
<!DOCTYPE html>
<html>
<head>
<style type="text/css" media="screen">
body {
position: relative;
}
.container {
position: relative;
width: 100px;
height: 100px;
padding: 20px;
z-index: 0;
border: 1px solid black;
}
.compositing {
position: absolute;
top: 21px;
left: 21px;
width: 100px;
height: 100px;
transform: translateZ(0);
}
#far-left {
position: relative;
left: -1000px;
width: 1200px;
height: 100px;
background-color: green;
}
#far-left.moved {
transform: translateX(200px);
}
.indicator {
position: absolute;
top: 21px;
left: 21px;
width: 100px;
height: 100px;
background-color: red;
}
</style>
<script type="text/javascript" charset="utf-8">
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
function doTest()
{
document.getElementById('far-left').className = 'moved';
if (window.testRunner) {
document.getElementById('layers').innerText = window.internals.layerTreeAsText(document);
testRunner.notifyDone();
}
}
window.addEventListener('load', doTest, false);
</script>
</head>
<body>
<!-- Go into compositing. -->
<div class="compositing"></div>
<div class="indicator"></div>
<!-- Test that layers get updated on the addition of a transform -->
<!-- The green layer should extend to the left edge of the page -->
<div class="container">
<div id="far-left">
Text here
</div>
</div>
<pre id="layers">Layer tree goes here in DRT</pre>
</body>
</html>
|