blob: 022b1f0484c17e72cec06640fd24d38728b1a5db [file] [log] [blame]
<!DOCTYPE html>
<html class="reftest-wait">
<link rel="help" href="https://drafts.csswg.org/css-shapes-1/#basic-shape-interpolation">
<link rel="match" href="clip-path-animation-custom-timing-function-ref.html">
<style>
.transition {
clip-path: inset(45%);
transition-property: clip-path;
transition-duration: 1000000s;
transition-timing-function: cubic-bezier(0, 9, 1, 9);
transition-delay: -500000s;
}
.green {
background-color: green;
position: fixed;
left: 0px;
top: 0px;
width: 200px;
height: 200px;
}
/* for this test to succeed, the red rect needs to be entirely
occluded by the inner green rect, requiring extrapolation
beyond the largest keyframe. */
.red {
background-color: red;
position: fixed;
left: 50px;
top: 50px;
width: 100px;
height: 100px;
}
</style>
<script src="/common/reftest-wait.js"></script>
<body>
<div class="green">
<div class="red">
<div class="green transition" id="target"></div>
</div>
</div>
<script>
function update() {
document.getElementById('target').style.clipPath = "inset(40%)";
requestAnimationFrame(() => {
takeScreenshot();
});
}
requestAnimationFrame(function () {
requestAnimationFrame(update);
});
</script>
</body>
</html>