blob: 9702d867a19026f2de3d94de3a26331c46c92d72 [file] [log] [blame]
<!DOCTYPE html>
<style>
.set {
position: absolute;
top: 8px;
}
.box {
height: 100px;
width: 100px;
background-color: lightblue;
}
.squashed {
height: 40px;
width: 40px;
background-color: lightgreen;
position: absolute;
left: 16px;
}
.composited {
will-change: transform;
}
.opaque {
opacity: 0.5;
}
</style>
<!-- This test checks that setting the opacity of the owner of a squashed layer only affects that layer, and not the squashed layers. -->
<!-- This div will be the "owner" of the squashing layer -->
<div id="target" class="composited box"></div>
<!-- These divs will be squashed into a layer containing them and the owner -->
<div class="squashed" style="top: 4px"></div>
<div class="squashed" style="top: 54px"></div>
<pre id="layers">Layer tree goes here in DRT</pre>
<script>
if (window.testRunner)
testRunner.dumpAsText();
document.getElementById("target").classList.add("opaque");
var layersResult = document.getElementById('layers');
if (window.testRunner)
layersResult.innerText = internals.layerTreeAsText(document);
</script>