Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<html class="reftest-wait">
<link rel="help" href="https://crbug.com/1274414">
<link rel="match" href="position-fixed-scroll-overlap-ref.html">
<meta name="assert" content="The red fixed-position element should be always invisible
(covered by the green elements), regardless of viewport scroll offset">
<script src="/common/rendering-utils.js"></script>
<script src="/common/reftest-wait.js"></script>
<style>
.section {
width: 100px;
height: 2000px;
background: green;
position: relative;
z-index: 2;
}
</style>
<svg style="width: 100px; height: 1000px; position: fixed">
<rect width="200" height="2000" fill="red"/>
</svg>
<div class="section"></div>
<div class="section"></div>
<div class="section"></div>
<div class="section"></div>
<script>
waitForAtLeastOneFrame().then(() => {
window.scrollTo(0, 4000);
waitForAtLeastOneFrame().then(() => {
window.scrollTo(0, 0);
takeScreenshot();
});
});
</script>
</html>