56 lines
1.4 KiB
HTML
56 lines
1.4 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>Tests that a composited layer down in the subtree of a negative z-index child triggers a foreground layer</title>
|
|
<style>
|
|
.container {
|
|
width: 300px;
|
|
height: 300px;
|
|
border: 1px solid black;
|
|
position: relative;
|
|
z-index: 0;
|
|
}
|
|
|
|
.composited {
|
|
transform: translateZ(0);
|
|
background-color: orange;
|
|
width: 100px;
|
|
height: 100px;
|
|
}
|
|
|
|
.negativez {
|
|
position: relative;
|
|
z-index: -1;
|
|
padding: 10px;
|
|
margin: 10px;
|
|
border: 2px solid gray;
|
|
}
|
|
|
|
.contents {
|
|
margin: -80px 22px;
|
|
background-color: green;
|
|
width: 100px;
|
|
height: 100px;
|
|
}
|
|
</style>
|
|
<script>
|
|
if (window.testRunner)
|
|
testRunner.dumpAsText();
|
|
|
|
window.addEventListener('load', () => {
|
|
if (window.testRunner)
|
|
document.getElementById('layers').innerText = window.internals.layerTreeAsText(document);
|
|
}, false);
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
<div class="negativez child">
|
|
<div class="composited child"></div>
|
|
</div>
|
|
<div class="contents"></div>
|
|
</div>
|
|
<pre id="layers"></pre>
|
|
</body>
|
|
</html>
|