blob: 9b2eeed087898c592aa2333cae38edf62b9a8188 [file] [log] [blame] [edit]
<!DOCTYPE html>
<html>
<head>
<style>
#indicator {
position: absolute;
top: 0px;
left: 0px;
height: 100px;
width: 100px;
background-color: red;
}
#clipper {
-webkit-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.dumpAsText(true);
async function doTest() {
testRunner?.waitUntilDone();
await testRunner?.displayAndTrackRepaints();
// 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)";
testRunner?.notifyDone();
}
window.addEventListener("load", doTest, false);
</script>
</head>
<body>
<div id="indicator"></div>
<div id="clipper"></div>
</body>
</html>