blob: ade1875208e861c50e661a8473c8e0ce0aec93e3 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<style type="text/css" media="screen">
iframe {
border: 10px solid black;
padding: 5px;
margin: 50px;
height: 170px;
width: 320px;
float: left;
}
#overlay {
position: absolute;
width: 150px;
height: 50px;
top: 5px;
left: 5px;
background-color: rgba(0, 0, 0, 0.6);
}
pre {
clear: both;
}
</style>
<script type="text/javascript" charset="utf-8">
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
function doTest()
{
// Need to wait for compositing layers to be updated.
window.setTimeout(function() {
document.getElementById('overlay').style.height = '150px';
if (window.testRunner) {
testRunner.displayAndTrackRepaints(); // Painting has to happen to detect overlap.
document.getElementById('layers').innerHTML = window.internals.layerTreeAsText(document);
testRunner.notifyDone();
}
}, 0);
}
window.addEventListener('load', doTest, false);
</script>
</head>
<body>
<!-- Test that the parent document becomes composited when the iframe becomes overlapped. -->
<!-- The iframe does not start with a RenderLayer. -->
<iframe id="iframe" src="resources/composited-subframe.html"></iframe>
<div id="overlay">
</div>
<pre id="layers">Layer tree appears here in DRT.</pre>
</body>
</html>