<!DOCTYPE html>
<script>
testRunner.setPrinting();
internals.settings.setShouldPrintBackgrounds(true);
</script>
There should be a green square on the next page. No red.
<div style="break-before:page; height:50px;"></div>
<div style="position:relative; overflow:clip; height:100px;">
<div style="position:absolute; top:-200px; width:100px; height:10000px;">
<div style="position:absolute; top:100px; width:100px; height:10000px;">
<div style="height:100px; background:red;"></div>
<!-- Leave a small gap here, or some subpixels of red might bleed into the
visible area. -->
<div style="height:2px;"></div>
<div style="height:100px; background:green;"></div>
</div>
</div>