59 lines
1.5 KiB
HTML
59 lines
1.5 KiB
HTML
<!DOCTYPE html>
|
|
|
|
<html>
|
|
<head>
|
|
<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;
|
|
}
|
|
|
|
#box {
|
|
height: 100px;
|
|
width: 100px;
|
|
background-color: blue;
|
|
}
|
|
|
|
.composited {
|
|
-webkit-transform: translateZ(0);
|
|
}
|
|
|
|
</style>
|
|
<script type="text/javascript" charset="utf-8">
|
|
if (window.testRunner) {
|
|
testRunner.dumpAsText();
|
|
testRunner.waitUntilDone();
|
|
}
|
|
|
|
function doTest()
|
|
{
|
|
if (window.testRunner)
|
|
testRunner.displayAndTrackRepaints();
|
|
|
|
document.getElementById('box').className = 'composited';
|
|
if (window.testRunner) {
|
|
document.getElementById('iframe').contentDocument.body.offsetWidth; // update iframe layout
|
|
document.getElementById('layers').innerText = window.internals.layerTreeAsText(document);
|
|
testRunner.notifyDone();
|
|
}
|
|
}
|
|
|
|
window.addEventListener('load', doTest, false);
|
|
</script>
|
|
</head>
|
|
<body>
|
|
|
|
<div id="box"></div>
|
|
|
|
<!-- Test with already-composited iframe contents, and iframe itself composited. -->
|
|
<iframe id="iframe" src="resources/composited-subframe.html"></iframe>
|
|
|
|
<p>When the parent document becomes composited, the layer trees should get connected together.</p>
|
|
<pre id="layers">Layer tree appears here in DRT.</pre>
|
|
</body>
|
|
</html>
|