89 lines
2.1 KiB
HTML
89 lines
2.1 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>Tests that overlap testing continues to work after a layer converts from shared to composited</title>
|
|
<style>
|
|
.trigger {
|
|
position: absolute;
|
|
transform: translateZ(0);
|
|
background-color: silver;
|
|
width: 20px;
|
|
height: 400px;
|
|
}
|
|
|
|
.provider {
|
|
position: absolute;
|
|
left: 20px;
|
|
top: 20px;
|
|
width: 400px;
|
|
height: 100px;
|
|
background-color: gray;
|
|
}
|
|
|
|
.box {
|
|
width: 100px;
|
|
height: 100px;
|
|
background-color: gray;
|
|
}
|
|
|
|
.absolute {
|
|
position: absolute;
|
|
top: 200px;
|
|
left: 0px;
|
|
background-color: lightblue;
|
|
}
|
|
|
|
.overlapper {
|
|
position: absolute;
|
|
top: 70px;
|
|
left: 150px;
|
|
width: 200px;
|
|
height: 100px;
|
|
padding: 10px;
|
|
background-color: green;
|
|
}
|
|
|
|
.stacking {
|
|
position: relative;
|
|
z-index: 0;
|
|
padding: 10px;
|
|
height: 120px;
|
|
border: 1px solid black;
|
|
}
|
|
|
|
.negative {
|
|
position: relative;
|
|
z-index: -1;
|
|
background-color: orange;
|
|
}
|
|
|
|
.negative.changed {
|
|
transform: translateZ(0);
|
|
}
|
|
|
|
</style>
|
|
<script>
|
|
if (window.testRunner)
|
|
testRunner.waitUntilDone();
|
|
|
|
window.addEventListener('load', () => {
|
|
setTimeout(() => {
|
|
document.querySelector('.negative').classList.add('changed');
|
|
if (window.testRunner)
|
|
testRunner.notifyDone();
|
|
}, 0);
|
|
}, false);
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<div class="trigger"></div>
|
|
<div class="provider">
|
|
<div class="absolute box"></div>
|
|
<div class="stacking box">
|
|
<div class="negative box"></div>
|
|
</div>
|
|
</div>
|
|
<div class="overlapper"></div>
|
|
</body>
|
|
</html>
|