blob: ba1b537221130b975649e75eceaff5ebe1513b8e [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="../resources/run-after-display.js"></script>
<style>
#indicator {
position: absolute;
top: 0px;
left: 0px;
height: 100px;
width: 100px;
background-color: red;
}
#clipper {
transform:translateZ(0);
position: absolute;
top: 0px;
left: 0px;
height: 100px;
width: 100px;
background-color: green;
clip: rect(25px, 75px, 75px, 25px);
}
</style>
<script>
if (window.testRunner) {
testRunner.dumpAsTextWithPixelResults();
testRunner.waitUntilDone();
}
function doTest() {
runAfterDisplay(function() {
// The change in clip style should be reflected immediately in the size
// of the composited clipper layer. After changing the clip, it should
// entirely cover the indicator.
var clipper = document.getElementById("clipper");
clipper.style.clip = "rect(0px, 100px, 100px, 0px)";
if (window.testRunner)
testRunner.notifyDone();
});
}
window.addEventListener("load", doTest, false);
</script>
</head>
<body>
<div id="indicator"></div>
<div id="clipper"></div>
</body>
</html>