blob: 3e41b59456c64438d3094fc29d0a59f74af1615e (
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
|
<!DOCTYPE html>
<html>
<head>
<script src="../../resources/run-after-layout-and-paint.js"></script>
<style type="text/css" media="screen">
iframe {
border: 10px solid black;
padding: 5px;
margin: 20px;
height: 150px;
width: 300px;
-webkit-box-shadow: 0 0 20px black;
transform: translateZ(0);
}
.overlay {
position: absolute;
width: 50px;
height: 50px;
top: 5px;
left: 5px;
background-color: rgba(0, 0, 0, 0.2);
}
</style>
<script type="text/javascript" charset="utf-8">
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
function doTest()
{
runAfterLayoutAndPaint(function() {
document.getElementById('iframe').className = 'composited';
if (window.testRunner) {
document.getElementById('layers').innerText = window.internals.layerTreeAsText(document);
testRunner.notifyDone();
}
});
}
window.addEventListener('load', doTest, false);
</script>
</head>
<body>
<!-- Test with already-composited iframe, and iframe contents becoming composited. -->
<iframe id="iframe" src="resources/composited-subframe.html"></iframe>
<div class="overlay">
</div>
<pre id="layers">Layer tree appears here in DRT.</pre>
</body>
</html>
|