<!DOCTYPE html>
<html>
<head>
<style>
.clip-path {
-webkit-clip-path: url('#clipping');
clip-path: url('#clipping');
overflow: scroll;
}
.outer {
height: 400px;
width: 400px;
background-color: blue;
}
.inner {
height: 500px;
width: 500px;
background-color: yellow;
}
.spacer {
width: 100px;
height: 100px;
background-color: green;
}
.bottom {
position: relative;
top: 250px;
}
</style>
<script>
if (window.internals)
internals.settings.setPreferCompositingToLCDTextEnabled(true);
</script>
</head>
<body>
<!-- Do not remove the text. Having the div at some vertical offset verifies that we correctly offset the clip -->
This tests that reference clip-path with text is correctly applied with composited scrolling.
<svg width="0", height="0">
<defs>
<clipPath id="clipping">
<text x="100" y="120" style="font-size:60px;font-weight:bold;">CLIP</text>
</clipPath>
</defs>
</svg>
<div class="clip-path outer" id="outer">
<div class="spacer"></div>
<div class="inner">
<div class="spacer bottom"></div>
</div>
<div class="spacer"></div>
</div>
</body>
</html>