blob: 51ae43f9ae5efce023893ffb773e042076081010 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="../../../resources/run-after-layout-and-paint.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>
function doTest() {
runAfterLayoutAndPaint(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)";
}, true);
}
window.addEventListener("load", doTest, false);
</script>
</head>
<body>
<div id="indicator"></div>
<div id="clipper"></div>
</body>
</html>