blob: 19d8b547337b9ec2eff4c73388ea3ae818f87763 [file] [log] [blame]
<html>
<head>
<style>
#clipper {
width: 550px;
height: 550px;
overflow:hidden;
}
#trigger {
/* Only overlap with the contents element, not the stretch element */
-webkit-transform:translateZ(0);
position: absolute;
top: 0px;
left: 0px;
width: 500px;
height: 200px;
}
#container {
/* Force compositing for this layer if any children get composited */
-webkit-transform:translate(0px, 1px);
}
#negative {
/* Trigger foreground layer from container */
z-index: -1;
position: absolute;
}
#contents {
/* foreground layer contents */
width: 550px;
height: 550px;
background-color: green;
}
/* Move this element to stretch container to have a negative offset */
#stretch {
position: absolute;
background-color: blue;
top: 200px;
left: -200px;
width: 50px;
height: 50px;
}
</style>
<script>
if (window.testRunner)
testRunner.dumpAsText(true);
function doTest()
{
if (window.testRunner)
testRunner.displayAndTrackRepaints();
document.getElementById("stretch").style.left = "-100px";
}
window.addEventListener('load', doTest, false);
</script>
</head>
<body>
<div id="trigger"></div>
<div id="clipper">
<div id="container">
<img id="contents">
<div id="stretch"></div>
<div id="negative"></div>
</div>
</div>
</body>